review——database (1)CH8-Relational Database Design

1.1NF(P328、P215)

In the relationalmodel, we formalize this idea that attributes do not have any
substructure. A domain is atomic if elements of the domain are considered to be
indivisible units. We say that a relation schema R is in first normal form (1NF) if
the domains of all attributes of R are atomic.

非第一范式的例子:

 

2.Boyce-Codd Normal Form

一般的分解为BCNF的方法:

 

 创建第三范式的原因:(BCNF的缺陷)

 

 3.3NF(Third Normal Form)

 

 

 4.函数依赖集的闭包

逻辑蕴含的定义:

闭包的定义:

 

Armstrong公理及其进一步推出的规则

进行求解的伪代码:

 

 

5.属性集的闭包

伪代码

 

6.正则覆盖

无关属性的定义:

 

正则覆盖的定义:

求解算法:

 

采用正则覆盖可以使得验证更加容易。

 

7.无损分解

 

判定将F分解为R1、R2是否是无损分解:

 

8.保持依赖

 

 检测是否保持依赖的算法1:

 

各种分解算法鉴于不在期末范围内,暂时用不到,使用时再现查。

 9.分解算法

(1)BCNF分解

part1:检验是否为BCNF的方法1

其中需要注意,如图片中所说,第二条对于分解的结果不适用,即对于分解的需要检查F+而非仅仅F。

 part2:检验是否为BCNF的方法2

 

 part3:BCNF分解算法

BCNF分解算法的伪代码:

 part4 3NF的分解算法的伪代码

 

8.5.4 比较BCNF和3NF

posted @ 2018-06-09 17:37  perplex  阅读(157)  评论(0编辑  收藏  举报