FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG
Functional Dependency
1. consider R(ABC) {a1b1c1, a1b1c2, a1b2c2, a2b1c3}. How many non trivial fds are
satisfied on given R
a)2 b)3 c)4 d)none
2. R(abc) having tuples (1,2,3)(4,2,3)(5,3,3). Which of the following dependencies can
you infer does not hold over R.
a)a→b b)bc→a c)b→c d)ac→b
1. Consider the following : Which of the following satisfied.
X Y Z (a) XY → Z and Z → Y
1 4 2 (b) YZ → X and Y → Z
1 5 3 (c) YZ → X and X → Z
(d) XZ → Y and Y → X.
1 6 3
3 2 2
2. R (abc)
We conclude that
A B C
1 1 1 (a) A →B and B →C.
1 1 0 (b) A B and B C.
2 3 2
(c) B C.
2 3 2
(d) A B and B C.
4. Consider the following implications relating to functional and multi valued
dependencies given below, which may or may not be correct.
(1) If A → > B and A → > C then A → BC :false
(2) If A → B and A → C then A → BC: true
(3) If A → > BC then A → B and A → C :false
(4) If A → BC then A →B and A → > C :true
Exactly how many of the above implications are valid?
(a) 0 (b) 1 (c) 2 (d) 3
Ans. C
Attribute Closure
1. r(abcdef) f{a→ce,b→d,c→ad,bd→ef} find ab+
FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG
a)abcd b)aced c)abcde d)none
2. consider R(abcdefg) f{a→b,bc→de,aeg→g} compute AC+.
a){abcde} b){ab} c){abde} d)none
3. r(abcde) f{a→bc,e→cf, b→e,cd→ed} find closure of {ab}
a){abe} b){abdef} c){abcef} d){abcdef}
4. r(abcdefg) f{a→b,bc→de,aef→g} find ac+
a){abcd} b){abcde} c)abe} d)none
2006, 2M
1. The following functional dependencies are given:
{ AB → CD AF → D DE → F C → G, F → E,G → A.}
Which one of the following options is false?
(A) CF+= ACDEFG (B) BG+= ABCDG
(C) AF+= ACDEFG (D) AB+= ABCDFG
CANDIDATE KEYS
1. R(abcd) f{a→bc, b→cd, c→da}. The number of candidate keys are?
a)1 b)2 c)3 d)4
2. r(abcd) f{a→b,b→c, c→a} . the number of candidate keys are?
a)1 b)2 c)3 d)4
3. r(abcd) with set of fds{ab→c, c→d, d→a}. list all candidate keys of R?
a)ab, bc, bd b)ab,bc,cd c)ab,bc,ad d)none
4. r(abcd) f{a→b,b→c,c→d.d→a} list all keys of R.
a)a,b,c b)a,b,c,d c)ab,bc,cd d)none
5. R(abcdef) {a→bcdef;bc→def;b→f,d→e} find super keys.
6. R(abcdef){ab→c,c→d,d→e,e→fa,f→a}
7. R(abcde){a→b,b→c,c→d,d→a}
8. R(abcde){a→d,ab→c,b→e,d→c,e→a} find the keys for
a. R1(abc) →{b}
b. R2(cde)→{de}
9. R(abcde){ab→c,c→d,d→e,a→b,c→a} →{a,c}
10. R(abcde) {a→d,ab→c,b→e,d→c,e→a} →{b}
11. R(abcdef){ab→c,c→de,e→f,f→a}
12. r(abcd)f{b→c,c→a,c→d} list candidate keys of R.
a)a b)b c)c d)none
13. r(abcd)f{b→c,c→a,c→d} list candidate keys of R.
a)ab b)bc c)ac d)none
14. R(abcd) f{abc→d, d→a} list all keys of R
FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG
a)abc,acd b)bcd,acd c)abc,bcd d)none
15. R(abcd) f{a→c, b→d} List all keys of R?
a)ab,ba b)ab,ad c)ad,bc d)ad
16. R(abcdefghij) f{abd→e,ab→g,b→f,c→j,cj→I,g→h} what are the candidate keys?
a)abcd b)abc c)abcde d)none
17. R(xyzw) f{y> w, xy→z} where the symbol > means y→w and w→y. what are
the candidate keys?
a)xy and zw b)xw and yz c)xy and wx d)xy and yz
18. r(abcde) f{ab→c,cd→e,de→b} find keys.
a)abd b)acd c)ade d)all
19. r(abcde) f{a→b,bc→e,ed→a} find keys.
a)1 b)2 c)3 d)none
20. r(abcd) f{ab→c,c→d,d→a} fin ck.
a) ab,cb,db b)ab,cb c)cb,db d)none
21. r(abcdef) f{ab→c,c→d,d→e,e→f,f→a}. list keys of R.
a)ab,cb b)ab c)ab,cb,db,eb,fb d)none
22. r(abcd) f{ab→c,b→d,d→b}. find keys of R
a)ab,cd b)bc,ad c)ac,bd d)ab,ad
1. An instance of a relational schema R(A, B, C) has distinct values for attributes A.
Can you conclude that A is candidate key. For R? Yes
2. Consider the relation schema R(A, B, C) with the following functional
dependencies : {AB → C, C → A} Determine the minimal keys of R.
AB,BC
3. Let R = (a, b, c, d, e, f) be a relation schema with the following functional
dependencies. f{c → f, e → a, ec → d, a → b}
What is candidate key for R?
(a) cd (b) ec (c) ae (d) ac
4. Consider a relation R = (A, B, C, D, E, H) on which the following fd hold :
{A → B, BC → D, E → C, D → A}. What are condidate keys of R?
(a) Ae, be (b) Ae, Be, De (c) Aeh, beh, bch (d) Aeh, beh, deh
5. Consider relation R with 5 attributes V, W, X, Y, Z. The following functional
dependencies hold? {VY → W, WX → Z, ZY → V}. What is candidate key.
(a) V X Z (b) V X Y (c) VW X Y (d) VW X YZ
6. Consider a relational table with single record from each registered student with
the following attributes :
FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG
1. Registration-Num : Unique registration number of each student.
2. UID : unique identity number, unique at the national level for each citizen.
3. Bank account-num : unique account number at the bank. A student can have
multiple account or joint account.
This attribute stores the primary account number.
4. Name : Name of the student.
5. Hostel room : Room number of the hostel.
Which of the following option is incorrect?
(a) Bank account-num is a candidate key.
(b) Registration-num can be primary key.
(c) UID is a candidate key if all students are from the same country.
(d) If S is superkey such that SUID is NULL then SU UID is also super key.
7. R(ABCDEFGH). Fields of R contain only atomic values . {CH→G, A→BC,B→CFH,
E→A, F→EG} is a set of functional dependencies. So that F+ is exactly the set of FDs that
hold for R.
How many candidate keys does the relation have?
a)3 b)4 c)5 d)6
8. R=(E,F,G,H,I,J,K,L,M,N) and the set of fds {EF→G, F→IJ, EH→KL,K→M, L→N} on R.
What is the key for R?
(a) {E,F} b){E,F,H} c){E,F,H,K.L} D){E}
9. A prime attribute of a relation scheme R is an attribute that appears?
a) in all candidate keys of R. b)in some candidate key of R.
c)in a foreign key of R. d)only in the primary key of R.
10. find Maximum Number of super keys for the relation schema (E,F,G,H) when E is
candidate keyfor the relation.
11. consider the following statements..
S1 : Table with two attributes is in 1NF,2NF,3NF and BCNF
S2: {AB→E,AB→C,D→E,E→C}, so its minimal cover is {AB→C, D→E, E→C}
Which of the above correct?
a)S1 only b)S2 only c)S1 and S2 d)Neither S1 nor S2
SUPER KEYS
FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG
1. R(abcd) {A→b,b→c,c→d} then C.K. or minimal super key={A} AND SK={A}
2. R(abcde) {ab→c,c→d,b→e} then {AB} is super key.
3.
4. R(abcd) find number of super keys when a is ck.
5. R(abcd) find number of super keys when ab,bd is ck.
6. R(ab) find number of super keys when a is ck.
7. R(abcd) find number of super keys when a, b is c.k.
8. R(abcd) find number of super keys when a,b,c are c.k.
Sol: n(a)+n(b)+n(c)+n(aubuc)-[n(ab)+n(bc)+n(ac)
9. R(abcd) find number of super keys when ab,cd are c.k.
10. R(a1,a2….an) find number of super kyes when
a. A1 is c.k.
b. A1,a2 is c.k.
c. A1a2 and a3,a4 are c.k.
d. A1a2 and a2a3 are c.k.
DECOMPOSITION
1. r(abcd) f={a→b, b→c, c→d,d→a}. the decomposition R1(ABC) R2(bc) R3(cd) is?
a) lossy & dp b)lossless & dp c)not dp & lossless d)not lossless and not dp.
2. R(abcd) f{ab→cd, b→c,c→d} is decomposed into BCNF R1(ab) r2(bc) r3(cd). The
decomposition is?
a) lossy & dp b)lossless & dp c)not dp & lossless d)not lossless and not dp.
3. R(abcd)f{ab→c,c→d,c→a,ab→d} the decomposition is R1(abc) R2(cd) r3(ca)
a)LLJ, DP b)LLJ, Not D.P. c)Lossy , DP d)Lossy, Not DP
4. R(abcd) is relation which of the following doesnot have either lossless or d.p. bcnf
decomposition.
a)a→b,b→cd b)ab→c,c→d c)a→bc,c→d
d)ab→cd,c→a
5. R(XYZWQ) f{x→z,y→z,z→w,wQ→z,zQ→x} r1(x2) r2(xy) r3(yQ) r4(zwQ)r5(x,Q)
lossy or lossless.
ans: LLJ & No D.P.
6. R(abcd){2134},{3212},{4212},{5134} the decomposition R1(AB) R2(bc)
r3(cd) is?
a) lossy & dp b)lossless & dp c)not dp & lossless d)not lossless and not dp.
7. R(abcdef) f{a→bc,f→a,c→a,d→e,e→d}. the decomposition R1(acd) r2(bcd) r3(efd)
is?
FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG
a) lossy & dp b)lossless & dp c)not dp & lossless d)not lossless and not dp.
8. R(abcd) f{b→a,b→cd} what is the best decomposition
a)a→b,b→cd b)a→b,b→cd c)ab→c, c→ad d)a→bcd.
9. R(abcdef)R1(be) R2(acdef) {a→b,c→de,ac→f} R1(be) R2(acdef)
10. R(abcde){a→bc,cd→e,b→d,e→a} R1(abc) R2(acde)
11. R(abcd){ab→c,c→a,c→d} R1(ca) R2(cd) R3(bc)
12. R(abcd){b→c,d→a} R1(bc) R2(ad)
13. R(abcdeg) {ab→c,ac→b,ad→e,b→d,bc→a,e→g}
a. R1(ab,bc,ab,de,eg}
b. R2(abc,acde,adg}
1. State true or false
(a) There is always a decomposition into Bcnf that is LLJ & DP?
4. R(LMNOP) & f{m → 0, no → p, p→ L, & L → mn}
R is decomposed into R1 (LMNP) and R2 (M, O).
4. a ) is the above decomposition is Lossless Join?
4. b) Is the above is dependency preservation.
1. Let R(A, B, C, D) with fds {A → B, B → C, C → d, d → b}
The decomposition of R into (ab) (bc) (bd)
(a) gives lossless join and dependency preserving.
(b) gives lossless join but not dependency preserving.
(c) No lossless join and no dependency preservation.
(d) no lossless join but dependency proserving.
FDs IMPLIED BY OTHER OR FD COVERS
1. consider the following
f={a→bc, b→a, c→a}
g={a→b, b→c, c→a}. then which of the following is true?
a) f covers g b) g covers f c)f=g d) none
2. R(abcde) f{a→b,a→c,cd→e,b→d,e→a} which of the following is not implied
a)cd→ac b)bd→cd c)bc→cd d)ac→bc
3. R(abcdefgh) f{a→bc,cd→e,e→c,d→aeh,abh→bd,dh→bc} is bcd→h implies from
the above.
a)True b) False c)can’t predict d)none
4. F{x→w,x→y,y→z,and z→pq} Which of the following is false
a)x→z b)w→z c)x→wy d)none
FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG
5. F{pq→r, p→q, s→pq, s→t} g{p→qr, s→pt}
a)f=g b)f covers g c)g covers f d)none
6. F(a→b, ab→c, d→ac, d→e} g{a→bc, d→ab}
a)f=g b)f covers g c)g covers f d)none
ans: b
7. F{a→c,ac→d,e→ad,a→h} g{a→cd,e→ah}
a)f=g b)f covers g c)g covers f d)none
ans: b
8. f{a→c,ac→d,e→ad,e→h} g{a→cd,e→ah}
a)f=g b)f covers g c)g covers f d)none
ans: b
9. f{b→cd, ad→e, b→a} g{b→cde, b→abc, ad→e}
a)f=g b)f covers g c)g covers f d)none
ans: a
2005, 2M
3. R(abcde) f{a→b,c; cd→e,b→d,e→a} which of the following does not hold?
a) cd→ac b)bd→cd c)bc→cd d)ac→bc
2015
1. Consider relation X(PQRSTU) with the following functional
dependencies
F{ PR→ST, PSU→QR}
Which of the following is trivial functional dependency in F+, where F+ is
closure of F?
a){PR→ST} b){PR→RT} c){PS→S} d){PSU→Q}
Minimal Cover / Canonical Cover / Ir-reducible Set
1. R(abcdeh) f{a→bc,b→ce,a→e,ac→h,d→b} find minimal cover.
a){a→bh,b→ce,d→h} b){a→bch,b→ce,d→b}
c){a→h,b→ce,d→b d){a→bh,b→ce,d→b}
ans: a
2. F{a→c,ac→b,b→a,c→ab} find minimal conver.
a){a→c,c→b,b→a} b){ac→b,b→a} c){ac→b,c→ab} d)none
ans: a
3. R(abcdiej) f{a→be,ab→de,ac→g} find minimal cover?
a){a→b,b→de,ac→g} b){a→be,ab→de,ac→g} c)a→b,b→de}
d)none
ans: d
4. F{a→bc,b→ca,c→ab} find minimal cover?
a){a→b,b→c,c→a} b){a→c,b→a,c→b} c){a→bc,c→ab} d)none
ans: a
FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG
5. F{x→yz,y→xz,x→x} find minimal cover.
a){x→y,y→z,z→x} b){x→y,y→z,y→x} c) {x→y,y→z,y→x,z→x}
d)none
ans: a
6. F{a→b,abcd→e,ef→gh,acdf→eg} what is minimal cover.
a) {a→b,acdf→e,ef→gh} b){a→b,abcd→e,ef→gh}
c){a→b,acd→e,ef→gh} d)none
ans: d
7. f{abd→ac,c→be,ad→bf,b→e} how many minimal covers are possible.
a)1 b)2 c)1 d)none
ans: a
8. R(wxyz) {x→w, wz→xy, y→wxz} what is minimal cover?
Ans: { x→w, wz→y, y→xz}
Gt, 2017
ANS: A
Prime Attributes
1. R(abcde) f{a→bc,bc→d,d→ea}. How many non prime attributes are there?
a)0 b)1 c)2 d)none
2. R(abcde) f{a→bc,bc→d,d→ea}. How many prime attributes are there?
a)0 b)4 c)2 d)none
FDS ISSR,Gate Faculty, CN,DBMS,OS VIZAG