DBMS - Question Bank
DBMS - Question Bank
DBMS - Question Bank
Q1. Define Join and Outer Join and differentiate between them.
Q2. Describe the division and the join operation of the relational algebra. Give an example for
each. Express each of them in terms of the basic operations.
Q7. Consider the employee database, where the primary keys are underlined.
emp (ename, street, city)
works (ename, company-name, salary)
company (company-name, city)
manager (ename, manager-name)
Construct the following SQL queries for this relational database.
a. Find all employees in the database who live in the same cities as the companies for which
they work.
b. Find the names and cities of residence of all employees who work for “ABC”.
c. Find all employees in the database who live in the same cities and on the same streets as
do their managers.
d. Delete the record belonging to “ABC”.
e. Modify the database so that “ABC” now lives in “Bhopal”.
Q8. Consider the following database with primary keys underlined Project(P_No, P_Name,
P_Incharge) Employee(E_No, E_Name) Assigned_To(P_No, E_No) Write the relational algebra
for the following :
(i) List details of the employees working on all the projects.
(ii) List E_No of employees who do not work on project number DB2003.
Q9. For the relations:
Q10. Consider the restaurant database, where the primary keys are underlined:
Restaurants(rid, rname, rcity, phone, seat-capacity)
Dishes(did, dname, dtype)
Customer(cid, cname, ccity)
Serves(rid, did)
Write a relational algebra expression :
a. Find the names of the restaurants that serve “Burger”(dish name).
b. List the names of restaurants that customer “Ganesh” may easily go to.
c. List the name of dishes that appear in all restaurant in New Delhi.
Unit III
Q2. Explain Boyce-Codd Normal Form with example and also Compare BCNF and 3NF.
Q3. Let R = (A,B,C,D) and F be the set of functional dependencies for R given by {A → B, A
→ C, BC → D} Prove A → D.
Q4. Given R(A,B,C,D, E) with the set of FDs, F{AB → CD,A → E,C → D}. Is the
decomposition of R into R1(A,B,C), R2(B,C,D) and R3(C,D,E) lossless? Prove.
Q6. Compute canonical cover for the R(A,B,C,D,E,F) and FDs={AB->D, B->C, AE->B, A->D,
D->EF}
Unit IV
Q1. Define check point and its impact on data base recovery.
Q3. What are the various states through which a transaction passes through in its lifetime?
Q5. Differentiate between strict two-phase and rigorous two-phase with conversion protocol
Q7. Define serializability and consider three transactions : T1, T2 and T3 . Draw the
precedence graph for the following schedule consisting of these three transactions and determine
whether it is serializable.
T1 T2 T3
read(Y)
read(Z)
read(X)
write(X)
write(Y)
write(Z)
read(Z)
read(Y)
write(Y)
read(Y)
write(Y)
read(X)
write(X)
Q8. What are deferred modification and immediate modification technique for recovery?
How does recovery take place in case of a failure in these techniques?
T1 T2 T3
R(D3)
R(D2)
W(D2)
R(D2)
R(D3)
R(D1)
W(D1)
W(D2)
W(D3)
R(D1)
R(D2)
W(D2)
W(D1)
Unit V
Q1. Describe the storage structure of indexed sequential files and their access method.
Q2. What is the difference between primary index and secondary index?
Q3. Insert the keys below in the order stated into an initially empty B-tree of order 3. Show
all intermediate steps
a g f b k d h m j e s i r
Q4. Compare the two method for storing variable length records – byte string representation
and fixed length representation. Discuss the merits and demerits of the two.
Q5. Describe the different RAID levels. Discuss the choices of the different RAID levels
for different applications.