ER MAPPING
ERD
COMPAN
Y
Step 1: Mapping of Regular
Entity Types
• For each regular entity type,
create a relation R that
includes all the simple
attributes of E
• Called entity relations
• Each tuple represents an
entity instance
Step 2: Mapping of Weak Entity
Types
• For each weak entity type, create a relation R and include all simple attributes of
the entity type as attributes of R
• Include primary key attribute of owner as foreign key attributes of R
Step 3: Mapping of Binary 1:1
Relationship Types
• For each binary 1:1 relationship type
• Identify relations that correspond to entity types
participating in R
• Possible approaches:
• Foreign key approach
• Merged relationship approach
• Crossreference or relationship relation approach
Foreign key approach
Merged relationship approach
Crossreference or relationship relation approach
• For each regular binary 1:N relationship type
Step 4: Mapping • Identify relation that represents participating
of Binary 1:N entity type at N-side of relationship type
• Include primary key of other entity type as foreign
Relationship key in S
Types • Include simple attributes of 1:N relationship type
as attributes of S
• Alternative approach
Step 4: Mapping • Use the relationship relation (cross-
of Binary 1:N reference) option as in the third option for
Relationship Types binary 1:1 relationships
• For each binary M:N relationship type
Step 5: Mapping • Create a new relation S
• Include primary key of participating
of Binary M:N entity types as foreign key attributes in
S
Relationship • Include any simple attributes of M:N
Types relationship type
Step 6: Mapping of Multivalued
Attributes
• Step 6: Mapping of Multivalued Attributes
• For each multivalued attribute
• Create a new relation
• Primary key of R is the combination of A and K
• If the multivalued attribute is composite, include its simple
components
Step 7: Mapping
of N-ary
Relationship Types
• For each n-ary relationship
type R
• Create a new relation S
to represent R
• Include primary keys of
participating entity
types as foreign keys
• Include any simple
attributes as attributes
ER
MAPPIN
G ERD
COMPAN
Y
• Binary 1:1 -> Foreign
Key Approach
• Binary 1:N -> Foreign
Key Approach
ER MAPPING ERD COMPANY
• Binary 1:1 -> Foreign Key Approach
• Binary 1:N -> Crossreference or relationship relation
approach