Thursday, April 3, 2014

DBMS

1. What are the parts of SQL language? 
The SQL language has several parts: 
data -definitition language 
Data manipulation language 
View definition 
Transaction control 
Embedded SQL 
Integrity 
Authorization 

2. What are the categories of SQL command? 
SQL commands are divided in to the following categories: 

1. data -definitition language 
2. data manipulation language 
3. Data Query language 
4. data control language 
5. data administration statements 
6. transaction control statements 

3. What are the three classes of SQL expression? 
SQL expression consists of three clauses: 
Select 
From 
where 

4.Give the general form of SQL query? 
Select A1, A2…………., An 
From R1, R2……………, Rm 
Where P 


5. What is the use of rename operation? 
Rename operation is used to rename both relations and a attributes. 
It uses the as clause, taking the form: 
Old-name as new-name 


6. Define tuple variable? 
Tuple variables are used for comparing two tuples in the same relation. The tuple 
variables are defined in the from clause by way of the as clause. 

7. List the string operations supported by SQL? 
1) Pattern matching Operation 
2) Concatenation 
3) Extracting character strings 
4) Converting between uppercase and lower case letters. 

8. List the set operations of SQL? 
1) Union 
2) Intersect operation 
3) The except operation 

9.What is the use of Union and intersection operation? 
Union: The result of this operation includes all tuples that are either in r1 or in r2  or in both r1 and r2.Duplicate tuples are automatically eliminated.  
Intersection: The result of this relation includes all tuples that are in both r1 and r2. 

10. What are aggregate functions? And list the aggregate functions supported by  SQL? 
Aggregate functions are functions that take a collection of values as input and 
return a single value. 
Aggregate functions supported by SQL are 
Average: avg 
Minimum: min 
Maximum: max 
Total: sum 

Count: count 

No comments:

Post a Comment