-- Sep. 26 In-Class Exercise Thread
Let R0 = R(A, B, C, D, E) and its FDs, S0 = {A → BC, B → D, D → E}
A → BC is a nontrivial FD. {A}+ = {A, B, C, D, E}, so A is a superkey.
B → D is a nontrivial FD. {B}+ = {B, D, E}, so B is not a superkey. This FD violates BCNF, so we split the table.
R1(B, D, E) (attributes = {B}+)
R2(A, B, C) (attributes = B and everything in R0 that isn't in {B}+)
S1 = {B → D, D → E}
S2 = {A → BC}
We see that R2 is in BCNF, so we leave that relation alone. Looking at the FDs of R1,
B → D is a nontrivial FD. {B}+ = {B, D, E}, so B is a superkey.
D → E is a nontrivial FD. {D}+ = {D, E}, so D is not a superkey. This FD violates BCNF, so we split R1.
R3(D, E) (attributes = {D}+)
R4(B, D) (attributes = D and everything in R1 that isn't in {D}+)
S3 = {D → E}
S4 = {B → D}
So R1 = R3(D, E) ∪ R4(B, D)
Both of these new relations have FDs that are nontrivial, and all the LHS of the FDs are superkeys, so they're all in BCNF and we're done. We return the union of the derived relations.
Answer: R0 = R2(A, B, C) ∪ R3(D, E) ∪ R4(B, D)
(
Edited: 2018-09-27)
Let R0 = R(A, B, C, D, E) and its FDs, S0 = {A → BC, B → D, D → E}
A → BC is a nontrivial FD. {A}+ = {A, B, C, D, E}, so A is a superkey.
B → D is a nontrivial FD. {B}+ = {B, D, E}, so B is not a superkey. This FD violates BCNF, so we split the table.
R1(B, D, E) (attributes = {B}+)
R2(A, B, C) (attributes = B and everything in R0 that isn't in {B}+)
S1 = {B → D, D → E}
S2 = {A → BC}
We see that R2 is in BCNF, so we leave that relation alone. Looking at the FDs of R1,
B → D is a nontrivial FD. {B}+ = {B, D, E}, so B is a superkey.
D → E is a nontrivial FD. {D}+ = {D, E}, so D is not a superkey. This FD violates BCNF, so we split R1.
R3(D, E) (attributes = {D}+)
R4(B, D) (attributes = D and everything in R1 that isn't in {D}+)
S3 = {D → E}
S4 = {B → D}
So R1 = R3(D, E) ∪ R4(B, D)
Both of these new relations have FDs that are nontrivial, and all the LHS of the FDs are superkeys, so they're all in BCNF and we're done. We return the union of the derived relations.
Answer: R0 = R2(A, B, C) ∪ R3(D, E) ∪ R4(B, D)