【DBS】Lecture 06. Relational Database Design

First Normal Form

atomic

Functional dependencies

The functional dependency α → β holds on R if and only if for any legal relations r(R), whenever any two tuples t1 and t2 of r agree on the attributes α, they also agree on the attributes β, i.e., t1[α] = t2[α] ⟹ t1[α] = t2[β]

Trivial: α → β, if β ⊆ α (平凡的函数依赖)

Non-trivial: α → β , if β ⊈ α (非平凡的函数依赖)

Closure

The set of all functional dependencies logically implied by F is the closure of F, denoted by F+ (函数依赖集F的闭包)

E.g., F = {A → B, B → C}, F+ = {A → B, B → C, A → C, A α A, AB → A, AB → B, AC → C, A → BC, …}

Armstrong’s Axioms provide inference rules to find F+.

We can find all of F+ by applying Armstrong’s Axioms:

If β ⊆ α, then α → β (reflexivity, 自反律) — trivial

If α → β, then ?α → ?β (?α → β) (augmentation, 增补律)

If α → β, and β → ?, then α → ? (transitivity, 传递律)

If α → β and α → ? holds, then α → β? holds (union, 合并律)

If α → β? holds, then α → β and α → ? holds (decomposition, 分解律)

If α → β and β? → δ holds, then α? → δ holds (pseudotransitivity, 伪传递律)

Canonical cover(正则覆盖)

minimal set of functional dependencies in F

Dependency preservation(依赖保持)

lossless-join 无损分解

$R_1 \bigcap R_2 \rightarrow R_1 or R_1 \bigcap R_2 \rightarrow R_2$

Boyce-Codd Normal Form

在这里插入图片描述

3NF

在这里插入图片描述

If a relation is in BCNF, it is in 3NF.



另外一些相关的博文:

https://www.cnblogs.com/langdashu/p/5924082.html

BCNF 无损分解:https://blog.csdn.net/panxiqie___/article/details/38899021