CS FundamentalsVery hardGATE CS

R(A, B, C, D, E, F, G) has the functional dependencies AB -> C, C -> D, D -> E, E -> C, F -> G, BG -> A and AE -> F. How many candidate keys does R have, and how many attributes are prime?

  1. A. 3 keys and 3 prime attributes
  2. B. 2 keys and 5 prime attributes
  3. C. 4 keys and 4 prime attributes
  4. D. 3 keys and 4 prime attributes

Correct answer: D. 3 keys and 4 prime attributes

Closure computation shows the candidate keys are ['AB', 'BF', 'BG'], whose union is ABFG. The prime attributes are exactly those appearing in some candidate key.

More DBMS and SQL questions

Exams that ask this topic