One, review the foundation
1, weak entities
This entity needs to rely on another entity, and if another entity does not exist, it disappears. In contrast, the entity it relies on becomes a strong entity.
2, Specialization
In the process of database design, we will find that an entity can be divided into several sub-entities according to some characteristics, which is actually from the general to a special process, is a specialization.
Two, two RMB contact: ER an algorithm for converting graphs into relational patterns
1 , if the relationship between entities is 1:1 , the key of the other relationship pattern is added to the attributes of any one of the two relational patterns in the two entity type conversion The properties of the contact type.
2 , if the entity key contact is 1 : N , then in N the end entity type is converted into a relational model that joins 1 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 a relational pattern whose properties are the two-segment entity type's key plus the property of the contact type, and the key is a combination of the two entity keys.
That is, there is only a single table in many-to-many relationships, and in other cases there are several entities that convert to several tables, and when you add a primary key to another entity in one entity, consider why you are adding to the N-side. Individuals think that the database has been done for a long time, it will be understood that the N-side join can be clearer to make the database changes to become easier.
This does not give examples, too familiar, or more practice, do a few database to understand.
Database Design--e-r Diagram