The relational model only involves the third paradigm. It is some preliminary things, hoping that it will not smile :-)
1NF is the most basic paradigm and there is no need to talk about it. For a relational model that already meets 1NF, 2NF is considered when some function dependencies of non-primary attribute pairs are eliminated; when the part of the primary attribute pair code and the passing dependency function are eliminated, it belongs to 3NF. (Because the soft exam only cares about the third paradigm, so far ).
Simply speaking, the theory is always quite uncomfortable. For example, it will be much better.
The following relationship belongs to 1NF, because all attributes are simple attributes.
Teaching (student ID, name, age, gender, Department name, Department Head, course name, score)-primary code is student ID
However, this relationship has two attributes (Course name and score) that do not depend on its student ID, that is, student ID! → Course name, student ID! → Score, but it should be (student ID, course name) → score. So we break down and make it meet 2NF.
Student _ series (student ID, name, age, gender, Department name, Department Head)-master code is student ID
Electives (student ID, course name, score)-the master code is student ID + Course name
In this mode, all non-primary attributes depend on the primary Code. However, in the "Student _ System", there is a transmission dependency, student ID → department name → department head, and then the transfer dependency is eliminated, and all the relationships will satisfy 3NF. The decomposition is as follows:
Student (student ID, name, age, gender, Department name)-primary code is student ID
Department (Department name, Department Head)-master code is department name
Electives (student ID, course name, score)-the master code is student ID + Course name
Here, three relationships are available, because the third paradigm is basically the lowest one that meets the requirements for use.