CS FundamentalsHardProduct company interview · GATE level

R(A, B, C, D, E) has functional dependencies A → BC, CD → E, E → A. What are the candidate key(s) of R?

  1. A. ABCDE
  2. B. ADB
  3. C. AD
  4. D. AD, CD, DE

Correct answer: D. AD, CD, DE

Computing each candidate attribute set's closure under A → BC, CD → E, E → A, the minimal sets whose closure is all of {A,B,C,D,E} are: AD, CD, DE. Any proper subset of these fails to close to every attribute, and any superset is a non-minimal superkey.

More DBMS and SQL questions

Exams that ask this topic