GATE Computer Science · Databases, Theory of Computation, and Compiler Design · hard
Consider a relation schema R(A, B, C, D, E) with the functional dependency set F = {AB -> C, C -> D, D -> B, D -> E}. Which two attribute sets are candidate keys of relation R? (Select two.)
Published · Last updated · checked before publication — how we verify questions
Options
Answers: A. Candidate key AB because (AB)+ = {A, B, C, D, E} and A+ or B+ alone is smaller; C. Candidate key AC because C -> D -> B and D -> E give (AC)+ = {A, B, C, D, E}
Attributes A never appear on the right-hand side of any FD, so A must be in every candidate key. A+ = {A}. Test AB: (AB)+ = {A, B, C, D, E} = R, so AB is a candidate key. Since C -> D -> B and D -> B, test AC: (AC)+ = {A, C, D, B, E} = R, and test AD: (AD)+ = {A, D, B, E, C} = R. Thus AB, AC, and AD are minimal superkeys (candidate keys).
Why the other options are wrong
- B. Candidate key BCD because B, C, and D appear in the functional dependencies — Attribute A never appears on the right-hand side of any FD, so (BCD)+ = {B, C, D, E}, missing A.
- D. Candidate key DE because D determines both B and E directly in dependency set F — (DE)+ = {D, B, E} which misses both A and C, so DE is not a superkey.
More Databases, Theory of Computation, and Compiler Design questions
- Which two statements regarding formal language classes and bottom-up LR parsers are always true? (Select two.)
- Consider two concurrent transactions T1 and T2 in schedule S: R1(X), W2(X), W1(Y), R2(Y). Which two statements about…
- Consider a relation R(A, B, C) with functional dependencies F = {AB -> C, C -> B}. What is the highest normal form…
All Databases, Theory of Computation, and Compiler Design questions and the topic overview →
GATE is a mark of the Indian Institute of Science and the Indian Institutes of Technology. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by the GATE Committee.