Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DBMS - Question Bank

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

Unit I

Q1. Define physical and logical data independence.


Q2. What are the advantages of using a DBMS.
Q3. Describe main functions of a database administrator.
Q4. Define the terms entity, attribute, role and relationship between the entities, giving
examples for each of them.
Q5. Briefly describe the different kinds of users of a DBMS.
Q6. What is completeness constraint on generalization? Explain the difference between total
and partial design constraint. Give an example each.
Q7. Design a generalization-specialization hierarchy for a motor-vehicle sales company. The
company sells motorcycles which have an engine number and cost; cars which have a chassis
number, an engine number, seating capacity and cost; trucks which have chassis number, an
engine number and cost.
Q8. Explain the distinction between disjoint and overlapping design constraints in case of
generalization. Take a suitable example.
Q9. Design an E-R diagram for a travel agency consisting of the following- Customers, Buses,
Drivers, Conductors, Guides, Tickets, Booking agents, Reservations, Conducted tours and
Hotels. Describe entities, attributes, relationships and primary keys.
Unit II

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.

Q3. 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.

Q4. Consider the following relations with underlined primary keys.


Product(P_code, Description, Stocking_date, QtyOnHand, MinQty, Price, Discount,
V_code)
Vendor(V_code, Name, Address, Phone)
Here a vendor can supply more than one product but a product is supplied by only one
vendor. Write SQL queries for the following :
(i) List the names of all the vendors who supply more than one product.
(ii) List the details of the products whose prices exceed the average product price.
(iii) List the Name, Address and Phone of the vendors who are currently not supplying any
product.
Q5. Consider the following relations with key underlined
lives (person_name, street, city)
works (person_name, company_name, salary)
located (company_name, city)
manages (person_name, manager_name)
Answer the following using SQL:
(i) Find the names and city of persons who work for manager John.
(ii) Find the names of persons who live in the same city as the company they work for.
(iii) John’s manager has changed. The new manager is Anna.
(iv) Susan doesn’t work anymore.
(v) Create a view BangWork (person_name, company_name, manager_name) of all
people who work in Bangalore in ascending order of person name

Q6. Differentiate between


(i) Single value and multiple valued attribute.
(ii) Derived and non-derived attributes.
(iii) Candidate and super key.
(iv) Partial key and primary key.

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:

Shop (shop_no, shop_name, address, owner)


Customer (c_no, c_name, c_address)
Item (I_name, I_name)
Supplied (I_no, c_no, shop_no, date, price)
Require (c_no, I_no)
Database give data about items supplied by a shop to a customer and require gives data about
items required by a customer. Answer the following queries in relational algebra:
a. Names of customers who have been supplied items of maximum total value.
b. Names of customers who require items which have not been supplied.
c. Names of customers who are supplied all the items from only one shop.
d. List of shop owners who supplied some items to the address ‘177-C sector Bhopal’.

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

Q1. Define dependency preserving and lossless join decomposition.

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.

Q3. Determine a candidate key for R = ABCDEG with the FD set


F = { AB → C, AC → B, AD → E, B → D, BC → A, E → G }

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.

Q5. Given R(A,B,C,D,E) with the set of FDs,


F{AB → CD, ABC → E, C → A}
(i) Find candidate keys of R
(ii) What is the normal form of R? Justify.

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}

Q7. Explain non-loss decomposition in detail?

Q8. Shipping( shipName, shipType, voyageID, cargo, port, arrivalDate)


F = { shipName -->> shipType, (voyageID -->> shipName, cargo), (shipName, arrivalDate -->>
voyageID,port) }. Find candidate key? Decompose Shipping into 2NF, then in 3NF relation.

Unit IV

Q1. Define check point and its impact on data base recovery.

Q2. Explain the shadow paging recovery technique.

Q3. What are the various states through which a transaction passes through in its lifetime?

Q4. Explain the ACID properties of a transaction.

Q5. Differentiate between strict two-phase and rigorous two-phase with conversion protocol

Q6. Define and differentiate between the following:-


(i) Deadlock prevention.
(ii) Deadlock detection.
(iii) Deadlock avoidance.

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?

Q9. Check it is conflict serializable or not?

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.

Q6. Write shortnotes on:


(i) Data replication
(ii) Magnetic disk
(iii) Fragmentation
(iv) Inheritance

You might also like