【问题标题】:Boyce-Codd Normal Form explainBoyce-Codd 范式解释
【发布时间】:2012-09-25 04:11:37
【问题描述】:

根据 Boyce-Codd 范式定义,

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

 “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.

我看不懂的是上面两个关于范式的说法,

谁能给我一个例子?

谢谢!

【问题讨论】:

标签: database set rdbms database-normalization bcnf


【解决方案1】:

在我尝试解释之前的一些先决条件:

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

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

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

如果每个函数依赖X→Y,X是表的超键,则表在BCNF中。

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.

【讨论】:

  • 在定义之前使用“CK”。 “非键”应该是“非素数”或“非CK”。 “最小”需要解释。不是“如果”、“何时”。当每一个 non-trivial FD .... 不是“超级密钥”而是“超级密钥”。 “高级版”没有任何意义。 PS 请不要使用代码块来突出显示普通文本。 PS这并没有回答问题,而是询问引用的文字想说什么。
猜你喜欢
  • 2023-03-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-04-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-09-09
相关资源
最近更新 更多