I'm working on an order system for my online shop. I have 2 tables:
- products, storing info about products
- orders, storing general id's & infos of customer orders.
Now I want to have a way to store complex customer orders in the database. I need something that will let me know how much of each size (S, M or L) of each product is in an order.
The tricky part is that I want to be able to add/edit/delete products (of course without affecting orders from the past), so the method should be flexible
How should I go about this?
- a separate table for every order, with products as rows?
- one table for all orders, with products as columns?
- some other option?
Thanks!