Is this relation in 3NF as well as in BCNF?

淺唱寂寞╮ 提交于 2020-01-06 12:51:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!