1. Eng.Samir Sabry
IT Instructor
Mapping Rules
Step 1: regular entity types
Create a new relation that includes Simple attributes
For a composite attribute include only the simple component attributes
Leave out multivalued attributes (to step 6)
Pick a PK
Step 2: weak entity types
Note: Weak entity type has no key - Related to an identifying or owner entity
type. Has total participation constraint with identifying entity.
Create a new relation with simple attributes
Include an FK to the owner entity's relation
Step 3: 1:1 relationship types
Add to one of the participating relations an FK to the other relation:
It is better to add to a relation that has total participation in the relationship
Include any relationship attributes
Step 4: 1: N relationship types
Add to the relation on the N-side an FK to the other relation.
Include any relation attributes
Step 5: M: N relationship types
Create a New relation containing as FK of the primary keys of both entity types
participating relations
Include any relation attributes
Step 6: multi-valued attribute
Create new relation containing FK of the PK from the Entity
Step 7: ternary relationship types
Create new relation containing a FK referencing each of the 3 entities involved
Include any relation attributes
Notes: How many relations?
1. Entity (both regular and weak)
2. M:N relationship
3. Multi-valued attribute
4. Ternary relationship