CS FundamentalsHardAmazon · Microsoft MCQ pattern

A relation R(A, B, C, D) has FDs A → BC and D → A (so D is also, indirectly, able to derive B and C). What are the candidate keys of R?

  1. A. Only A
  2. B. A and D
  3. C. AD only
  4. D. Only D

Correct answer: D. Only D

A⁺ = {A} → apply A→BC → {A,B,C}; D is still missing, so A alone is NOT a superkey. D⁺ = {D} → apply D→A → {A,D} → apply A→BC → {A,B,C,D} — covers every attribute, so D alone IS a key. Since A's closure never reaches D, A is not a superkey at all, leaving D as the sole, minimal candidate key.

More DBMS and SQL questions

Exams that ask this topic