CS FundamentalsHardProduct placement · DBMS interview

R(A1, A2, …, A8) has the FDs A1 → A2, A2 → A3, …, A7 → A8 and A8 → A1. How many candidate keys does R have, and what is its highest normal form?

  1. A. 1 candidate key; 3NF
  2. B. 8 candidate keys; 3NF but not BCNF
  3. C. 1 candidate key; 2NF
  4. D. 8 candidate keys; BCNF

Correct answer: D. 8 candidate keys; BCNF

The FDs form a cycle, so every single attribute determines all the others: A1, …, A8 are all candidate keys. Every FD then has a key on its left, so R is in BCNF.

More DBMS and SQL questions

Exams that ask this topic