Database Reference
In-Depth Information
Figure 1: (a) A sample, incomplete IE model; (b) The 4 multiplicity patterns
been supported by many data modeling tools, and its simple, intuitive notation has helped
it become very popular for database design in industry.
The IE approach depicts
entity types
as named rectangles.
Attributes
are often displayed
in a compartment below the entity type name, but are sometimes displayed separately (e.g.,
bubble charts). Some versions support basic constraints on attributes. For example, an
attribute that is part of its entity type's primary identifi er might be underlined, and manda-
tory attributes might be bolded. Although no standard notation exists for these constraints,
they are included in our metaschema. The Employee entity type in Figure 1(a) provides a
simple example.
Relationships
are typically binary only, shown as named lines connecting the entity
types. IE usually allows only one reading per association, which must be read left-to-right or
top-to-bottom. The line itself corresponds to a binary, logical
predicate
, and the line reading
to
predicate text
(e.g., “occupies”). A relationship reading is formed by inserting the entity
predicate text
type names at the start and end of the predicate text (e.g., “Employee occupies Room”).
A half-line or line-end corresponds to a
role
in ORM (or association end in UML). In this
chapter, we use “role” exclusively to mean “association end”. To avoid confusion with other
kinds of relationships, we use “binary
association
” for a binary relationship type.
To indicate that a role is
optional
, a circle “
” is placed at the other end of the line,
signifying a minimum
multiplicity
(participation frequency) of 0. To indicate that a role is
mandatory
, a stroke “|” is placed at the other end of the line, signifying a minimum mul-
tiplicity of 1. A crow's foot is used for a maximum multiplicity of “many”. In conjunction
with a minimum multiplicity of 0 or 1, a stroke “|” may be used to indicate a maximum
multiplicity of 1. So the combination “
|” indicates “
at most one
” and the combination “| |”
indicates “
exactly one
”.
For example, in Figure 1 the constraints on the association
Employee occupies Room
specify that each employee occupies exactly one room, and that each Room is occupied by
zero or more employees. Some IE notations assume a maximum cardinality of 1 if no crow's