Consider a relation schema R A B C D E G and set of function
Consider a relation schema R (A, B, C, D, E, G) and set of functional dependencies: FD = {A BG, C D, CD E, G E, C E} that relations on schema R must satisfy. Find a lossless-join decomposition of R into BCNF. Do NOT do any unnecessary decompositions.
Solution
By calculating an attribute closure we can see the candidate keys are:
AB, BC, and BD
Attribute closure:
A -> A
B -> B
C -> ACD
D -> AD
AB -> ABCD
AC -> ACD
AD -> AD
BC -> ABCD
BD -> ABCD
CD -> ACD
ABC -> ABCD
ABD -> ABCD
ACD -> ACD
BCD -> ABCD
If we start to decompose on C->D then D->A and AB->C
If we start to decompose on D->A then AB->C
