Yesterday evening teacher in the Triad class to tell us the second chapter of the database and the third chapter of the knowledge point, look back to their own, do a summary to the knowledge system a bit.
For the first figure--er Model study object, the impression is very deep, it feels better to understand.
Then the teacher said the concept of the primary key, the candidate key and the super-key, combined with their three relationships, thought of the other two points of knowledge. See.
These three graphs clearly reflect the relationship between the primary key, the candidate key, the super-key in the database, the relationship between the first paradigm, the second normal form, the third paradigm, and the relationship between the 0, 1, 2, and 3 grammars in the compilation principle.
Of course, the compiler principle of grammar knowledge is not a lot of people know, in fact, he is a computer internal operation of a language, words, is another kind of "coding."
Paradigm
the paradigm of the database is the highest to the sixth paradigm, but it has seven forms, namely tertiary, BCNF, four, five or six paradigms, we apply long is the first three species. In accordance with the two or three paradigm of the rules of the chart in detail, not much to say. Paradigm is a kind of rule based on function dependence, there is no function dependence, and the paradigm is impossible to talk about.
The ER model is converted to relational mode
When converting, we first need to clarify the type of contact between the entity and the entity, that is, which of 1:1, 1:n, m:n, and then convert according to the corresponding rules.
In fact, the transformation is to add the primary key of a relationship pattern to the property of the other side as a foreign key, the rule is to explain who adds to whom the problem. Suppose there are two relationship modes P, Q (1:n contact type, q as N-end), and the conversion situation is as follows.
Database-Compilation principle