GATE / CS ARCHIVE

GATE CSE 2013 / QUESTION 54

Candidate keys from the functional dependencies

Database Management Systems · Functional Dependencies & Keys · Full GATE CSE 2013 paper

GATE 2013, Q54 2 marks · MCQ
Report issue

Functional Dependencies & Keys

Question 54, GATE 2013: R(A, B, C, D, E, F, G, H) has atomic fields and exactly FD closure generated by CH→G, A→BC, B→CFH, E→A, F→EG. Number of candidate keys: A3, B4, C5, D6.
Question 54, GATE 2013: R(A, B, C, D, E, F, G, H) has atomic fields and exactly FD closure generated by CH→G, A→BC, B→CFH, E→A, F→EG. Number of candidate keys: A3, B4, C5, D6.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (8 steps)

D never occurs on any right-hand side, so every key must contain D. The dependencies A→B, B→F, F→E and E→A form a reachability cycle among A, B, E, F. Starting from any one of those four attributes derives the other three, C and H through B→CFH, and G through F→EG. Consequently A+, B+, E+, F+ each equal {A, B, C, E, F, G, H}, missing only D. Thus AD, BD, DE and DF are candidate keys, and each is minimal. For completeness, any set containing none of A, B, E, F can include only C, D, G, H; its closure can at most add G via CH→G and can never reach that four-attribute cycle. Therefore every key includes at least one of A, B, E, F, and a minimal key includes exactly one together with D. There are precisely four candidate keys, option B.

Compute closures to establish keys and then prove the list exhaustive. D cannot be derived because it never appears on an FD right side, so it must be supplied. Any one of A, B, E, F reaches all the other members of that cycle and then C, H, G. Supplying D alongside one therefore determines all eight attributes. With none of A, B, E, F, the remaining C, D, G, Hcannot generate an entry point into the cycle. Consequently a minimal key consists of Dplus exactly one cycle member: four possibilities.

Original paper, page 12 · Answer key