CS FundamentalsVery hardAmazon · Microsoft MCQ pattern
R(A, B, C, D) has functional dependencies A → B, C → D, giving candidate key(s) AC. How many superkeys does R have in total?
- A. 4
- B. 3
- C. 5
- D. 15
Correct answer: A. 4
Every subset of attributes whose closure covers all of R is a superkey. Enumerating all 15 non-empty subsets and testing each one's closure gives exactly 4 superkeys in total (the candidate keys plus every superset of them).
More DBMS and SQL questions
- R(A, B, C, D, E) has functional dependencies A → BC, CD → E, E → A. What are the candidate key(s) of R?
- R(A, B, C, D, E) has functional dependencies A → BC, CD → E, E → A, giving candidate key(s) AD, CD, DE. How many superkeys does R have in…
- R(A, B, C, D) has functional dependencies AB → C, C → D, D → A. What are the candidate key(s) of R?
- R(A, B, C, D) has functional dependencies AB → C, C → D, D → A, giving candidate key(s) AB, BC, BD. How many superkeys does R have in total?
- R(A, B, C, D, E) has functional dependencies A → B, B → C, C → D, D → E. What are the candidate key(s) of R?
- R(A, B, C, D, E) has functional dependencies A → B, B → C, C → D, D → E, giving candidate key(s) A. How many superkeys does R have in total?