CS FundamentalsModerateWipro · Cognizant pattern
R(A, B, C, D) has functional dependencies A → B and B → C. What is the candidate key of R?
- A. ABD
- B. A
- C. AD
- D. AB
Correct answer: C. AD
A⁺ = {A, B, C}, which misses D. D appears on no right-hand side, so it must be in every key; (AD)⁺ = {A, B, C, D}. ABD is a superkey but not minimal.
More DBMS and SQL questions
- Which statement about a clustered index is correct?
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- Transaction T2 reads a value that T1 has written but not yet committed; T1 later rolls back. What is this anomaly called?
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- A candidate key is best described as:
- In an ER diagram, entity sets Student and Course are related by a many-to-many relationship Enrols that has an attribute grade. What is…