Académique Documents
Professionnel Documents
Culture Documents
0
3
5
10
13
0
3
5
10
13
the correct answer is d: find the pno and pnames of patients who have been given a drug
which is not d7.
Q3 Consider the following relational algebra expression in which the word join stands
for a NATURAL JOIN:
(1 mark)
e) none of these
correct answer is c :
a) there is no pno in drug
b) the scheme of (dno, dname (drug join dose)) is (dno, dname) and so there is no pno to
apply the select to.
c) is correct
d) the intermediate schemes would be (dno, dname) join (pno, dno, dosedate, qty )
giving a final scheme (dno, dname, pno, dosedate, qty )
e) no correct as c is OK
pno pname
pno title
pno DOB
pno children
pno gpno
gpno gpname
Correct answer c
R1 join R2 in c) would be the Cartesian product of R1 and R2 which gives us
spurious tuples
a) is fine it is not lossy although it is not normalised
b) is fine ( and is also normalised)
Q5 Which one of the following decompositions of patient is a lossless AND in BCNF
(1 mark)
a) R1(pno, pname, title, DOB), R2 (pno, children, gpno, gpname)
b) R1 (pno, pname, title, DOB, children, gpno) , R2 (gpno, gpname)
c) R1 ( pno, pname, title, DOB, children), R2 (gpno, gpname)
d) More than one of the above
(1 mark)
(1 mark)
(1 mark)
AD B
BD
DF
FE
correct answer a)
closure of EF is EF
closure of BF is BFDE
closure of DB is DBFE
Q10 Given R (A, B, C, D, E, F)
with FDs {
AB
BE F
DC
FE
(1 mark)
correct answer c)
(1 mark)
r1 (X); r2(Z); r1 (Z); r3 (X); r3(Y); w1 (X); w3(Y); r 2 (Y); w2 (Z); w2 (Y);
is
a)
b)
c)
d)
e)
correct answer d)
Q 12
(1 mark)
Look at the attached diagram which shows what happens when a transaction requests a
lock. The labels 1, 2 and 3 should be replaced with
a)
b)
c)
d)
e)
correct answer c)