繁体   English   中英

博伊斯·科德范式解释

[英]Boyce-Codd Normal Form explain

根据Boyce-Codd范式定义,

如果对F +中的所有X-> A -A是X的子集(称为琐碎FD),或-X是R的超键,则带有FD的Reln R F在BCNF中。

 “R is in BCNF if the only non-trivial FDs over R are key constraints.”

 If R in BCNF, then every field of every tuple records information that 
 cannot be inferred using FDs alone.

我不明白的是以上关于规范形式的两个陈述,

有人可以给我一个例子吗?

谢谢!

在我尝试解释之前,必须满足一些先决条件:

非密钥属性 :不属于任何候选密钥的属性称为非密钥/非主要属性。

超键 :表中的一组属性,其值可用于唯一标识元组。 候选键是标识元组所必需的最小属性集; 这也称为最小超键。

现在,BCNF是3NF的高级版本,比3NF更严格。

如果每个功能依赖项X→Y,则表在BCNF中, X是表的超级键

Consider a relation : R(A,B,C,D)

The dependencies are:

A->BCD

BC->AD

D->B

So, Candidate keys(or minimal super keys) are A and BC.

But in dependency: D->B, D is not a superkey.

Hence it violates BCNF form.

We can break this relation into R1 and R2 as:
R1(A,D,C) and R2(D,B) to get BCNF.

暂无
暂无

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

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