How do I normalize the following table:
Table Order Detail:
-------------------
Order#
Item#
Desc
ShipDate1
Qty1
ShipDate2
Qty2
ShipDate3
Qty3
ShipDate4
Qty4
ShipDate5
Qty5
....
ShipDate20
Qty20
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’d want to have three tables:
Item,Order, andOrderDetail:A better way would be to separate the order detail from shipping detail:
OrderDetail.Idis a surrogate key for the table. It’s used again in theOrderShipment.OrderDetailIdfield. I’ve includedQuantityon theOrderShipmenttable so that you can support partial order fulfillment.The item description can be found by joining the
OrderDetailandItemtables. You can get order header information by joining to theOrdertable.In this design, you might have twenty records instead of that many columns: