Skip to content
Official PYQ · 2014

GATE CS 2014 Set 2 Q21 — Integrity Constraints

Explain with AI
The maximum number of superkeys for the relation schema R(E,F,G,H)R(E,F,G,H) with EE as the key is _____.
View worked solution

Answer: 8

A superkey is a set of attributes that contains a candidate key.

For the given relation schema R(E,F,G,H)R(E, F, G, H), the candidate key is EE. Therefore, any superkey of RR must contain the attribute EE.

The remaining attributes in the relation are FF, GG, and HH. Each of these 3 attributes can either be included or excluded from the superkey:

  • Attribute FF: 2 choices (present or absent)
  • Attribute GG: 2 choices (present or absent)
  • Attribute HH: 2 choices (present or absent)

Thus, the total number of superkeys is given by:

23=82^3 = 8

The 8 superkeys are: {E}\{E\}, {E,F}\{E, F\}, {E,G}\{E, G\}, {E,H}\{E, H\}, {E,F,G}\{E, F, G\}, {E,F,H}\{E, F, H\}, {E,G,H}\{E, G, H\}, and {E,F,G,H}\{E, F, G, H\}.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Integrity Constraints questions