CS FundamentalsVery hardGATE CS

R(A, B, C, D, E, F, G) has functional dependencies A → B, BC → D, D → E, E → C and F → G. How many candidate keys does R have?

  1. A. 1
  2. B. 2
  3. C. 4
  4. D. 3

Correct answer: D. 3

A and F appear on no right side, so AF is in every key, and AF⁺ = ABFG. Adding any one of C, D, E closes the cycle (C → D via B, D → E, E → C), so the keys are ACF, ADF and AEF.

More DBMS and SQL questions

Exams that ask this topic