Database Reference
In-Depth Information
Say you determine that there must be a limit to the number of students for each class and
you define the following business rule:
Eachclassmusthaveaminimumoffivestudents,butcannothave
more than 20.
This business rule affects the degree of participation between the CLASSES and
STUDENTCLASSEStables.Youenforcetheconstraintthisruledefinesbymodifyingthe
relationship diagram to show that a single record in the CLASSES table must be related to
at least five—but no more than 20—records in the STUDENT CLASSES table. (Depend-
ing on your point of view, you could also infer from this business rule that the type of par-
ticipation for the STUDENT CLASSES table is now mandatory. You can enter a new class
orkeepanexistingclassintheCLASSEStableifandonlyifthereareatleastfivestudents
registeredforthatclass.) Figure11.5 showsthemodificationyoumustmaketothediagram
in order to establish the business rule.
Figure 11.5. Establishing a relationship-specific business rule
Defining and Establishing Business Rules
You'll define and establish business rules for the database during this stage of the design
process. Remember that you must base these rules on the manner in which your organiza-
tion perceives and uses its data, which (as you well know) will depend on the way the or-
ganizationfunctionsorconductsitsbusiness.Thebestapproachtothistaskistodefineand
establish the field-specific business rules first, followed by the relationship-specific busi-
ness rules. This approach helps you to remain focused on the type of rule you're defining.
Search WWH ::




Custom Search