Mapping Constraints
A database must conform to certain defined constraints of the contents.
Mapping Cardinalities
Mapping cardinalities is the number of entities to which another entity can be linked through a relationship set.
There are four types of mapping cardinalities.
Let A and B be two entity sets.
- a) One-to-one : An entity in A is associated with no more than one entity in B and an entity in B is associated with no more than one entity in A.
- b) One-to-many : An entity in A is associated with many entities in B and an entity in B is associated with at most one entity in A.
- c) Many-to-one : Many entities in A can be associated with at most one entity in B and an entity in B can be associated with many entities in A.
- d) Many-to-many : Many entities in A can be associated with many entities in B and many entities in B can be associated with many entities in A.
Participation Constraints :
- a) Total : The participation of an entity set E in a relationship R is considered ‘total’ if every entity in E participates in R.
- b) Partial : If only some entities in E participate in relationship R, then it is called ‘partial’.
Reference:
Mapping Constraints of Database.