Databases Reference
In-Depth Information
the viewer's comprehension of the model, and does the distinction have
any effect on database design?
The most direct way to approach optionality
and cardinality is to simply place numbers by the target entity. The Chen,
Coad/Yourdon, and several of the object-oriented techniques do this.
“Must be at least one but may be any positive number” is shown by “1,m.”
“Must be exactly one” is shown by “1,1.” “May be zero or any number” is
shown by “0,m,” etc.
Optionality and Cardinality.
This keeps the graphics simple and puts this information on a different
graphic “layer” than the rest of the drawing. It means, for example, that the
information must be processed by the left brain as data, rather than the
right brain as a graphic experience. This makes the effect less powerful.
A small graphic symbol and its absence can also convey whether or not
an occurrence of an entity may have more than one occurrence of a related
entity. Another symbol or its absence can convey whether the upper limit
of the relationship is one or more than one. As small symbols, these do not
compete graphically with the overall presentation of entities and relation-
ships. Typically, a crow's foot or its absence shows cardinality. The Oracle
Method uses this convention. James Martin's Information Engineering uses
the crow's foot for an upper limit of “many,” but instead of just leaving it off
for an upper limit of one, it adds an extra mark across the line.
There is less agreement on the representation of optionality. James Martin
puts a circle next to the optional entity and a mark across the relationship
next to a mandatory entity. (“One and only one” then winds up with two
marks next to the entity.) The Oracle Method uses a dashed half-line for an
optional relationship and a solid half line for a mandatory one. SSADM
assumes that in most cases the many side is optional and the one side is man-
datory, so it only adds a circle in the middle of the line for those cases where
the one side is optional. It does not permit the many side to be mandatory.
Exhibit 3 shows the Oracle Method's treatment of optionality and cardi-
nality, and Exhibit 4 shows James Martin's symbols. Martin's symbols are a
bit more busy, but in both cases, if the symbols for the upper limit are known,
the cardinality is known regardless of the optionality. Similarly, if you know
the symbols for lower limit, you know optionality regardless of cardinality.
Shlaer and Mellor use a different set of graphics (Exhibit 5), but they also
show consistency for all combinations of optionality and cardinality.
By far the most complex system of notation is also one that is widely used
— IDEF1X. It is the standard for the U.S. Government and is common else-
where as well. Unfortunately, it suffers from several problems that make it
more complex than is necessary for the purposes we are pursuing here.
Search WWH ::




Custom Search