Professional Documents
Culture Documents
:
Name
: M.S
: Database Management Systems
: Three Hours
Semester
Code
Max. Marks
:
: SWE303
: 100
Sub.
Sec.
Question Description
Marks
1. a)
[5]
In the context of database application development, what are aims of data modeling?
b) The sales manager at your company wants a database to store customer information for the
United States. The database will require storage of Sales Reps identified by employee id. Also
store their name. Each Sales Rep has one or more territories, where a territory consists of an
entire state.
A territory is served by exactly one Sales Rep. Use the state code as a territory identifier and
also stores a territory name. Customers are located in a single state (territory) and are identified
by a customer number. Store customer names also. A customer may be a key customer or a
prospect (potential customer).
A key customer currently purchases products from our company and has a contract number
and a dispatch id. A prospect has only an address. Prospects purchase products from
competitors and we want to store the volumes and bid prices for each potential product of a
prospect. Store also the volume and price of products purchased by key customers. Each
product has a product id, name, and list price.
[10]
Draw the ER diagram for the sales information stated above. Underline primary keys
and note foreign keys and identify the structural relationships.
2. (a Consider the following relational schema for a flight reservation database:
)
[10]
(b
Map the given ER diagram to a relational model and state the steps in the mapping process.
[8]
Page 1 of 4
3. (a) The relation below shows the details of patient surgery appointments with cosmetology
[10]
doctors. Answer the questions (i) and (ii) with respect to this relation.
(i) The relation is susceptible to different anomalies. Illustrate them based on the above example.
(5)
(ii) Determine when a relation will be in 1NF, 2NF, 3NF and derive the Normal forms for the
above relation.(15)
4. (a) A professional body conducts sports competitions annually under different categories and
award prizes to the winners. Assume that there are 1000 participants, 20 categories and 10
Gold award winners out of 100 winners. The database of the professional body consists of the
following relations.
Participants (pno, name, address , telephone, email);
Categories (code , category_name, description );
Winners (pno , code ,year, award);
[10]
The SQL query to retrieve all Gold award winners with each winners name, category and year
is given below.
SELECT name, category_name, year FROM Participants p, Categories c, Winners w,
WHERE p.pno=w.pno and c.code=w.code and award=Gold
(a) Write the equivalent relation algebraic relation. (2)
(b) Draw the canonical form of the Query. (2)
(c) Apply heuristic optimization to optimize the query and draw the optimized query tree for
the query.(6)
[10]
(b) For each of the following schedules T1 and T2, draw the precedence graph and argue if the
Page 2 of 4
schedule is conflict serializable. If the schedule is conflict serializable, give one possible
equivalent serial schedule, otherwise explain why it is not.
T1: r1(A);w2(A);r1(C);r2(B);w2(B);r3(B);r3(A);w3(B);w3(C);r4(A);r4(B);r4(C);w4(D);
T2: w4(D);r1(A);w2(A);r4(A);r1(C);r2(B);w2(B);r4(B);r3(B);r3(A);w3(B);w3(C);r4(C);
5. (a) Consider the following sequence of actions, listed in the order it is submitted to the DBMS (S
[8]
Answer the following questions with respect to transactions depicted in the timeline diagram
(i)
Illustrate the actions taken by the recovery manager to restart the work if a system
failure occurs. Assume that the recovery manager uses the deferred update approach.(5)
(ii)
Illustrate the actions taken by the recovery manager to restart the work if a system
failure occurs. Assume that the recovery manager uses the immediate update approach.
(5)
6. (a Consider R(X, Y, Z, W) with FDs F ={XY, X W, WYZ} Prove or disprove F = X Z [5]
)
Suppose that all the relations for an employee database were created by user X, who wants to
[6]
grant/revoke the following privileges to user accounts A and B
(b (a) Account A can retrieve or modify any relation except DEPENDENT and can
)
grant any of these privileges to other users.
(b) Account B is denied the SELECT privilege on employee relation.
Consider the relational schema
Suppliers(sid, name, address)
Parts (pid,pname , colour)
(c)
Catalog (pid,sid,Cost)
Write SQL queries for
(i) Find the name of suppliers who supply red part.
[10]
Page 3 of 4
(ii) Find the part id (pid) of parts supplied by every supplier at a price less than 200 dollars.
(iii) Find the supplier id of suppliers who supply some red or green part.
(iv) Find pairs of supplier id (sid) such that the supplier with the first sid charges more for
some part than the supplier with the second sid.
Total Marks
100
Page 4 of 4