CS FundamentalsVery hardGATE

Using the same R(A, B, C, D, E) with AB → CDE and E → B, how many superkeys does R have in total?

  1. A. 8
  2. B. 9
  3. C. 31
  4. D. 12

Correct answer: D. 12

The candidate keys are AB and AE. Testing every subset's closure directly gives 12 superkeys in total: AB, ABC, ABD, ABCD, AE, ABE, ACE, ABCE, ADE, ABDE, ACDE, ABCDE. The overlap happens because E → B means any set containing A and E also contains (via closure) B, so it automatically becomes a superset of the key AB too — that is why there are more than the 8 you'd get from AB's supersets alone.

More DBMS and SQL questions

Exams that ask this topic