prerequisite knowledge
- What is a keycode?
If an attribute or a set of multiple attributes {A,B,C,D….} satisfies the following conditions, it is called the key code of the relation R. - These property functions determine all other properties of the relationship.
No proper subset of A,B,C,D….} can functionally determine other properties of R, that is, {A,B,C,D….} must be minimal.
What is the main attribute?
The property where the key code is located becomes the primary property.What is a non-primary attribute?
Properties that are not key codes are called non-primary properties.Example:
For example, in the above figure,Sno
sumCname
is the main attribute, and the others are non-main attributes.{Sno,Cname}
for the key code.
four paradigms
- first normal form
If a relational schema is in 所有属性都是不可分割的基本属性
the first normal form
- second normal form
If a relational schema is in first normal form, where 所有非主属性都完全函数依赖于键码
, is in second normal form
- third normal form
If a relational schema is in first normal form, where 所有非主属性都不传递依赖于键码
, is in third normal form
- BC paradigm
If a relational schema is in first normal form, where 所有属性都不传递依赖于键码
, is in BC normal form