mysql - Database Aproach - Redundant data -


i have 3 tables:

products (id, name, price, etc) orders (id, date, payment_method, etc) shipments (id, order_id, product_id, address, etc) 

my question is: correct keep in shipments table product_id? keep here find information shipped product without using orders table.

i suggest:

products (product_id, name, price, etc) orders (order_id, date, payment_method, etc) orderitem (orderitem_id, order_id, product_id, ...) shipment (shipment_id, order_id, ... ) 

shipment kind of redundant - i'd add address etc orders...


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -