Thursday, 27 August 2015

Mapping Constraints-Cardinality Ratio and Participation Constraint

Mapping Constraints are sub divided into two parts that is Cardinality Ratio and Participation Constraints

Cardinality Ratio: It express the number of entities to which another entity can be associated via a relationship.

One to One: An entity of entity-set A can be associated with at most one entity of entity-set B and an entity in entity-set B can be associated with at most one entity of entity-set A.

One to Many: An entity of entity-set A can be associated with any number of entities of entity-set B and an entity in entity-set B can be associated with at most one entity of entity-set A.

Many to One: An entity of entity-set A can be associated with at most one entity of entity-set B and an entity in entity-set B can be associated with any number of entities of entity-set A.

Many to Many: An entity of entity-set A can be associated with any number of entities of entity-set B and an entity in entity-set B can be associated with any number of entities of entity-set A.



Participation Constraints:-





Total Participation-Shown with double lines.In this figure,employ is having total participation in department.


Partial Participation-Shown with single line.In this figure,department is having partial participation with employ.


NOTE-Weak entity always have total participation with the other entity as it is not having primary key which uniquely identifies its tuple.



No comments:

Post a Comment