Thought Sharing

Wednesday, December 5, 2012

Database Constraints


Database Constraints


Constraints are the rules which are applied to a table to filter out data during insert or update operations. Constraints can be added at the time of creating a table or altering a table. Constraints are the conditions which should be satisfied by insert or update query. There are 2 types of constraints:
1)      Input output (I/O) constraints:
a.       These are of following types:
                                                               i.      Primary Key
                                                             ii.      Foreign Key
                                                            iii.      Unique Key
2)      Check (Business Rules) constraints:
a.       These are defined at 2 levels
                                                               i.      Table Level
                                                             ii.      Column Level

List of SQL Queries


SQL Queries
Table Structure Related Queries:
1)      Create table
2)      Rename a table
3)      Creating a table from another table
4)      Deleting a table
5)      Adding a new column in an existing table
6)      Modifying a column in an existing table
7)      Deleting a column from an existing table
8)      Adding Primary Key during creating a table
9)      Adding Primary Key in an existing table
10)   Adding Foreign Key during creating a table
11)   Adding Foreign Key in an existing table
12)   Dropping a Primary Key from a table
13)   Dropping a Foreign Key from a table
14)   Defining Check constraint at Column Level while creating a table
15)   Defining Check constraint at Column Level using alter table
16)   Defining Check constraint at Table Level while creating a table
17)   Defining Check constraint at Table Level using alter table
18)   Dropping a Check constraint

Working with Table:
1)      Insert values in the table
2)      Update values in the table
3)      Delete values in the table
4)      Truncate Table (To empty a table- to delete all records)
5)      Selecting values from table
6)      Where Clause
7)      Desc (Description)
8)      Order BY Clause
9)      Group By Clause
10)   Having Clause
11)   Distinct Clause
12)   Searching Record using: Between, IN, NOT IN, Like
13)   Oracle Functions: AVG (), MIN (), MAX (), COUNT (), SUM (), SQRT (), EXP (), MOD (), TRUNC (), FLOOR (), CEIL (), LOWER (), UPPER (), ASCII ().

Sub Queries:
1)      Finding Duplicate Records from a Table
2)      Deleting Duplicate Records from a Table
3)      Finding Highest Salary from Employee Table
4)      Finding 2nd Highest Salary from Employee Table
5)      Finding 5th Highest Salary from Employee Table
6)      Finding Nth    Highest Salary from Employee Table

Database Objects:
1)      Creating View
2)      Deleting View
3)      Creating Join
4)      Create Index
6)      Delete Index

Tuesday, May 1, 2012

Scripting Languages

A scripting language is used to write the scripts on the web pages. These scripts are actually the programs embedded into HTML code and these web pages are run on the client computers. These scripts/programs are interpreted by the browsers. There are different types of these scripting languages that are commonly used today like JavaScript, vbscript, .net languages, Perl etc. The JavaScript is based on the main language java. Java script is an interpreted language. It is mostly used to add dynamic contents to a web page.

These dynamic contents may be scrolling text, menus, pop-up windows, animations etc. JavaScript is an open language developed by sun micro system. The vbscript is a scripting language that is based on a programming language visual basic. The vbscript also provides the same functionality as JavaScript. By default internet explorer supports vbscript and Netscape communicator supports java scripts. Perl refers to practical extraction and report language. It is also a powerful scripting language that is most commonly used. The most recently used technology in scripting language is .NET Platform. It is a creation of Microsoft. The main advantage of .NET Platform is that it provides the platform independence in internet environment. It develops the applications that support XML web services. The .NET applications can be used in any type of web browse or in any type of computer.

A scripting language is a form of programming language that is usually interpreted rather than compiled. Conventional programs are converted permanently into executable files before they are run. In contrast, programs in scripting language are interpreted one command at a time. Scripting languages are often written to facilitate enhanced features of Web sites. These features are processed on the server but the script in a specific page runs on the user's browser.

