Current location - Training Enrollment Network - Books and materials - Problems and answERs of er model
Problems and answERs of er model
You may not know much about the algorithm of transforming ER graph into relational pattern set.

1. entity type conversion

(1) Converts each entity type into a relational schema.

(2) The attribute of entity is the attribute of relational model.

(3) Entity identifier is the key to the relationship model.

2. Conversion of binary contact types

(1) If the relationship between entities is 1: 1, you can add the properties of keys and contact types of another relationship pattern to the properties of any one of the two relationship patterns converted by two entity types.

(2) If the relationship between entities is 1:N, add the key of 1 end entity type and the attribute of contact type to the relationship pattern converted from the n-end entity type.

(3) If the connection between entities is M:N, then the connection type is also converted into a relational mode, and its attribute is the key of two entity types plus the attribute of the connection type, and the key is the combination of two entity keys.

Above 2. (1) and 2. (2) It is clearly stated that both one-to-one and one-to-many can be solved by adding attributes to the original relational model. Only when many-to-many needs to add additional relational sets can such a topic be counted as many-to-many.

The answer is 6 (number of entity sets) +3 (number of many-to-many relationships) = 9.