问题
Suppose a relation schema R(A,B,C)
and the FDs are
{A -> B, B -> C}
So the superkeys are {A}, {A,B}
Now if we decompose it into 3NF it will be
R1(A,B) with FD {A -> B} and R2(B,C) with FD {B -> C}
Is it in BCNF? I can't determine. Since B
was not a superkey in R
does {B -> C}
in R2
violates BCNF?
回答1:
{AB} is a superkey, but it's not a candidate key. (It's not a minimal superkey.) The decomposition
- R1(A B)
- R2(B C)
is in at least BCNF.
Informally, a relation is in BCNF if every arrow is an arrow out of a candidate key. B is a candidate key in R2.
The relation R is not in BCNF. The only candidate key in R is A; the FD B->C has an arrow that's not out of a candidate key.
In truth, both R1 and R2 are much stronger than BCNF. They're both in 6NF.
来源:https://stackoverflow.com/questions/23591784/is-this-relation-in-3nf-as-well-as-in-bcnf