Database Reference
In-Depth Information
An ORM metamodel for Barker ER is shown in Figure 4. Entity types are identifi ed
by name, and attributes are identifi ed by combining their name with their entity type. Value
constraints on domains and attributes are specifi ed as shown. Here the subset constraint
(circled “⊆”) is applied between role-pairs, the fi rst pair being projected from a join path. This
constraint verbalizes thus: if a Domain hosts an Attribute that has a possible Value then that
Domain has that possible Value . ORM allows set-comparison constraints (subset, equality
or exclusion) to apply between sequences of compatible roles, where a role sequence can
be projected from a join path (the act of moving through an object type performs an object
join). For a detailed discussion of join constraints in ORM, see Halpin (2002).
Roles and associations are identifi ed by numbers (whose display is normally sup-
pressed). It is unclear whether the Barker notation allows both roles in the same association
to have the same predicate text (e.g., for a symmetric association). If it doesn't allow this,
we could also identify a role by combining its predicate text with its association (add the
relevant external uniqueness constraint). Roles could also be identifi ed by their position
within a standard ordering of an association: this could be expressed as two binaries, as in
Figure 2 ( Role starts BinaryAssocation , Role ends BinaryAssociation ) or by co-referencing
Role has Position and Role is in BinaryAssociation .
Subtyping is specifi ed by the acyclic association EntityType is a subtype of EntityType .
The frequency constraint (≥ 2) ensures that each supertype has at least two subtypes. The
uniqueness constraint makes the association many-to one, so it enforces single inheritance.
This uniqueness constraint also implies that subtyping is intransitive, so an intransitivity
constraint is omitted.
All unary predicates satisfy the closed world assumption. Optionality of attributes, roles
and exclusive arcs is captured using the unary predicate “ is mandatory ”. Non-transferability
is modeled with the predicate “ is non-transferable .
The basic cardinalities are captured by the unary predicate “ is multi-valued ”: if true, the
cardinality is many (displayed as a crow's foot); if false, the cardinality is 1. A cardinality of
many may be qualifi ed with a number and operator as shown. Further restrictions that apply
to number-operator combinations are omitted here (e.g., “=” requires a number > 1).
Primary identifi er components are specifi ed using an “ is a primary id component
predicate. The subset constraints between these unaries ensure that only mandatory elements
can be components of a primary identifi er. Barker ER allows both xor and simple exclusion
constraints. An xor constraint is modeled as an ExclusiveArc that is mandatory—its roles,
though optional, are depicted by solid lines. A simple exclusion constraint is an Exclu-
siveArc that is optional (not mandatory)—its roles are depicted by dashed lines. Applying
is mandatory and is a primary id component directly to ExclusiveArc ensures that solid lines
is a primary id component
and identifi cation strokes are distributed uniformly to the spanned roles (these properties
cannot apply to just some of the spanned roles). The subtype defi nition and additional notes
at the bottom of Figure 4 are self-explanatory.
For readers who prefer the Barker ER notation to ORM, Barker (1990, p. H-2) presents
a basic ER metamodel for Barker ER. Although mostly correct, it is substantially incomplete
(e.g., it ignores various features, constraints and identifi cation schemes), and also contains
errors (e.g., it allows alternate keys but not overlapping keys, and it forbids any value from
belonging to both a domain and an attribute population).
Search WWH ::




Custom Search