Normalization Question
Using the INVOICE table structure shown in below figure, do the following:
INV_NUM PROD_NUM SALE_DATE PROD_LABEL VEND_CODE VEND_NAME QUANT_SOLD PROD_PRICE
211347 AA-E3422QW 15-Jan-2016 Rotary sander 211 NeverFail, Inc. 1 $49.95
211347 QD-300932X 15-Jan-2016 0.25-in. drill bit 211 NeverFail, Inc. 8 $3.45
211347 RU-995748G 15-Jan-2016 Band saw 309 BeGood, Inc. 1 $39.99
211348 AA-E3422QW 15-Jan-2016 Rotary sander 211 NeverFail, Inc. 2 $49.95
211349 GH-778345P 16-Jan-2016 Power drill 157 ToughGo, Inc 1 $87.75
• Identify and list all functional dependencies present in the table, including full, partial, and transitive dependencies. Determine
the composite primary key of the table and draw the functional dependency diagram to visually represent the dependencies.
• Verify that the table is in First Normal Form (1NF). If it is not, convert it to 1NF by ensuring that all attributes contain only
atomic values. Then, remove all partial dependencies to convert the table into Second Normal Form (2NF), and remove all
transitive dependencies to convert the table into Third Normal Form (3NF).
• For each new table created during normalization, write the relational schema with keys clearly marked, indicate the normal form
of each table, and draw the updated dependency diagram showing the dependencies in the new structure.
Solution
1NF
Invoice (INV_NUM, PROD_NUM, SALE_DATE, PROD_DESCRIPTION, VEND_CODE, VEND_NAME, NUM_SOLD,
PROD_PRICE)
Partial Dependencies
(INV_NUM → SALE_DATE)
(PROD_NUM → PROD_DESCRIPTION, VEND_CODE, VEND_NAME, PROD_PRICE)
Transitive Dependencies
(VEND_CODE → VEND_NAME)
2NF
Invoice (INV_NUM, SALE_DATE)
Product (PROD_NUM, PROD_DESCRIPTION, PROD_PRICE, VEND_CODE, VEND_NAME)
InvoiceDetails (INV_NUM, PROD_NUM, NUM_SOLD)
Transitive Dependencies
(VEND_CODE → VEND_NAME)
3NF
Invoice (INV_NUM, SALE_DATE)
Product (PROD_NUM, PROD_DESCRIPTION, PROD_PRICE, VEND_CODE)
InvoiceDetails (INV_NUM, PROD_NUM, NUM_SOLD)
Vendor (VEND_CODE, VEND_NAME)