Paradigm paradigm SQL database in SQL tutorial (vi)

1. What is the paradigm

Relations in a relational database to meet certain requirements, to meet different levels of requirements referred to different paradigms. After a low-level mode decomposition paradigm can be converted into a high collection paradigm. This is called normalization.

2. First Normal Form

Each column of data cells are not subdivided.
Such as: student table, there are three fields Student ID Name Home Address (XXX XXX City, Guangdong Province), since the address field is then split so does not meet the first paradigm.
Transformation of: school name City of birth Birth provinces both to meet the first paradigm

3. Second Normal Form

In first normal form, and each non-primary property is totally dependent on a candidate code
such as: Student table has five fields Science Course No. Number Name Date of Birth performance, wherein the primary key student number, and the score does not depend on school, so does not meet the second paradigm. Course number should be deleted, and then build an enrollment form.

4. Third Paradigm

Each non-primary property code depends on neither transmission nor partially dependent on the code.
Such as: students have to learn table No. Name School dormitory floor school, college dorm floor dependence and dependence and which departments. Appeared on the dormitory floor transitive dependencies number of school. It does not meet the third paradigm.
Conduct change the table: table1: Student ID Name School; table2: College floor

5.BCNF BC paradigm

All non-primary attributes of each code is completely dependent
are entirely dependent on his do not contain all the main properties of each code
is not dependent on any set of attributes and a set of attributes any non codes.
As students learn table name, age, number of each class in the table attributes are not subdivided, and each attribute dependence and student number, and the dependency does not exist between the transmission attributes, attributes third paradigm. And all properties are dependent on the student number.
So the table to meet BC paradigm. And the difference between the third difference BC Paradigm paradigm is to see there is no addition to the candidate code can be completely dependent on other attributes and attribute non-code.

6. Fourth Paradigm

Paradigm refers to four non-trivial and does not allow the non-functional dependency multivalued dependencies between attributes. What is multi-valued dependency, such as a high school student table No. Name enrollment numbers, each value in the table that is completely dependent on the primary key. But a student select multiple courses,
which produced a multi-valued dependencies.

7. Summary

Guess you like

Origin www.cnblogs.com/ghostdot/p/12604428.html