Databases Reference
In-Depth Information
Exhibit 16-7. ORM attributes.
between an entity and its attributes have now been made explicit. “ID”
and “Name” are shown to be mandatory by the dots on their relationships,
next to
.
PRODUCT
The arrows under “has” in each relationship simply mean that
PRODUCT
can have only one value for each attribute — thus requiring the model to
be in first normal form. This representation of uniqueness in ORM is diffi-
cult to master initially (it is another symbol, after all), but it does allow this
technique to represent subtleties not available to conventional e-r model-
ing. It extends to the relationships between an entity and its attributes the
same concepts of optionality and cardinality discussed earlier between
entities themselves. The notation is the same whether the ellipses stand
for entities or attributes: for cardinality, the presence of a double-headed
arrow under the left side of the relationship means that only one occur-
rence of the object on the right may be applied to an occurrence of the
object on the left. Without it, a
could have more than one value for
“ID.” Similarly the dot or its absence represents optionality for both
attributes and entities.
PRODUCT
A subtype is an entity which represents a sub-
set of occurrences of another entity — its supertype. An occurrence of the
supertype is also an occurrence of one and only one subtype, and an occur-
rence of a subtype must also be an occurrence of the supertype. Some tech-
niques take the Venn diagram approach of showing the subtypes inside the
supertype. Exhibit 8, for example, shows Martin's Information Engineering
notation for subtypes and supertypes. This has the advantage of compact-
ness and of emphasizing the fact that an occurrence of the subtype is an
occurrence of the supertype. The compactness allows the supertype and
Subtypes and Supertypes.
 
Search WWH ::




Custom Search