0% found this document useful (0 votes)
15 views

Database Management System Weekly Test 02 Test Paper

Huh

Uploaded by

nick peak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Database Management System Weekly Test 02 Test Paper

Huh

Uploaded by

nick peak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1

DS & AI Hinglish
WEEKLY TEST – 02
Subject : DBMS
Topic : Minimal Cover, Properties of
Decomposition & Normal Form Maximum Marks 20

Q.1 to 6 Carry ONE Mark Each


[MSQ] [MSQ]
1. Given a relational schema R(p q r s t) with FD set: 4. Consider the given FD set on relation R(x, y, z, w, v)
pq → r FD: {xy → z, z → w, w → y, w → v}
s →t Then choose the correct statement from the following.
Then choose the correct statement for the given FD set. (a) R is in 2NF
(a) R is in 2NF. (b) R is not in 3NF
(b) R is not in 2NF. (c) R is in BCNF
(c) R is in 3NF (d) R is not in BCNF
(d) R is not in 3NF
[MCQ]
[MSQ] 5. Consider the given relation R(A B C D E F) with FD
2. Choose the correct statement from the following. set as:
(a) If a relation is in 3NF then it is also in BCNF. {A → CD, B → AC, D → EF, E → FB}
(b) If a relation is in 2NF then it is also in 3NF. The given relation R satisfies which normal form?
(c) If a relation is in BCNF then it is also in 3NF. (a) 1NF (b) 2NF
(c) 3NF (d) BCNF
(d) If a relation is in BCNF then it is also in 2NF.

[MCQ]
[MCQ]
6. Consider the given set of FD set on relation R(p q r s t
3. Find the minimal cover for the FD set
u v x)
F ={X → Y, XY → Z, W → XZ, W → U}
on a relation R (X, Y, Z, W, U) {p →qr, r → uv, u → pxs, s → t}
(a) {X → Y, W → X, W → U} The given relation R satisfies which normal form
(b) {X → Z, W → X, W→U} (Highest normal form).
(c) {X → Y, X → Z, W → X, W → U} (a) 1NF (b) 2NF
(d) {X → W, W → X, W → U} (c) 3NF (d) BCNF

Q.7 to 13 Carry TWO Mark Each

[MCQ] (a) 10
7. Consider a relational schema R (P Q S T U V X Y Z (b) 20
W) Then what will be the maximum number of (c) 252
candidate keys possible for the above relational (d) Not possible to find candidate keys.
schema R?
2

[NAT] [MCQ]
8. Find the number of candidate keys for the given 11. Find the canonical cover for the FD set:
relation R (A B C D E F G) with FD set: {Y → X, XW → YZ, Z → XYW}
{AB → C, D → AB, C → DF, F → EG} On relation R(X, Y, Z, W)
(a) {Y → X, XW → Z, Z → YW}
[MCQ] (b) {Y → X, XW → Y, Z → YW}
9. Given a relational schema R(A, B, C, D, E) will set of (c) {Y → X, XW → Y, Z → XY}
functional dependencies P and Q as:
(d) {Y → X, XW → Z, Z → YX}
P:{A → B, AB → C, D → AC, D → E}
Q: {A → BC, D → AE}
[MSQ]
Then choose the correct options from the following.
(a) Q is a subset of P 12. Choose the correct statement regarding normal forms
(b) P is a subset of Q from the following.
(a) If there exists only two attributes in a relation then
(c) P  Q
it is in BCNF.
(d) P  Q (b) If all the attributes are prime in a relation then the
relation is in 3NF but may not be in BCNF.
[MSQ] (c) There exists 0 redundancy in 3NF always.
10. Choose the incorrect statements from the following: (d) None of the above.
(a) There can be atmost one primary key for any
relation. [NAT]
(b) There can be exactly one primary key for any 13. The number of statement that is/are correct?
relation I: There exist 0% redundancy in third normal form
(c) There can exists 0 or more minimal cover for a (3NF).
given FD set for any relation. II: There exist 0% redundancy in Boyce codd normal
(d) There exists only one minimal cover for a given form (BCNF).
FD set for any relation. III: There should not exist any partial dependency in
second normal form (2NF).
3

Answer Key
1. (b, d) 8. (3)
2. (c, d) 9. (c)
3. (c) 10. (b, d)
4. (b, d) 11. (a)
5. (d) 12. (a, b)
6. (b) 13. (2)
7. (c)
4

Hints and Solutions

