7.6. Summary

CSDP step 7 adds other constraints and performs final checks. An occurrence frequency constraint indicates that an entry in a column (or column combination) must occur there exactly n times in), at most n times (≤ n), at least n times (≥ n), or at least n and at most m times (n .. m). A simple occurrence frequency appears next to the role. A compound occurrence frequency appears next to a line connecting the relevant roles.

A ring constraint can apply only to a pair of roles played by the same (or a compatible) object type. The role pair may form a binary predicate or be embedded in a longer predicate. Let R be the relation type comprising the role pair. R is reflexive (over its populations) iff for all x playing either role, xRx. R is symmetric iff for all x, y, xRyyRx. R is transitive iff for all x, y, z, xRy & yRzxRz. These positive properties tend to be used for derivation rather than as constraints.

The following negative properties may be marked as ring constraints next to the role pair (or role connector). R is irreflexive iff for all x, ~xRx. R is asymmetric iff for all x, y, xRy → ~yRx. R is antisymmetric iff for all x, y, x ≠ y & xRy~yRx. R is intransitive iff for all x, y, z, xRy & yRz~xRz. Asymmetry and intransitivity each imply irreflexivity. Exclusion implies asymmetry (and irreflexivity). An irreflexive, functional relation must be intransitive. A recursive ring constraint that may be difficult to enforce is acyclicity. Symbols for all the ring constraints are summarized in the ORM symbol glossary at the end of the book.

An object cardinality constraint or role cardinality constraint limits the cardinality of each population of an object type or role, respectively. An upper limit of n is denoted by “# ≤ n” next to the object type or role. Cardinality constraints are rarely used, since they are often implied by existing value constraints or frequency constraints.

A value-comparison constraint compares one value with another using one of the operators <,≤,>,≥. The constraint is depicted by a circled operator, connected by a dotted arrow from the left operand role to the right operand role. Two dots on the circle represent the two instances being compared. A typical example of this kind of constraint is For each Employee, birthdate < hiredate.

Constraints for which no graphic symbol exists may be specified as textual rules. The model elements involved in the rule are marked with a footnote number, and the rule itself may be displayed in a text box.

A restricted uniqueness constraint declares stronger uniqueness for a given subtype. A restricted mandatory role constraint indicates that an optional role is mandatory for a given subtype.

When modeling connections between nodes, choose directed, immediate links for the stored relation. Indirect links may then be derived recursively.

At the end of the CSDP, final checks are made to ensure that the conceptual schema is internally consistent (its constraint pattern can be populated without contradiction), is externally consistent (agrees with original data and conditions), is redundancy free (elementary facts can’t be repeated), and is complete (covers all the requirements). Various cases of derived redundancy can be safely managed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.190.219.65