ITD640_Unit2IP_Jordan_Dionne

ITD640_Unit2IP_Jordan_Dionne - Order Table: Order_id...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
0NF Table: Order_id  Order_date Customer_id  Customer_nam Customer_addre ss  Customer_city  Customer_state  Item_id  Item_descriptio Item_qty  Item_price  Item_total_price  Order_total_pric e The above table will be in 0NF [not normalized] if we do not choose any primary key. 1NF Table: To convert it into a 1NF table we choose the following primary key: Order_id + Customer_id + Item_id. This key is enough to identify each row in the table uniquely. 2NF Table: A table in 2NF must satisfy the following requirements: 1. It must be in 1NF. 2. All attributes must be dependent on the primary key and not to any subset of the primary key. The table does not satisfy the second requirement. Here Order_date is dependent only on the Order_id, while customer attributes are dependent on Customer_id. So we decompose the above table to normalize it to 2NF.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Order Table: Order_id Order_date Customer_id Item_id Item_qty Item_total_price Order_price Customer Table: Customer_id Customer_name Customer_address Customer_city Customer_state Item Table: Item_id Item_description Item_price 3NF Table: To reduce the table further into 3NF, we do the following decomposition: We split the order table into two. One table will hold the order summary while the other will hold the order details. Order Summary Table: Order_id Order_date Customer_id Order_price Order Details Table: Order_id Item_id Item_qty Item_total_price...
View Full Document

Page1 / 2

ITD640_Unit2IP_Jordan_Dionne - Order Table: Order_id...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online