You are on page 1of 2

Mapping #1: Each entity type always corresponds to a relation

Mapping #2: The attributes of a relation contains at least the simple attributes of an
entity type

Mapping #3: 1-1 and 1-many relationships between separate entities need not be


mapped to a relation; the primary key attributes of the "1" relation become foreign key
attributes of the "many" relation

Mapping #4: Any attributes of the 1-1 or 1-many relationship may be attached to the
"many" relation.

Mapping #5: many-many relationships are always mapped to a separate relation

Mapping #6: The attributes of many-many relationships become part of the


relationship type relation, as well as the primary key attributes of the related entity
types

Mapping #7: If the cardinality is 1-many or 1-1 of a recursive relationship, then a


second attribute of the same domain as the key may be added to the entity relation to
establish the relationship. Attributes of the relationship can also be added to the entity
relation, but may be a good reason to create a separate relation with the attributes and
keys of the entities.

Mapping #8: for many-many recursive relationships, you create a relation including
the attributes of the relation but with the primary keys of the entity included twice,
one for each role.

Mapping # 9 weak entity


Convert every weak entity set into a table where we take the discrimination attribute
of the weak entity set and takes the primary key of the strong entity set as a foreign
key and then declared the combination of discriminator attribute and foreign key as a
primary key.

-----------------------------------------AND/OR------------------------------------------

1) Mapping regular/strong entity


For each strong entity set create a new relational independent table that includes all
attributes as column. For composite attribute include only component attributes.
2) Mapping weak entity
Convert every weak entity set into a table where we take the discrimination attribute
of the weak entity set and takes the primary key of the strong entity set as a foreign
key and then declared the combination of discriminator attribute and foreign key as a
primary key.
3) Mapping 1:1 Relationship
For a 1:1 Relationship between two entities S and T. Choose one of the relations,
Example - S and include as foreign key in S the primary key of T. It is better to
choose on entity total participation on S and include descriptive attribute.
4) Mapping 1:N Relationship
For 1:N relationship identify the entity S on N side of the relationship. Include a
foreign key in S the Primary key of relation T also include Discipline attributes of 1:N
attribute of S.
5) Mapping N:N Relationship
For each M:N relationship create a new relational table include in the new relation
,the primary key of the participating entities as a well as descriptive attributes. The
primary key of the table will be the combination of primary keys of participating
entities.
6) Mapping Multi-valued attribute
For every multi-valued attribute will make a new table where we will take primary
key of main table as a foreign key and multi-valued attribute as a primary key.

You might also like