Database Reference
In-Depth Information
EMPLOYEE
assigned to
PROJECT
assigned to
EMPLOYEE
PROJECT
EMPLOYEE
assigned to
PROJECT
Cardinality Indicators
ONE
MANY
ZERO
Figure 7-13
Cardinality indicators.
entity type indicates that some of the entities of that entity type may not partici-
pate in the relationship. That means that the relationship is optional for that entity
type. Let us explore the notion of optional and mandatory nature of relationships
further.
Consider a real-world situation of employees working in departments. Normally,
every employee is assigned to a department and every department will have
employees. But this may not always be true. Newer employees may not be assigned
to a department yet; some employees on special assignments may not be part of the
conventional departments. On the other hand, some special departments may have
been created for costing raw materials and equipment with no human resources
being part of the departments. In this case, such departments do not have employ-
ees associated with them. Your data model must be able to represent such excep-
tional conditions found in real-world information requirements. Follow along to
learn how these conditions are represented in the data model.
Four cases arise based on the exception conditions. Figure 7-14 illustrates the first
two cases and Figure 7-15 the next two cases. Note the minimum and maximum car-
dinality indicators shown in each case. Also, note each dotted line indicating that
the relationship on that side is optional.
Let us review these four cases in some detail. As you will observe, the minimum
cardinality indicator denotes the optional or mandatory nature of the relationship—
whether it is partial participation or full participation in the relationship by the spe-
cific entity type. Pay special attention to the figure while we discuss the four cases
in detail.
Case 1
A department must have at least one employee, but it may have many employees.
Note minimum cardinality indicator 1 and maximum cardinality indicator * near
EMPLOYEE entity type.
Search WWH ::




Custom Search