Database Reference
In-Depth Information
Figure 11.2. Implementing a constraint imposed by a database-oriented business rule
Application-oriented
businessrulesimposeconstraints thatyou
cannot
establish withinthe
logical design of the database. You must instead establish them within the
physical
design
of the database or within the design of a
database application,
where they will be more
applicable and meaningful. (I use the term
database application
here to refer to a program
writteninsomeRDBMSsoftwarethatallowspeopleintheorganizationtousethedatabase
easily and to perform tasks related to their daily work activities.)
Here is an example of a typical application-oriented business rule:
A customer with a “Preferred” status receives a 15% discount on
all purchases.
This business rule determines the amount of discount applied to a customer's purchases,
basedonaparticularstatus.Youcannotestablishthisconstraintmeaningfullyinthelogical
designfortworeasons:Thereisnofieldinwhichtostorethediscountamount(theamount
is a result of a calculation, and calculated fields are not allowed in a table), and there is no