Database Normalization

Normalization

Defenition:Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of data

simply to say ,it is just a way to process the relationship to avoid unnecessary duplication of data and produce well-structured relations.

Normalization process

Normalization process

first normal form

No multivalued attributes
在这里插入图片描述

在这里插入图片描述

Second Normal form

Then we should find the primary key: Sid ,Course_id
every non-key attribute must be depedent on by the entire key,not just part of the primary key
在这里插入图片描述

therefore it is not in the second normal form.
to convert this realtion into second normal form,we have to make all non-primary attributes to be fully functionally depedent on the primary key.To do that ,we need to decompose the two or more relations.
在这里插入图片描述
在这里插入图片描述

3-NF

2NF plus no transitive depedencies (one attribute functionally determines a second,which functionally determines a third)
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

when we are handling with the 2NF ,there maybe transitive depedency ,then we should make it into much smaller relation,docompose the relation,this is called the 3NF.

更多请看study tonight DBM tutorial

发布了83 篇原创文章 · 获赞 18 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/Abudula__/article/details/84866692