1. Using the INVOICE table structure shown in Table P6.3, do the following.
Table P6.3 Sample INVOICE Records
Attribute Name
|
Sample Value
|
Sample Value
|
Sample Value
|
Sample Value
|
Sample Value
|
INV_NUM
|
211347
|
211347
|
211347
|
211348
|
211349
|
PROD_NUM
|
AA-E3422QW
|
QD-300932X
|
RU-995748G
|
AA-E3422QW
|
GH-778345P
|
SALE_DATE
|
15-Jan-2010
|
15-Jan-2010
|
15-Jan-2010
|
15-Jan-2010
|
16-Jan-2010
|
PROD_LABEL
|
Rotary sander
|
0.25-in. drill bit
|
Band saw
|
Rotary sander
|
Power drill
|
VEND_CODE
|
211
|
211
|
309
|
211
|
157
|
VEND_NAME
|
NeverFail, Inc.
|
NeverFail, Inc.
|
BeGood, Inc.
|
NeverFail, Inc.
|
ToughGo, Inc.
|
QUANT_SOLD
|
1
|
8
|
1
|
2
|
1
|
PROD_PRICE
|
$49.95
|
$3.45
|
$39.99
|
$49.95
|
$87.75
|
a. Write the relational schema, draw its dependency diagram, and identify all dependencies, including all partial and transitive dependencies. You can assume that the table does not contain repeating groups and that any invoice number may reference more than one product. (Hint: This table uses a composite primary key.)
We have combined the solutions to Problems 3a and 3b to let you illustrate the start of the normalization process within a single PowerPoint slide. Students generally seem to have an easier time understanding the normalization process if they can compare the normal forms directly. We will continue to use this technique for several of the initial normalization decompositions...if the available PowerPoint slide space permits it.
b. Remove all partial dependencies, draw the new dependency diagrams, and identify the normal forms for each table structure you created.
You can assume that any given product is supplied by a single vendor, but a vendor can supply many products. Therefore, it is proper to conclude that the following dependency exists:
PROD_NUM → PROD_DESCRIPTION, PROD_PRICE, VEND_CODE, VEND_NAME
(Hint: Your actions should produce three dependency diagrams.)
c. Remove all transitive dependencies, and draw the new dependency diagrams. Also identify the normal forms for each table structure you created.
d. Draw the Crow's Foot ERD.
Emphasize that, because the dependency diagrams cannot show the nature (1:1, 1:M, M:N) of the relationships, the ER diagrams remain crucial to the design effort. Complex design is impossible to produce successfully without some form of modeling, be it ER, semantic object modeling, or some other modeling methodology. Yet, as the preceding decompositions demonstrate, the dependency diagrams are a valuable addition to the designer's toolbox. (Normalization is likely to suggest the existence of entities that may not have been considered during the modeling process.) And, if information or transaction management issues require the existence of attributes that create conditions other than 3NF or BCNF, the proper dependency diagrams will at least force awareness of these conditions.