1. (b, d) 4. (b, d)
Given FD set :{pq →r, s → t}The candidate key for The candidate key for relation R
relation R is pqs. xy+ = {x, y, z, w, v}
pqs+ = {p q r s t} xz+ = {x, z, w, y, v}
As there exists partial dependency, the relation R is xw+ = {x, w, y, v, z}
not in 2NF and in turn not in 3 NF. xv+ = {x, v}

xy → z z→w w→y w→v


2. (c, d)
2NF ✓ ✓ ✓ 
3NF ✓ ✓ ✓ 
BCNF ✓   
Candidate keys: {xy, xz, xw}
Prime attributes: {x, y, z, w}
The given relation is in 1NF.

5. (d)
{A → CD, B → AC, D → EF, E →FB}
Candidate keys for relation R are:
3. (c)
A+ = {A, C, D, E, F, B}
1. X → Y B+ = {B, A, C, D, E, F}
2. XY → Z C+ = {C}
3. W → XZ D+ = {D, E, F, B, A, C}
4. W → U E+ = {E, F, B, A, C, D}
As Y is implied by X, therfore Y is an entraneous F+ = {F}
attribute in XY → Z, so updated FD  X → Z. CF+ = {C, F}
1. X → Y Candidate keys are: {A, B, D, E}
2. X → Z
A → CD B → AC D → EF E → FB
3. W → X
2NF ✓ ✓ ✓ ✓
4. W → Z
3NF ✓ ✓ ✓ ✓
5. W → U BCNF ✓ ✓ ✓ ✓
In 4, W → Z, is a redundant FD
So, Finally: X → Y 6. (b)
X→Z Given FD set:
W→X {p →qr r → uv u → pxs s → t}
W→U Candidate keys:
X → Y, W → X  p+ = {p, q, r, u, v, x, s, t}
Minimal cover =  
X → Z, W → U  r+ = {r, u, v, p, x, s, t, q}
5

u+ = {u, p, x, s, t, q, r, v} D+ = {D, A, E, B, C} ✓ [D → AC] in P


s+ = {s, t}. [D → E] in P
prime attributes = {p, r, u} So, P  Q
We can conclude that P  Q. So option (c) is correct.
p → qr r → uv u → pxs s→t
10. (b, d)
2NF ✓ ✓ ✓ ✓
There exists at most one primary key for any relation.
3NF ✓ ✓ ✓ 
There can be 0 or more minimal cover for any given
BCNF ✓ ✓ ✓ 
FD set for a relation.
Hence, the highest normal form is 2NF.

7. (252) 11. (a)


For any relational instance with “n” attributes we get
(1) Y → X
the maximum number of candidate keys if we group 2
attributes together. XW → YZ
Therefore selecting 2 attributes set from n attributes Z → XYW No extraneous attribute
n 10 (2) Y → X
C n   C10   10
C5
 2   2  XW → Y, Redundant FD
2 XW → Z Removing redundant FD’s.
2
10  9  3  7  6  5!
 Z → X, Redundant FD
5!  5  4  3  2  1 Z→Y
4×9×7 Z→W
 36 × 7 = 252 (3) Y → X
XW → Z Applying merging rule on RHS.
8. (3)
A+ = {A} Z→Y
B+ = {B} Z→W
C+ = {C, D, F, A, B, E, G} Resultant FD: {Y → X, XW → Z, Z → YW}
D+ = {D, A, B, C, F, E, G}
E+ = {E} 12. (a, b)
F+ = {F, E, G} If there exists only two attributes in a relation then it
is always in BCNF.
AB+ = {A, B, C, D, E, F, G}
If all the attributes are prime in a relation, then the
Only 3 candidate keys possible for R i.e {C, D, AB}
relation is in 3NF always because for satisfying 3NF.
For FD X → Y:
9. (c) Either X should be a super key or Y should be a prime
Let’s first find attribute closure of L.H. S of FD set Q attribute.
in FD set P
13. (2)
A+ = {A, B, C} ✓ [A → BC] in Q.
There may be redundancy in 3NF while there exists no
D+ = {D, E, A, C, B} ✓ [D → AE] in Q. redundancy in BCNF. The second normal form does
So, Q  P not allow any partial dependency.
Now checking the attribute closure of L.H.S of FD set So statement II and III are correct.
P in FD set Q.
A+ = {A, B, C} ✓ [A → B] in P
AB+ = {A, B, C} ✓ [A → BC] in P
6

For more questions, kindly visit the library section: Link for web: https://smart.link/sdfez8ejd80if

PW Mobile APP: https://smart.link/7wwosivoicgd4

You might also like