CS FundamentalsVery hardProduct company interview · GATE level
R(A, B, C, D, E, F) has functional dependencies AB → C, C → A, C → D, D → B and E → F. How many candidate keys does R have, and what is its highest normal form?
- A. 2 candidate keys; 1NF
- B. 3 candidate keys; 2NF
- C. 3 candidate keys; 1NF
- D. 1 candidate key; 3NF
Correct answer: C. 3 candidate keys; 1NF
E appears on no right-hand side, so every key contains E, and E alone gives only {E, F}. CE: C gives A and D, D gives B, E gives F - a key. ABE: AB gives C, then D, and E gives F - a key. ADE: D gives B, then AB gives C - a key. No other minimal set works (BE, DE and AE do not reach C), so there are 3 keys: CE, ABE, ADE. F is the only non-prime attribute and E → F makes it depend on a proper part of every key, a partial dependency. So R is not in 2NF and its highest normal form is 1NF.
More DBMS and SQL questions
- R(A, B, C, D, E) has functional dependencies AB → C, C → D, D → E and E → A. Which statement is correct?
- 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?