I am designing a simple auto parts database for my friend to learn more about database design. I was stuck with the ORDER
, ORDERITEM
, SHIPMENT
, PACKING LIST
, INVOICE
and CONTAINER
relationship.
The ORDER
contains ORDERITEM
which is individual parts (can be more than one in amount on one entry). When all or part of ORDERITEM
are available, SHIPMENT will happen. For each shipment, multiple PACKING LISTs are possible. For each PACKING LIST, one INVOICE is needed. A PACKING LIST will contain one or more CONTAINERs and inside each CONTAINER there will be at least one ORDERITEM.
I don't know if it is a good idea to split data into above tables, and what is a better way to connect them together?
EDIT:
Here is my draft of the database design: http://www.flickr.com/photos/oldyoungguy88/3595283724/sizes/o/
There are two parts. One is PARTS table for 'inventory' and one is CUSTOMER, ORDERS, INVOICES, SHIPMENTS tables for 'documents'.