CS FundamentalsVery hardHCLTech · Infosys placement pattern

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 total?

  1. A. 15
  2. B. 31
  3. C. 14
  4. D. 13

Correct answer: C. 14

Every subset of attributes whose closure covers all of R is a superkey. Enumerating all 31 non-empty subsets and testing each one's closure gives exactly 14 superkeys in total (the candidate keys plus every superset of them).

More DBMS and SQL questions

Exams that ask this topic