CS FundamentalsVery hardProduct company interview · GATE level

A relation R(A, B, C, D, E) has FDs AB → CDE and E → B. What are the candidate key(s) of R?

  1. A. AB and AE
  2. B. Only AB
  3. C. Only AE
  4. D. ABE

Correct answer: A. AB and AE

(AB)⁺: {A,B} → apply AB→CDE → {A,B,C,D,E} — covers all, so AB is a candidate key. (AE)⁺: {A,E} → apply E→B → {A,B,E} → now AB present, apply AB→CDE → {A,B,C,D,E} — also covers all, so AE is a candidate key too. Neither A, B, nor E alone closes to everything, so both AB and AE are minimal: two candidate keys.

More DBMS and SQL questions

Exams that ask this topic