CS FundamentalsVery hardProduct company interview · GATE level
R(A, B, C, D, E) has functional dependencies AB → C, C → D, D → E and E → A. Which statement is correct?
- A. 4 candidate keys; R is in 3NF but not BCNF, and only one of the given FDs violates BCNF
- B. 4 candidate keys; R is in BCNF
- C. 1 candidate key (AB); R is in 2NF but not 3NF
- D. 4 candidate keys; R is in 3NF but not BCNF, and three of the given FDs violate BCNF
Correct answer: D. 4 candidate keys; R is in 3NF but not BCNF, and three of the given FDs violate BCNF
B is on no right-hand side, so every key contains B. AB gives C, D, E: a key. BC gives D, E, A: a key. BD gives E, A, C: a key. BE gives A, C, D: a key. With keys AB, BC, BD and BE every attribute is prime, so no FD can break 3NF. For BCNF every determinant must be a superkey: AB is, but C, D and E alone are not, so C → D, D → E and E → A all violate BCNF. Stopping at the first key AB makes C → D look like a transitive dependency of a non-prime attribute, which is the trap behind the 2NF answer.
More DBMS and SQL questions
- The set F = { A → B, BC → D, AC → D, D → E, CE → A } holds on R(A, B, C, D, E). Which of the following dependencies is redundant, i.e. can…
- R(A, B, C, D) with functional dependencies A → B, B → C and C → D is decomposed into R1(A, B), R2(B, C) and R3(A, D). Which statement…
- R(A, B, C, D, E) has functional dependencies A → B, BC → D, D → AE and E → C. How many of the following dependencies are logically…
- A relation r(A, B, C, D) currently holds exactly these five tuples: (1, 2, 3, 4) (1, 2, 5, 6) (2, 2, 3, 4) (3, 4, 5, 4) (3, 4, 3, 6) How…
- Consider the schedule R2(A); R3(B); W1(A); R2(C); W1(C); W2(B); R4(A); W4(C). Which statement is correct?
- Consider the schedule R1(A); W2(A); W2(B); W1(A); W1(B); W3(A); W3(B). Which statement is correct?