Hello, everyone!
Today I'm going to introduce you DAYU
First normal form
All attributes should be atomic, that is, each attribute can only store indivisible atomic data items, not non-atomic data items such as collections, arrays, and records.
All values stored in the attribute must have the same form.
The attribute must have a unique name.
Each record must be uniquely identifiable.
In the above figure, the "customer" logical data entity stores the "contract date". If this customer signs multiple contracts, the "contract date" attribute will store multiple values. Therefore, in violation of the first paradigm, the "customer" logic should be The data entity is split into two logical data entities, "customer" and "contract".
Second normal form
The attributes of logical data entities are completely dependent on the primary key. The so-called complete dependence means that there cannot be attributes that only depend on a part of the primary key. If it exists, then the corresponding parts of these attributes and the primary key should be separated to form a new logical data entity.
Before satisfying the second normal form, the first normal form must be satisfied.
The "student name", "student gender", "department name", and "dean name" in the logical data entity of "student achievement" in the above figure are not completely dependent on the primary key "student number + course number" but only on "Student ID", therefore, in violation of the second paradigm, the logical data entity of "student grade" should be split into two logical data entities of "student grade" and "student".
Third normal form
Any non-primary key attribute does not depend on other non-primary key attributes. Any non-primary key attribute must not be transitively dependent on the primary key attribute. If it exists, these attributes should be separated to form a new logical data entity.
Before satisfying the third normal form, the first and second normal forms must be satisfied.
The "dean's name" in the "student" logical data entity in the above figure depends on the "belonging department name", and the "belonging department name" depends on the "student number", that is, there is a transitive dependency relationship, therefore, it violates the third normal form , The logical data entity of "student" should be split into two logical data entities of "student" and "department".