Three commonly used paradigms in database design

数据库设计的三大范式说白了就是数据库设计的最基本的三条要遵守的规矩,
当然,不止这三条,还有第四范式、第五范式、巴斯-科德范式。
而下面要说的着三大范式则是最基础的,如果这三个都做不到的话,
那对数据处理的影响可能就比较大了。

First Normal Form (1NF) : Fields are indivisible, and each field is at the atomic level;
this may be easier to talk about. For example, if you create a student table, you must not put the student number and student name in one In the field, in this case, you will know how troublesome it is when you use the data.
The second normal form (2NF) : There is a primary key, but the primary key field depends on the primary key; the
second normal form is also based on the first normal form. For example, I create a table with an auto-incrementing primary key. At this time, the following fields are not You can plug whatever you want. Anyway, it is the auto-increment primary key. No matter what you plug, it can be dependent on the primary key. Then the database is not messed up, it will definitely not be like this, don’t worry, this requires the third paradigm flash Bright debuted.
Third Normal
Form (3NF) : Non-primary key fields cannot depend on each other; this is of course based on the second normal form. For example, I created a student table, and the student table also contains information such as the number of the head teacher and the name of the head teacher , This is definitely not appropriate, because these need to be created in another class teacher table, and this table only needs to keep a number or name to associate with the class teacher table.

Guess you like

Origin blog.csdn.net/qq_37823979/article/details/107480297