Skip to content
Official PYQ · 2022

GATE CS 2022 Q21 — Normal Forms

Explain with AI
Consider a relation R(A,B,C,D,E)R (A, B, C, D, E) with the following three functional dependencies.

AB→C;  BC→D;  C→E;AB \rightarrow C; \; BC \rightarrow D; \; C \rightarrow E;

The number of superkeys in the relation RR is ______________ .
View worked solution

Answer: 8

To find the number of superkeys for the relation R(A,B,C,D,E)R(A, B, C, D, E), we first determine the candidate keys of the relation.

Step 1: Identify the Candidate Key(s)

Let's analyze the given functional dependencies (FDs):

  • AB→CAB \rightarrow C
  • BC→DBC \rightarrow D
  • C→EC \rightarrow E

Notice that the attributes AA and BB do not appear on the right-hand side of any functional dependency. Therefore, AA and BB must be part of every candidate key.

Let's compute the attribute closure of {A,B}\{A, B\}:

{A,B}+={A,B}={A,B,C}(since AB→C)={A,B,C,D}(since BC→D)={A,B,C,D,E}(since C→E)\begin{aligned} \{A, B\}^+ &= \{A, B\} \\ &= \{A, B, C\} \quad \text{(since } AB \rightarrow C\text{)} \\ &= \{A, B, C, D\} \quad \text{(since } BC \rightarrow D\text{)} \\ &= \{A, B, C, D, E\} \quad \text{(since } C \rightarrow E\text{)} \end{aligned}

Since {A,B}+\{A, B\}^+ contains all the attributes of the relation RR, {A,B}\{A, B\} is a candidate key. Since AA and BB are essential, there are no other candidate keys.

Step 2: Calculate the Number of Superkeys

A superkey is any set of attributes that contains a candidate key. Since {A,B}\{A, B\} is the unique candidate key, any superkey of RR must contain both AA and BB.

The remaining attributes that can be optionally included in the superkey are {C,D,E}\{C, D, E\}.

The number of ways to choose a subset from these 33 remaining attributes is:

23=82^3 = 8

Thus, the total number of superkeys is 8.

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

Published
Report a correction
Keep exploringMore Normal Forms questions