【数据库】范式

来源:互联网 发布:苏联知乎 编辑:程序博客网 时间:2024/06/01 09:48

几个概念:
主键:每个表特有的属性列。
非主属性:表中非主键的其他属性列。
完全依赖:非主属性完全依赖于主键,而不能只依赖于主键的一部分。
传递依赖:非主属性 A 依赖于非主属性 B, B 依赖于主键,则A有传递依赖。

这里写图片描述

范式:
(0)0NF:属性可再分,不具原子性。
(1)1NF:属性不可分,具有原子性。(新增原子性)
(2)2NF:1NF + 完全依赖 + 传递依赖。(新增完全依赖)
(3)3NF:2NF + 完全依赖 + 无传递依赖。(解决传递依赖问题)
(4)BCNF:3NF + 主键之间不存在任何依赖关系。

Normal Form:
(0)0NF(Un-normalized form):It is the simplest form of representing tables and does not conform to any of the forms of normalization.
(1)1NF(First normal form):The domain of each attribute contains only atomic values.
(2)2NF(Second normal form):A non-prime attribute is determined by the candidate keys, but not a part of any candidate key.
(3)3NF(Third normal form):All the attributes are determined only by the candidate keys.
(4)BCNF(Boyce–Codd normal form):Any candidate key is not determined by another.

0 0
原创粉丝点击