Database Reference
In-Depth Information
Figure 8 shows a basic metamodel for most of the ORM constraints. Space limitations
prevent a treatment of all ORM constraints. For simplicity, subtype defi nitions as well as
several textual constraints are omitted (e.g., each mandatory or ring constraint applies to
compatible roles).
The fact type UniquenessConstraint identifi es EntityType is required because ORM re-
quires each entity type to have a value-based identifi cation scheme for human communication.
In a complete model, each entity type has an identifi cation scheme based on a uniqueness
constraint that spans a far role of one of its binary associations. If the uniqueness constraint
is external, at least two associations are involved. For these reference associations, the
entity type's near roles must be functional (simple uniqueness constraint) and disjunctively
mandatory. Hence ORM supports disjunctive reference in its most general form, going well
beyond the Barker ER notation in this regard. For a practical example based on botanical
naming, see Halpin (2001a).
Industry experience indicates that the additional constraints captured graphically in
ORM often occur in practical database application domains. ORM constraints are essentially
role-based, and so is the ORM constraint notation. Since each role of a fact type corresponds
to a column in a sample fact table, the constraints can easily be understood and validated
using sample populations. Moreover, tool support enables the constraints to be automati-
cally verbalized in a variety of natural languages, which also facilitates model validation
with the domain expert.
Figure 9 provides further details of constraints that involve role projections. A role
projection is a particular occurrence of a sequence of roles projected from a path through
the conceptual schema, for use in specifying a specifi c business rule. For pragmatic reasons,
metamodels often involve occurrences, rather than relying on extensional uniqueness for
identifi cation. For example, two different role projections involved in different constraints
may in fact project over the same roles, but will have different surrogate identifi ers because
they are different occurrences. This allows us to modify one of the occurrences without
impacting the other.
Figure 9: A more detailed look at constraints involving role projections
Search WWH ::




Custom Search