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?

  1. A. 4
  2. B. 3
  3. C. 5
  4. 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

Exams that ask this topic