最佳化Table Design三范式

最佳化 Table Design
將 Table 的資料庫分解為較小的 Table 直到每個 table 的每個 field 都 depend on 該 table 的 key why?
降低重複性 (redundancy) ?指資料之儲存?
清除不一致性(Consistency) ?指資料之異動?

设计三范式:

(1)Frist Normal Form (1NF)

"每一資料欄只含一個值。"
检查有无具有重复值的属性,有则将其移到新的实体中。

(2)Second Normal Form (2NF)

"所有不是 Primary Key 的資料欄與 Primary key 皆有fully functional Dependency。"
删除不是依赖于整个键的数据项,其它属性与主键一一对应。

(3)Third Normal Form (3NF)

"所有不是 primary key 的資料欄間沒有 full functional dependency。"
删除依赖属性而不完全依赖主键的项,非主键项之间不能有一一对应关系。

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus