Friday, January 8, 2010

The two alternatives for specifying structural constraints on relationship types.

The two alternatives for specifying structural constraints on relationship types are the cardinality ratio and participation constraints.

  • Cardinality ratio: The cardinality ratio for a binary relationship specifies the maximum number of relationship instances that an entity can participate in. For example, in the WORKS_FOR binary relationship type, DEPARTMENT: EMPLOYEE is of cardinality ratio l:N, meaning that each department can be related to (that is, employs) any number of employees, but an employee can be related to (work for) only one department. The possible cardinality ratios for binary relationship types are 1:1, l:N, N:l, and M:N.
  • Participation constraint: The participation constraint specifies whether the existence of an entity depends on its being related to another entity via the relationship type. This constraint specifies the minimum number of relationship instances that each entity can participate in, and is sometimes called the minimum cardinality constraint. There are two types of participation constraints-total and partial.

No comments: