First Normal Form: All field values are non-decomposable atomic values. Fields such as personnel information and address do not meet the first normal form, because addresses can be subdivided into fields such as provinces and cities.
Second normal form: Each column is related to the primary key, and cannot only be related to a certain part of the primary key (joint primary key).
Third Normal Form: The third normal form needs to ensure that each column of data in the data table is directly related to the primary key and cannot be indirectly related.
In fact, there are not only three paradigms, but the school only teaches three major paradigms. For the paradigm of understanding, I think we can start from the following aspects
The role of paradigm
Reduces data redundancy and reduces hard drive occupancy, which improves storage efficiency (storage space was still quite expensive in the era when Paradigm came out)
Increase data consistency.
Abstract for easy understanding (entity-relationship)
Disadvantages of paradigm
Increases the difficulty of query and retrieval (there are so many associations, writing SQL is almost intoxicating)
Low query efficiency
The emergence of anti-paradigm
Denormalize to the first normal form or the second normal form, using redundant data to speed up data query
Although the storage efficiency is low, the current storage space cost is still relatively low.
Increase query speed, low-value data is redundant, greatly improving query data
The emergence of paradigm-free
The emergence of document databases (for example: mongodb) has an obvious impact on relational databases.
That’s all I’ve written, please let me know if I’m wrong.
The three major paradigms can be used just like definitions. That is, when designing database tables, the most basic thing to consider is these three paradigms. The first table field is finalized, that is, when designing fields in database tables, abstract fields are generally not considered. , that is, it does not consider the fields that can be subdivided, such as: address (not detailed), information (not detailed). The address can be subdivided into country and city to specific information, and it can also include name, age, etc. Fields are related, no redundancy, the table is independent ,Related attributes are associated to make the table into one and well mapped. The fields in the table cannot be mixed. For example, there are purchase records in the user information table and age in the order table
The last paradigm is direct correlation. The paradigm is considered to be in ascending order, and then the first two paradigms are satisfied, and then the third paradigm is considered. Whether the data in the table are directly related to each other, and whether there are direct dependencies on the fields, if there are dependencies, they are generally not considered
In some special cases, you can design a table structure that is inverse to the three normal forms. I won’t elaborate on it here, but I’ll also give you some ideas
First Normal Form: All field values are non-decomposable atomic values. Fields such as personnel information and address do not meet the first normal form, because addresses can be subdivided into fields such as provinces and cities.
Second normal form: Each column is related to the primary key, and cannot only be related to a certain part of the primary key (joint primary key).
Third Normal Form: The third normal form needs to ensure that each column of data in the data table is directly related to the primary key and cannot be indirectly related.
The role of paradigm
Reduces data redundancy and reduces hard drive occupancy, which improves storage efficiency (storage space was still quite expensive in the era when Paradigm came out)
Increase data consistency.
Abstract for easy understanding (entity-relationship)
Disadvantages of paradigm
Increases the difficulty of query and retrieval (there are so many associations, writing SQL is almost intoxicating)
Low query efficiency
The emergence of anti-paradigm
Denormalize to the first normal form or the second normal form, using redundant data to speed up data query
Although the storage efficiency is low, the current storage space cost is still relatively low.
Increase query speed, low-value data is redundant, greatly improving query data
The emergence of paradigm-free
The emergence of document databases (for example: mongodb) has an obvious impact on relational databases.
The three major paradigms can be used just like definitions.
That is, when designing database tables, the most basic thing to consider is these three paradigms. The first table field is finalized, that is, when designing fields in database tables, abstract fields are generally not considered. , that is, it does not consider the fields that can be subdivided, such as: address (not detailed), information (not detailed). The address can be subdivided into country and city to specific information, and it can also include name, age, etc.
Fields are related, no redundancy, the table is independent ,Related attributes are associated to make the table into one and well mapped. The fields in the table cannot be mixed. For example, there are purchase records in the user information table and age in the order table
The last paradigm is direct correlation. The paradigm is considered to be in ascending order, and then the first two paradigms are satisfied, and then the third paradigm is considered. Whether the data in the table are directly related to each other, and whether there are direct dependencies on the fields, if there are dependencies, they are generally not considered
In some special cases, you can design a table structure that is inverse to the three normal forms. I won’t elaborate on it here, but I’ll also give you some ideas