Database Management System 2067 II
Attempt all the questions.
1.Answer the following questions in short.(5x2=10)
a. Advantage of DBMS approach over file system approach.
b. Differentiate between two-tier and three-tier client/server architecture.
c. What is weak entity, owner entity type and identifying relationship?
d.The null value attribute and its uses.
e) The difference among a relationship instance, a relationship type and a relationship set.
2. a)Draw an ER diagram for a database showing Hospital system. The Hospital maintains data about Affiliated Hospitals, type of Treatments facilities given at each hospital, and Patients.(6)
b)What is join operation? Differentiate between equijoin and natural join with suitable example.(4)
3.a)Assume a database about Company.
EMPLOYEE (ss#, name)
COMPANY (cname, address)
WORKS (ss#, cname)
SUPERVISES (supervisor_ss#, employee_ss#)
Write relational algebra and SQL queries for each of the following cases.(5)
(i)Find the names of all the supervisors that work in companies whose address equal ‘Kathmandu’.
(ii)Find the names of all the companies who have more than 4 supervisors.
(iii)Find the name of the supervisor who has the largest number of employees.
b)How can define view in SQL? Explain the problems that may arise when one attempts to update a view.(1+4)
4.a)What are different update anomalies? Explain each in with suitable example.(1+4)
b)Define functional dependency. Describe the closure of a set of functional dependencies with an example.(1+4)
5.a) Draw a state diagram, and discuss the typical state that a transaction goes through during transaction.(5)
b) Which of the following schedule is (conflict) Serializable? For each serializable schedule, determine the equivalent serial schedules.(5)
i)r1(x); r3(x); w1(x); r2(x); w3(x);
ii)r1(x); r3(x); w3(x); w1(x); r2(x);
iii)r3(x); r2(x); w3(x); r1(x); w1(x);
iv)r3(x); r2(x); r1(x); w3(x); w1(x);
6.a) Discuss the problems of deadlock and starvation, and the different approaches to dealing with these problems.(5)
b)Describe write-ahead logging protocol.(5)