范式

Learn Boyce-Codd Normal Form (BCNF) - YouTube Boyce-Codd Normal Form (BCNF) | Database Normalization | DBMS - YouTube

1 NF

10:05

Rules

  1. 不允许用行顺序传达信息
  2. 不允许在同一列中混合数据类型
  3. 不允许没有 primary keytable
  4. 不允许重复的组

2 NF

13:25

  1. 关于 non-key attributesprime key attributes 的关系)
  2. 所有的 non-key attributes 必须依赖于整个 primary key(候选码)
  3. 等价于:have no partial dependency

3 NF

17:55

  1. non-key attributes 不依赖于 non-key attributes,即没有间接传递
  2. Each non-key attribute in a table should depend on the key , the whole key, and nothing but the key. (key: every candidate key )

BCNF

04:45

  1. 3 NF 的漏洞:01:49
  2. BCNF 的定义:every functional dependency in a table must be a dependency on a super key. 11:21
  3. Each attribute in a table should depend on the key , the whole key, and nothing but the key. (key: every candidate key )
  4. 所有的函数依赖集中左端的属性一定包含候选码

范式分解

无损连接性(内容是否等价)

  1. 分解后的关系自然连接的结果与分解前的关系相等

保持函数依赖(依赖是否等价)

NF 分解

BCNF 分解

BCNF Decomposition - YouTube 02:18

3 NF 分解