Sunteți pe pagina 1din 2

Birla Institute of Technology & Science, Pilani

Work-Integrated Learning Programmes Division


First Semester 2013-2014
Comprehensive Examination
(EC-3 Regular)
Course No.
Course Title
Nature of Exam
Weightage
Duration
Date of Exam
Note:
1.
2.
3.

: SS ZG518
: DATABASE DESIGN & APPLICATIONS
: Open Book
: 50%
: 3 Hours
: 10/11/2013 (AN)

No. of Pages
=2
No. of Questions = 5

Please follow all the Instructions to Candidates given on the cover page of the answer book.
All parts of a question should be answered consecutively. Each answer should start from a fresh page.
Assumptions made if any, should be stated clearly at the beginning of your answer.

Q.1 (a)

Assume we have three entity types E1, E2, and E3, with following details,
relationships, and constraints.
(i)
Attributes are: E1(a, b, c); E2(x, y, z); and E3(p, q, r, s). Attributes a and p are
the keys for entity types E1 and E3 respectively.
(ii)
E1 and E3 are involved in a relationship R which has an attribute m. In R, each
instance of E1 is associated with zero or more instances of E3. But every instance
of E3 is associated with exactly one instance (min and max is one) of E1.
(iii)
E2 is a weak entity type and its owner is E3. Attribute y is partial key of E2. The
relationship between E2 and E3 is T, and each instance of E2 is associated with
eaxctly one instance of E3, and each instance of E3 can have association with one
or more E2 instances.

Now, draw the ER diagram for the above description. Indicate- cardinality, keys,
attributes, min-max, and participation constraints for entity-types involved in the
relationships.
[5]
Q.1 (b)

Suppose that we decompose the schema R(A, B, C, D, E, F, G, H, I, J) into


R1(A,B,C,D,E), R2(B,F,G,H) , and R3(D,I,J). Find whether this decomposition is
lossless, if the following set (F) of functional dependencies holds on R.
F = { {AB}{C}, {BD} {EF}, {AD} {GH}, {A} {I}, {H} {J} }
Note: Detailed working is required with final answer.

[5]

Q.2. Look at the following Database schema.


Film(ftitle, year, language, producer, budget)
Actor(actorID, name, state, age)
Film_Actor(actorID, ftitle)
Now, write both Relational Algebra and SQL query expressions for each of the
following.
(i)
Get the actorId and name for those actors who have acted in more than 10 films.
(ii)
Get the year and number of films released in that year which have budget more
than 50 crores, in Hindi language.
[2.5 X 4 = 10]

SS ZG518 (EC-3 Regular)

First Semester 2013-2014

Page 1 of 2

SS ZG518 (EC-3 Regular)

First Semester 2013-2014

Page 2

Q.3. Consider a disk with block size 512 bytes. A block pointer p is 7 bytes long. Assume an
ordered file with 3,18,000 student records (fixed length) stored on disk. Each record has
following fields- name(30 bytes), studentID(8 bytes), branch(6 bytes), address(40 bytes),
phone(9 bytes), CGPA(4 bytes). If the file is ordered by key field studentID, design a
multilevel indexing structure by considering un-spanned record organization.
Now, answer the following.
(i)

What is the blocking factor for data file.

(ii)

What is the blocking factor for index file.

(iii)

How many data blocks are needed.

(iv)

How many levels are there in the indexing structure.

(v)

How many blocks are there in each level (indexing).

(vi)

How many block accesses are needed to access a record with index and without
index?

(vii)

How many records are there in top level (master) index block.

Q.4 (a)

[10]

Determine whether the following schedule is(conflict) serializable, for the concurrent
transactions 1 , 2, 3 and 4. The data items are A, B, and C. Draw the precedence graph.
Schedule :
Note:

Here,

r3(A); r2(C); w2(C); r1(B); w3(A); r2(A); r1(C); r4(A); r1(A); r3(B);
r1(A); - means that the transaction-1 reads data item A
w2(B); - means that the transaction-2 reads data item B

Q.4 (b)

Discuss security measures for statistical databases.

Q.5 (a)

For the following SQL query, give two distinct query trees.

[5]
[5]

SELECT D.dname, E.lname, E.fname, P.pname


FROM Dept D, Emp E, Works_on W, Project P
WHERE D.dnum= E.dno andE.ssn=W.essn and W.pno=P.pnum;
Q.5 (b)

[5]

List five important features of XML schema, which are not found with XML DTDs.
[5]
********

SS ZG518 (EC-3 Regular)

First Semester 2013-2014

Page 2 of 2

S-ar putea să vă placă și