Consider a relation R(A, B, C, D, E) with the following three functional…
2022
Consider a relation R(A, B, C, D, E) with the following three functional dependencies.
𝐴𝐵 → 𝐶; 𝐵𝐶 → 𝐷; 𝐶 → 𝐸;
The number of super keys in the relation R is___________.
Attempted by 580 students.
Show answer & explanation
Correct answer: 8
The number of superkeys in the relation R is 8.
To find the number of superkeys, we first need to identify the candidate key(s) of the relation.
1. Finding the Candidate Key - A candidate key is a minimal set of attributes that can uniquely determine all other attributes in the relation. We can find it by first identifying the essential attributes—those that do not appear on the right-hand side (RHS) of any functional dependency.
Given FDs: AB → C, BC → D, C → E
Attributes on RHS: {C, D, E}
Attributes not on RHS: {A, B}
Since A and B are never determined by other attributes, they must be part of any candidate key. Let's find the closure of {A, B} to see if it determines all other attributes:
Start with {A, B}.
From AB → C, we add C. We now have {A, B, C}.
From C → E, we add E. We now have {A, B, C, E}.
From BC → D (since we have B and C), we add D. We now have {A, B, C, D, E}.
The closure (AB)+ contains all attributes of the relation R. Therefore, {A, B} is the only candidate key.
2. Finding the Number of Superkeys - A superkey is any set of attributes that contains a candidate key. In this case, any superkey must contain {A, B}.The remaining attributes in the relation are {C, D, E}. Any combination of these three attributes can be added to the candidate key {A, B} to form a valid superkey.
The number of possible combinations (subsets) of the remaining attributes {C, D, E} is 2³ (since there are 3 attributes).
2³ = 8
Therefore, there are 8 possible superkeys.
A video solution is available for this question — log in and enroll to watch it.