3NF 分解过程 (伪代码)
- let Fc be the canonical cover(最小函数依赖集) for F, i = 0
- for each FD α → β Fc do
- if (none of Rj , j = 1, 2, . . . , i contains αβ) then
- i
- Ri = αβ
- if (none of Rj , j = 1, 2, . . . , i contains αβ) then
- if (none of Rj , j = 1, 2, . . . , i contains a candidate key for R) then
- i
- Ri = any candidate key for R
- return (R1, R2, . . . , Ri)