CS FundamentalsModerateGATE CS (PYQ pattern)
R(A, B, C, D, E) has the functional dependencies A → B, BC → D, D → E and E → A. The number of candidate keys of R and its highest normal form are:
- A. 4 keys; BCNF
- B. 2 keys; 2NF only
- C. 4 keys; 2NF only
- D. 4 keys; 3NF but not BCNF
Correct answer: D. 4 keys; 3NF but not BCNF
C must be in every key, and A, B, D, E all determine each other via C: AC, BC, CD and CE are the 4 keys. Every attribute is therefore prime, so R is in 3NF, but A → B has a non-superkey determinant, so R is not in BCNF.
More DBMS and SQL questions
- Consider the schedule S: r1(A) r3(B) r2(C) w2(A) r4(C) w4(B) r1(D) r3(D), where ri/wi is a read/write by transaction Ti. How many distinct…
- A B+ tree on 8-byte keys uses 4096-byte blocks. An internal node holds p tree pointers (8 bytes each) and p − 1 keys. A leaf holds q (key…
- E(id, dept) = (1, 10), (2, 10), (3, 20), (4, 30), (5, NULL), (6, 20), (7, 40) and D(did, loc) = (10, X), (20, Y), (20, X), (30, Y), (50…
- S(v) holds the nine rows 10, 20, 20, 30, 30, 30, 40, 40, 50. The query SELECT SUM(v) OVER (ORDER BY v) FROM S uses the default frame. What…
- Emp(id, dept, sal) = (1, A, 50), (2, A, 70), (3, A, NULL), (4, B, 40), (5, B, 60), (6, B, 60), (7, NULL, 90), (8, C, 30). How many rows…
- Ed(a, b) = (1, 2), (1, 3), (2, 4), (3, 4), (4, 5), (4, 6), (5, 7), (6, 7), (2, 5) is a directed acyclic graph. The query WITH RECURSIVE…