Database Reference
In-Depth Information
Figure 11.13. Examples of validation tables
Inthissection,you'lllearnhowtousetheprimarykeyfieldtohelpenforceabusinessrule.
You'll learn how to use the non-key field in Chapter 12 , Views .”
Using Validation Tables to Support Business Rules
When a business rule limits a field's range of values, you can enforce the constraint by us-
ing a validation table; the field will then draw its values from an appropriate field in the
validation table. Establishing this type of rule involves two steps: defining a relationship
between the parent table of the field affected by the rule and the validation table, and mak-
ingamodificationtotheRangeofValueselementofthefieldspecificationsfortheaffected
field in the parent table.
For example, assume you're working with the S UPP S TATE field of a SUPPLIERS table, and
you've defined the following business rule:
Any supplier we use must be based in one of the 11 contiguous
western states, Alaska, or Hawaii.
Search WWH ::




Custom Search