More information about the table An invoice may have more th
More information about the table: An invoice may have more than one product and the table uses a composite primary key.
INV_NUM (PK)
PROD_NUM (PK)
SALE_DATE
PROD_DESCRIPTION
VEND_CODE
VEND_NAME
NUMBER_SOLD
PROD_PRICE
211347
AA_E3422QW
6/25/1999
B&D Rotary sander, 6 in. disk
211
NeverFail, Inc.
2
$49.95
(10) Is the table in 1NF? Why or why not?
(10) Is it in 2NF? Why or why not?
(10) Is it in 3NF? Why or why not?
(5) How many tables do we need after normalization?
| INV_NUM (PK) | PROD_NUM (PK) | SALE_DATE | PROD_DESCRIPTION | VEND_CODE | VEND_NAME | NUMBER_SOLD | PROD_PRICE |
| 211347 | AA_E3422QW | 6/25/1999 | B&D Rotary sander, 6 in. disk | 211 | NeverFail, Inc. | 2 | $49.95 |
Solution
INV_NUM -----> SALE_DATE
INV_NUM -------> NUMBER_SOLD
PROD_NUM -----> PROD_DESCRIPTION
PROD_NUM ------> PROD_PRICE
VEND_CODE ------> VEND_NAME
All the non key attributes are not fully functionally dependent on the composite key . The non key attributes are partially dependent on the composite key. So the table is not in 2nd normal form .
INVOICE(INV_NUM,SALE_DATE,NUMBER_SOLD)
PRODUCT(PROD_NUM,PROD_DESCRIPTION,PROD_PRICE)
VENDOR(VEND_CODE,VEND_NAME)

