Database Reference
In-Depth Information
Figure 11: Modeling instances in ORM
between roles to be expressed, it does not allow exclusion between sequences of more than
one role. Again, the arc notation itself is not intuitively extensible for this case.
Recall that a model is a schema (structure) plus a population (set of instances). Figure
11 adds a metafragment to expand an ORM metaschema to an ORM metamodel. Sample
populations may be provided for object types (see top ternary) and roles (see bottom ternary).
Fact types are populated by populating all their roles with the same number of values. The
position indicates a row number of the instance table.
MULTIPLICITY IN ER, ORM AND UML
Earlier papers (Halpin & Bloesch, 1999; Halpin, 2001b) provided a detailed compari-
son between the data modeling constructs in ORM and UML, and indicated how the UML
metamodel (OMG, 2001; 2003) could be extended to capture some of ORM's additional
graphical constraints. Like IE and Barker ER, UML's graphic notation is far less expres-
sive for data modeling than ORM. In addition, the notion of multiplicity or cardinality in
UML and these two versions of ER is problematic when it comes to n-ary associations. As
background to this claim, let's review the binary association case fi rst. Figure 12 depicts a
mandatory, n:1 association in all four notations. The UML multiplicity “*” is short for “0..*”
(zero or many) and “1” abbreviates “1..1” (exactly 1).
UML and IE specify minimum and maximum multiplicities at the far end in which the
association is read. Barker ER and ORM treat optionality (whether the role is mandatory or
optional for each population instance of its object type) as a separate concept. Barker ER
places maximum multiplicity on the far role, while ORM uses a uniqueness constraint (or
more generally a frequency constraint) on the immediate role(s) to indicate the number of
times an instance may occur, if it occurs there at all. ORM constraint notations are designed
to assist validation by population, so the uniqueness constraint entails that entries in its fact
column are unique, as in Figure 12(e).
Mandatory role constraints have global impact since they impact the object type,
whose population may be spread over roles in many predicates. Uniqueness and frequency
constraints have only local impact since they constrain the fact type population only. This
separation of local and global concerns leads to greater orthogonality and expressibility
once ternary or longer associations are used.
Given an n-ary association (n > 2), UML's multiplicity notation cannot express a
mandatory role constraint on any association that has between 1 and n−2 mandatory roles,
Search WWH ::




Custom Search