Co-occurrence Constraints

Co-Occurrence Constraints


Participation constraints restrict the number of relationships in which an object can appear in a relationship set. We may also wish to restrict the number of different objects that can appear together with a particular object or a particular group of objects in a relationship set. Co-occurrence constraints allow us to make these restrictions.

A co-occurrence constraint specifies the minimum and maximum number of times an object or combination of objects can co-occur in the relationships of a relationship set with another object or combination of objects.

Notationally, we write co-occurrence constraints by listing one or more object class names on the left and right of a right-pointing arrow and by providing a list of min:max pairs above the arrow. In an ORM, we place a co-occurrence constraint close to the relationship set to which it applies.

For instance:

Figure 1. Sample co-occurrence constraints

This example means that each triple object student, course and semester in respective object class Student, Course and Semester can have one and only one grade in object class Grade. If the minimum and maximum numbers above the arrow are all 1s, then this is the same as generalized Functional Dependency.

To properly form co-occurrence constraints, several restrictions must be observed:

Here is a short quiz so you can test your understanding of co-occurrence constraints.

Go to the OSA Tutorial ORM Constraints

Go to Participation Constraints Object-class Cardinality Constraints

 OSM Home Page CS Dept Home Page  BYU Home Page

Last updated 3 Nov 1994.
by Mingkang Xu (, Lei Cao(