Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Course Name: Database Management Systems

Course Code: UE17CS252


Unit : 3
1. Describe the six clauses in the syntax of an SQL retrieval query.
Show what type of constructs can be specified in each of the six
clauses. Which of the six clauses are required and which are
optional?
2. Discuss how each of the following constructs is used in SQL, and
discuss the various options for each construct. Specify what each
construct is useful for.
o Nested queries
o Joined tables and outer joins
o Aggregate functions and grouping
o Triggers
o Assertions and how they differ from triggers
o The SQL WITH clause
o SQL CASE construct
o Views and their updatability
o Schema change commands
3. Discuss how NULLs are treated in comparison operators in SQL.
How are NULLs treated when aggregate functions are applied in an
SQL query? How are NULLs treated if they exist in grouping
attributes?
4. With example discusses the with and case statement?
5. What are assertion and how assertion are helping in database design?
6. Write a create view statement for following results?
Fname Ssn pno Hours
joe 23445678 12 12.6
John 67854437 10 5.6
7. Explain all the constraint violation during insert , delete and update
operations?
8. What is natural join and explain with example?
9. What is an aggregate function in SQL? How null values are treated
during execution of aggregate functions in query?
10.Write the following query by considering company database?
a. List down projects and number of employees working in the
respective projects and display department name with
manager details?
b. Find the total number of employees working in respective
department?
11.Define view and discuss view implementation?
12.Discuss all relational algebra operations from set theory?
13. What is projection and explain with a example?
14. With help of example discuss difference between cartesian product
and natural join?
15.Explain division operation with example?
16.Write relational algebra query for following?
Retrieve the names of employees who have no dependents.
17.Discuss Domain relational calculus?
18.With example explain existential and universal quantifiers?
19.What is tuple relational calculus? discuss with suitable example?
20.Consider the query: we want to count the total number of employees
whose salaries exceed $40,000 in each department, but only for
departments where more than five employees work.

INCORRECT QUERY:
SELECT Dno, COUNT (*)
FROM EMPLOYEE
WHERE Salary>40000
GROUP BY Dno
HAVING COUNT (*) > 5;

Discuss why above query is wrong? And write the correct query.

You might also like