An E-R enterprise schema may define certain constraints to which the contents of a database must conform.

Mapping cardinality

Mapping cardinality expresses the number of entities to which another entity can be associated via a relationship set. It is most useful in describing binary relationship sets.

For a binary relationship set between entity sets and , the mapping cardinality must be one of the following:

  • One-to-one
  • One-to-many
  • Many-to-one
  • Many-to-many

One-to-one

An entity in is associated with at most one entity in , and vice versa.

one-to-one-mapping-example

One-to-many

An entity in is associated with any number (zero or more) of entities in . An entity in can be associated with at most one entity in .

one-to-many-mapping-example

Many-to-one

An entity in can be associated with at most one entity in . An entity in is associated with any number (zero or more) of entities in .

many-to-one-mapping-example

Many-to-many

An entity in is associated with any number (zero or more) of entities in , and vice versa.

many-to-many-mapping-example

Participation constraints

Let be an entity set and be a relationship set.

  • Total participation
    The participation of in is said to be total if every entity in participates in at least one relationship of .

  • Partial participation
    The participation of in is said to be partial if only some entities in participate in relationships in .