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?
- A. 1 candidate key; 3NF
- B. 8 candidate keys; 3NF but not BCNF
- C. 1 candidate key; 2NF
- 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
- Assertion (A): Every relation schema with exactly two attributes is in BCNF. Reason (R): For R(X, Y), any non-trivial FD has a single…
- R(A, B, C, D, E) has functional dependencies CE → BD, DE → A, BD → E. Which of the following is the complete set of candidate keys of R?
- Table Node(id, parent) rows: (1, NULL), (2, 1), (3, 1), (4, 2), (5, 2), (6, 4), (7, 3). What does this query return? sql WITH RECURSIVE…
- R(A, B, C, D, E) has functional dependencies AC → BD, A → CD, C → D, D → A. Which of the following is the complete set of candidate keys…
- Σ = {C → AE, E → B, AE → C, D → C}. Consider the FD AE → C while computing a canonical cover. Which statement about extraneous attributes…
- Which statement about a FOREIGN KEY constraint in standard SQL is correct?