Database Reference
In-Depth Information
dinality in a relationship between objects? If so, what is the significance of minimum
cardinality? First, let us formally define maximum and minimum cardinalities.
Maximum cardinality. Maximum number of instances of one object that are
related to a single instance of another object.
Minimum cardinality. Minimum number of instances of one object that are related
to a single instance of another object.
Figure 6-11 shows two relationships, one between SUPERVISOR and
EMPLOYEE and the other between EMPLOYEE and PROJECT.
Review the cardinality indicators marked on the relationship line between
SUPERVISOR and EMPLOYEE. Each set of indicators has two parts. The first
part indicates the minimum cardinality; the second part indicates the maximum car-
dinality. Whenever cardinality indicators are shown as a set of two indicators, they
denote the minimum and maximum cardinalities, respectively. If only one indicator
is shown in a relationship, then assume it to be the maximum cardinality indicator,
the minimum cardinality indicator being omitted. Interpret the cardinality indica-
tors between SUPERVISOR and EMPLOYEE.
Indicators next to SUPERVISOR
Minimum 1:
A minimum of one instance of SUPERVISOR associated with
one instance of EMPLOYEE.
Maximum 1:
A maximum of one instance of SUPERVISOR associated with
one instance of EMPLOYEE.
Indicators next to EMPLOYEE
Minimum 1:
A minimum of one instance of EMPLOYEE associated with one
instance of SUPERVISOR.
Maximum *:
A maximum of many instances of EMPLOYEE associated with
one instance of SUPERVISOR.
What do these cardinality indicators really mean? Which aspects of real-world
information do these indicators represent? Note carefully that the indicators next
manages
SUPERVISOR
EMPLOYEE
1, *
1,1
assigned
to
EMPLOYEE
PROJECT
1, *
0,1
Figure 6-11
Relationships: maximum and minimum cardinalities.
Search WWH ::




Custom Search