简体   繁体   English

BCNF和3NF等效的条件

[英]Condition when BCNF and 3NF are equivalent

Statement - "If a table contains only one candidate key, the 3NF and the BCNF are equivalent." 语句-“如果表仅包含一个候选键,则3NF和BCNF是等效的。”
In the below image, relation is 3nf but not bcnf. 在下图中,关系为3nf,但不是bcnf。 But it has only one candidate key ie AB, so according to above statement it should be either both (3nf, bcnf) or nothing. 但是它只有一个候选密钥,即AB,因此根据上述声明,它应该既是(3nf,bcnf)也不是。 Can somebody explain what i am missing here ? 有人可以解释一下我在这里想念的吗? 在此处输入图片说明

In,simple words the given words can be written as 在简单的单词中,给定的单词可以写成

AB->C AB-> C

AB->D AB-> D

C->B C→B

In above relations,A,B,C are prime attributes and D is non-prime attributes 在上述关系中,A,B,C是素数属性,D 是非素数属性

Here,AB and AC are minimal Super keys 在这里,AB和AC是最小的超级键

Condition for 3NF and BCNF 3NFBCNF的条件

X->Y X-> Y

For BCNF, X should be Super key whether Y is prime or non-prime attribute 对于BCNF,无论Y是质数还是非质数属性, X均应为超级键。

For 3NF, X should be Super key only when Y is non-prime ,otherwise it is a optional one 对于3NF,仅当Y 为非质数时, X才应为超级键 ,否则为可选键

 BCNF and 3NF are equivalent when there are no **non-prime** attributes

Hope,it helps. 希望能帮助到你。

"If a table contains only one candidate key, the 3NF and the BCNF are equivalent." “如果一个表仅包含一个候选键,则3NF和BCNF是等效的。”

The second half, "the 3NF and the BCNF are equivalent", doesn't mean anything. 下半部分“ 3NF和BCNF等效”,没有任何意义。 What do you think it means? 您认为这意味着什么? The normal forms are different things. 正常形式是不同的东西。 BCNF requires a more restrictive condition than 3NF. BCNF比3NF需要更严格的条件。 So when a relation is in BCNF it has to also be in 3NF. 因此,当关系在BCNF中时,它也必须在3NF中。 So a relation can be in both normal forms at the same time. 因此,关系可以同时处于两种范式。

Presumably the quote is trying to say that, "if a table contains only one candidate key", then if it is in 3NF then it is also in BCNF. 大概引用是想说:“如果一个表只包含一个候选键”,那么如果它在3NF中,那么它也在BCNF中。 And this is correct, because a table that is in 3NF but not in BCNF has to have overlapping CKs (candidate keys). 这是正确的,因为3NF中但BCNF中没有的表必须具有重叠的CK(候选键)。 Here the CKs, ie sets of attributes that determine all attrbutes that don't contain a smaller such set, are AB & AC. 此处的CK(即确定所有属性的属性集)不包含较小的CK,即AB和AC。 Which overlap. 哪些重叠。 This table is in 3NF, but it's not in BCNF. 该表位于3NF中,但不在BCNF中。

(Note that the FDs that hold are not just ones you are explicitly told hold but all the ones that must hold when they do per Armstrong's axioms.) (请注意,持有的FD不仅是明确告知您持有的FD,而且是按照阿姆斯壮公理进行操作时必须持有的所有FD。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM