3NF和BCNF中都存在这种关系吗? [英] Is this relation in 3NF as well as in BCNF?
问题描述
假设关系模式 R(A,B,C)
且FD为
{A-> B,B-> C}
{A -> B, B -> C}
所以超键是 {A },{A,B}
现在,如果我们将其分解为 3NF ,它将是
Now if we decompose it into 3NF it will be
带有FD {A-> B}的R1(A,B)和带有FD {B-> C}的R2(B,C)
R1(A,B) with FD {A -> B} and R2(B,C) with FD {B -> C}
在 BCNF 中吗?我无法确定。由于 B
不是 R的超键,所以
{B->
违反了 BCNF ? R2
中的C}
Is it in BCNF? I can't determine. Since B
was not a superkey in R
does {B -> C}
in R2
violates BCNF?
推荐答案
{AB}是超键,但不是候选键。 (这不是最小的超键。)分解
{AB} is a superkey, but it's not a candidate key. (It's not a minimal superkey.) The decomposition
- R 1 ( A B)
- R 2 ( B C)
- R1(A B)
- R2(B C)
至少在 BCNF中。
is in at least BCNF.
非正式地,如果每个箭头都是候选键的 out ,则关系在BCNF中。 B 是R 2 中的候选键。
Informally, a relation is in BCNF if every arrow is an arrow out of a candidate key. B is a candidate key in R2.
在BCNF中,关系R为 not 。 R中唯一的候选键是A; FD B-> C的箭头不是候选键的 。
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.
实际上,两个R 1 和R 2 比BCNF强得多。他们俩都是6NF。
In truth, both R1 and R2 are much stronger than BCNF. They're both in 6NF.
这篇关于3NF和BCNF中都存在这种关系吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!