Database Reference
In-Depth Information
Figure 11.20. The completed Business Rule Specifications sheet for the new business
rule
Yourepeatthisprocessfortheremainingfieldsinthistableandforthefieldsintheremain-
ing tables. After you're finished, you move on to the next task.
The next order of business is to establish relationship-specific business rules. You begin
by reviewing the relationship between the EMPLOYEES and INVOICES tables, and you
review the relationship diagram to determine whether the relationship requires any con-
straints. Everything seems to be in order, so you move to the relationship between the
VENDORSandPRODUCTStables. Figure11.21 showstherelationshipdiagramforthese
tables.
Figure 11.21. The relationship diagram for the VENDORS and PRODUCTS tables
As you and Mike discuss whether you should impose any constraints on this relationship,
Mike determines that there should be a constraint on the PRODUCTS table. He wants to
makesurethateveryvendorintheVENDORStableisassociatedwith at least oneproduct;
he figures that it's unnecessary to keep data on a vendor who's not supplying him with any
products. So you define the following business rule for this constraint:
Every vendor must supply at least one product.
Now you establish the rule by modifying the appropriate relationship characteristics. You
begin by designating a Mandatory type of participation and assigning a (1,N) degree of
participation to the PRODUCTS table. You then define a Restrict deletion rule for the rela-
tionship based on the PRODUCTS table; this will keep you from accidentally deleting the
Search WWH ::




Custom Search