Databases Reference
In-Depth Information
Exhibit 10-1. Integrity constraint versus condition.
More precisely, a rule can be viewed as a logical expression yielding
either true or false (or null, if it is switched off).
• An integrity constraint is a rule that always must yield true (or null). It
has enforcement power because it never is permitted to yield false.
Business rules for which integrity constraints are appropriate general-
ly indicate the sense of must.
• A condition is a rule that may yield either true or false (or null).
Because it is permitted to yield false, it lacks direct enforcement power.
Its usefulness arises in providing a test for the enforcement (or testing)
of one or more other rules. Specifically, these other rules are enforced
(or tested) only while the condition yields true. (Conditions therefore
provide one important means for connecting rules in building-block
fashion.) Business rules for which conditions are appropriate generally
indicate the sense of if.
Integrity constraints and conditions must be distinguished in modeling
business rules. Each is given a distinct graphic symbol, as illustrated in
Exhibit 1. These symbols may be rotated to any position in 360.
Each of the two graphic symbols is directional in an important sense —
each symbol has a back, a front, and two sides. The back and front are
essential in modeling every individual rule; the sides provide points for
connecting different rules in building-block fashion. Recognizing this direc-
tionality is a key element of the rule syntax.
MODELING RULES
Selection of rule type is crucial for rules. All rules must have a rule type.
Generally, these rule types are selected from a standard set such as the set
offered by Ross Method. Other rule types are possible, however, including
derivatives. These are discussed later.
With practice, selection of rule types for most business rules becomes
relatively straightforward. Each rule type has a particular sense, which
always is applied in its interpretation. Exhibits 2 and 3 provide simple
examples. It is important to note that all rule types can be used either for
integrity constraints or for conditions.
Search WWH ::




Custom Search