In most cases, it is easier to write the code in a scripting language than in a compiled language. However, scripting languages are slower because the instructions is not handled solely by the basic instruction processor. Scripting languages allow rapid development and can communicate easily with programs written in other languages.

Scripting languages can be used to create specialized GUIs (graphical user interfaces) and forms that enhance the convenience of search engines, Web-based e-mail and e-commerce. Many Web sites require that the user's browser be set to run scripts to take advantage of all the features of the site. In some cases, Web sites are practically useless unless the user's computer is set to run programs locally in a scripting language.

Monday, April 23, 2012

TABLE OF CONTENTS FOR SOFTWARE PROJECTS


Table of Contents
1.      Introduction……………………………………………………………….............….…....1
a.       Overview of Proposed System………………………………………….…2
b.      Need of Proposed System…………………………………………………………...3
c.       Scope of Work…………………………………………………………....4
2.      Objective of Proposed System…………………………………………………….............5
3.      Project Categories Tools and Environment……………………………………...............….6
a.       Front End
b.      Back End
c.       Hardware and Software Requirements
4.      Software Development Life Cycle
                       SDLC Model (Water Fall Model, Spiral Model or Prototype Model)
a.       Recognition of Need
b.      Feasibility Study
                                                              i.      Operational Feasibility
                                                            ii.      Economical Feasibility
                                                          iii.      Technical Feasibility
                                                          iv.      Legal Feasibility
c.       System Requirement Specifications (SRS)
d.      System Analysis and Design
                                                              i.      Entity Relationship Diagram
                                                            ii.      Data Flow Diagram and Use Case Diagram
                                                          iii.      Design Strategies
e.      Physical Design (Coding)
f.       System Integration and Testing
                                                              i.      Functional Testing
                                                            ii.      Structural Testing
                                                          iii.      Test Case
g.      Operation and Maintenance
5.      Conclusion and Future Work
6.      Bibliography

List of Programs for OOPs (C++) Practical

List of Programs for OOPs Practical File 


 1.  WAP to find the sum of two numbers using function.
 2.  WAP to find Simple Interest and Compound Interest.
 3.  WAP to demonstrate the working of following Loops: While, Do While, For, If-Else, Switch.
 4.  WAP to find greatest of three numbers.
 5.  WAP to check whether a number is even or odd.
 6.  WAP to check whether a year is leap year or not.
 7.  WAP to add and subtract two matrices.
 8.  WAP to display elements of an array.
 9.  WAP to calculate Sum and Average of an array.
 10. WAP to sort elements of an array using Bubble sort.
 11. WAP to calculate Factorial of a number. 
 12. WAP to check whether a given number is Prime or not.
 13. WAP to generate Fibonacci series.
 14. WAP to show function Overloading.
 15. WAP to create a class and access member function of a class
 16. Write a program to show Constructor and Destructor in a class
 17. Write a program to convert the temperature in Fahrenheit to Celsius and vice-a-verse
 18. Write a program to show the concept of Single inheritance in classes.

Monday, April 2, 2012

Program for Addition of 2 Matrices in C++

#include
#include

Void main()
{
int m, n, i, j, A[10][10], B[10][10], C[10][10];

cout << "Enter the number of rows and columns of matrix ";
cin >> m >> n;

cout << "Enter the elements of first matrix\n";
for ( i = 0 ; i < m ; i++ )
for ( j = 0 ; j < n ; j++ )
cin >> A[i][j];

cout << "Enter the elements of second matrix\n";
for ( i = 0 ; i < m ;i++ )
for ( j = 0 ; j < n ; j++ )
cin >> B[i][j];

for ( i = 0 ; i < m ; i++ )
for ( j = 0 ; j < n ; j++ )
sum[i][j] = A[i][j] + B[i][j];

cout << "Sum of entered matrices:-\n";
for ( i = 0 ; i < m ; i++ )
{
for ( j = 0 ; j < n ; j++ )
cout << C[i][j] << "\t";
cout << endl;
}

getch();
}