Invoice
Invoice
Sample Value
211347
AA-E3422QW
15-Jan-2006
Rotary sander
VEND_CODE
VEND_NAME
QUANT_SOLD
PROD_PRICE
211
NeverFail, Inc.
1
$49.95
Sample Value
211347
QD-300932X
15-Jan-2006
0.25-in. drill
bit
211
NeverFail, Inc.
8
$3.45
Sample Value
211347
RU-995748G
15-Jan-2006
Band saw
Sample Value
211348
AA-E3422QW
15-Jan-2006
Rotary sander
Sample Value
211349
GH-778345P
16-Jan-2006
Power drill
309
BeGood, Inc.
1
$39.99
211
NeverFail, Inc.
2
$49.95
157
ToughGo, Inc.
1
$87.75
2. Using the initial dependency diagram drawn in Problem 1, remove all partial dependencies, draw the
new dependency diagrams, and identify the normal forms for each table structure you created.
NOTE
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.)
Partial dependency
Transitive Dependency
Partial dependencies
Problem 2 Solution
INV_NUM PROD_NUM
NUM_SOLD
3NF
3NF
INV_NUM SALE_DATE
VEND_NAME
2NF (Contains a
transitive dependency)
Transitive Dependency
Relational schema: 2NF(PROD_NUM, PROD_DESCRIPTION, VEND_CODE, VEND_NAME)
Figure P5.4 The Invoicing ERD and Its (Partial) Relational Diagram
LINE
INV_NUM
PROD_NUM
NUM_SOLD
PRODUCT
M
PROD_NUM
PROD_DESCRIPTION
PROD_PRICE
VEND_CODE
VENDOR
VEND_CODE
VEND_NAME