NORMALIZATION is a database design technique that organizes tables in a manner that reduces redundancy and dependency of data. Normalization divides larger tables into smaller tables and links them using relationships. The purpose of Normalization is to eliminate redundant (useless) data and ensure data is stored logically.
范式是组织表的方式,目的是减少数据冗余和依赖。它使用关系将大表划分成若干个小表。
范式还在不断的向高发展,目前已在讨论6NF,但是在应用中一般用到最高3NF
一、1NF:每一列都是不可分割的基本数据项(确保每列保持atom)
不满足1NF例子:
此表不符合要求,因为ingredients字段中含有多个类型相同的值,若此时我要查找milk,将会是灾难。
二、2NF:满足1NF,主键决定非主属性值
1.what is dependency?
A depend on B
翻译是B决定A 或者 A取决于B
- Table is in 1NF (First norma