Database Reference
In-Depth Information
Figure 11.8. An example of a Business Rule Specifications sheet
Defining and Establishing Relationship-Specific Business Rules
After defining and establishing field-specific business rules, the next order ofbusiness is to
tackle relationship-specific business rules. The procedure forperforming this task involves
the following steps.
1. Select a relationship.
2. Review the relationship and determine whether it requires any constraints.
3. Define the necessary business rules for the relationship.
4. Establish the rule by modifying the appropriate relationship characteristics.
5. Determine what actions will test the rule.
6. Record the rule on a Business Rule Specifications sheet.
As you can see, this procedure is similar to the one you used for field-specific business
rules. Now, let's take a look at each step in more detail.
Note
You can apply this entire procedure to both self-referencing and dual-table rela-
tionships. I've based the remainder of the discussion on a dual-table relationship,
however, because it is the type of relationship you are likely to work with the ma-
jority of the time.
Step 1: Select a Relationship
Whichrelationshipyouchooseisarelatively trivialmatterbecauseyou'lleventuallyapply
thisprocedureto every relationshipanyway.Onceyouselectaspecificrelationship,review
its relationship diagram. Then think about what the tables represent and why they are re-
lated and pose the following questions:
What kind of information do these tables provide?
Why is the relationship between these two tables important?
The answer to these questions will help you define any necessary business rules for the re-
lationship, and keeping them in mind will prepare you for the next step.
Step 2: Review the Relationship and Determine Whether It Requires Any Constraints
Briefly review each relationship characteristic and keep its current setting in mind. Then
examine the relationship as a whole and determine whether it requires some form of con-
straint. As you review the relationship, remember the answers to the questions you posed
Search WWH ::




Custom Search