CS FundamentalsVery hardGATE CS · Amazon/Microsoft placement

R(A, B, C, D, E) has functional dependencies CE → A, A → D, AC → DE, B → D. How many superkeys does R have?

  1. A. 3
  2. B. 6
  3. C. 2
  4. D. 8

Correct answer: B. 6

B and C never appear on a right side, so every key contains BC; the candidate keys are ABC and BCE. Supersets: 4 + 4 − 2 (ABCE is counted twice) = 6. 8 is the naive sum without inclusion–exclusion; 2 counts only the candidate keys, and 3 adds just R itself.

More DBMS and SQL questions

Exams that ask this topic