First paradigm, second paradigm, third paradigm, paradigm
First paradigm, second paradigm, third paradigm, first paradigm
If all the attributes of a relational model R are basic data items that cannot be divided, then R is 1NF (that is, R conforms to the first paradigm ).
Two points:
1. Each field can only store a single value
The course has two values, which do not conform to the first paradigm and can be changed as follows:
2. Each record must be identified by a unique primary key.
Duplicate groups appear here, which also does not meet the first paradigm. Because of the lack of a unique identifier code, you can change it
Second paradigm
If the relational model rε 1NF (that is, R conforms to the first paradigm) and every non-primary attribute is completely dependent on the R code, rε 2NF (that is, R conforms to the second paradigm ).
The table code here is (student ID, course). You can determine the system name, dormitory, and score, or the three items depend on the first two items.
- Full dependence on scores (student ID, course)
- The system name depends on (student ID, course), that is, the system name can be determined by knowing the student ID or course.
- Part of the dormitory building depends on (student ID, course), that is, the dormitory building can be determined by knowing the student ID or course.
Because the non-primary attribute is named, the dormitory building is not completely dependent on and code, and does not conform to the second paradigm. You can change it
Table 1
Third paradigm
If the relational mode rε 3NF (that is, R conforms to the third paradigm), neither the Code nor the code is partially dependent on each non-primary attribute.
The above table 2 does not conform to the third paradigm. This is because you know the system name, and you also know the dormitory building. The dormitory building transmission relies on code (student ID) and can be divided
In the database, how is the first, second, and third paradigm differentiated?
First paradigm: (1NF) Non-duplicate Columns
Second paradigm: (2NF) attributes depend entirely on primary keys
Third paradigm: (3NF) attributes do not depend on other non-primary attributes
The main problem is the concept, but it is still dizzy, there is no way, the concept is the concept, combined with the actual understanding of it.
The detailed explanation is as follows:
Zhidao.baidu.com/question/98317025.html? Fr = ala0
Explains the meaning of the first paradigm, the second paradigm, and the third paradigm;
1NF: It emphasizes the atomicity of the column, that is, the column cannot be further divided into several other columns.
Second Paradigm (2NF): 1NF is the first, and it contains two parts. One is that the table must have a primary key, and the other is that columns not included in the primary key must be completely dependent on the primary key, instead of relying only on a portion of the primary key.
3NF: 2NF first. In addition, non-primary key columns must be directly dependent on the primary key and cannot be transferred. That is, it cannot exist: non-primary key column A depends on non-primary key column B, and non-primary key column B depends on the primary key.