One, review the foundation
1. Weak entities
Such entities need to be dependent on one entity. If there is another entity that does not exist. It disappears as well. In contrast, the entity it relies on becomes a strong entity.
2, Specialization
In the process of database design, we will find. An entity can be divided into several sub-entities according to certain characteristics, which in fact is a process from general to special, which becomes specialization.
Two, two RMB contact: ER an algorithm for converting graphs into relational patterns
1 , if the relationship between entities is 1:1 , there is a relationship pattern in which the two entity types are converted into two relational patterns, and a relation pattern is added to the properties of the key and The properties of the contact type.
2 . If the entity key contact is 1:n, 1 is added to the relationship model converted to N-end entity type The properties of the key and contact type of the end entity type.
3 , if the relationship between entities is m:n , the contact type is also converted to relational mode. The property is a two-segment entity type key plus a contact Type property, and the key is a combination of entity keys at both ends.
That is, there is only a single table in many-to-many relationships, and in other cases there are several entities that are converted into several tables, and when you add a primary key to one entity to another, consider why the N-side increases. The individual feels that the database has been done long. It is also clear that the N-side increase can be clearer to make the database more easy to change.
This does not give examples, too familiar, or more practice. Do a few database to understand.
Database Design--e-r Diagram