FDS
Compute the closure of the following set F of functional dependencies for relation schema R = {A, B, C, D, E}.
A -> BC
CD -> E
B -> D
E -> A
List the candidate keys for R.
ANS=
-
Reflexivity: If X is a subset of Y, then Y is functionally dependent on X. (X → Y)
-
Augmentation: If X → Y, then XZ → YZ for any set of attributes Z.
-
Transitivity: If X → Y and Y → Z, then X → Z.
-
A -> BC
-
CD -> E
-
B -> D
-
E -> A
-
A+ (Closure of A):
A+ = ABC. -
B+ (Closure of B):
B+ = BD. -
C+ (Closure of C):
- C is already in C.
-
D+ (Closure of D):
- D is already in D.
-
E+ (Closure of E):
E+ = EA. -
AB+ (Closure of AB):
- AB+ = ABC (from A+).
-
AC+ (Closure of AC):
- AC+ = AC
-
AD+ (Closure of AD):
- AD+ =
-
BC+ (Closure of BC):
- BC+ = BC
-
BD+ (Closure of BD):
- BD+ = BD
-
CD+ (Closure of CD):
- CD+ = CDE
-
ABC+ (Closure of ABC):
- ABC+ = ABC
-
ACD+ (Closure of ACD):
- ACD+ = ACDE
-
ABCDE+ (Closure of ABCDE):
- ABCDE+ = ACDE (from ACD+).
The closure of the given set F for the relation schema R = {A, B, C, D, E} is {A, C, D, E}.
Possible candidate keys:
- ACDE
- ABCE
Both ACDE and ABCE are candidate keys for the relation schema R.