Please, I need some help to design a database (as better as posible). I have a set of products made with diferent sizes and customers can create Orders asking for many products and variables quantities of each of their available sizes.
My doubt es which of the following schemas is better?:
1.- Create a table of Products, create a table of Product Sizes, create a table of Orders and create a table for each quantity requiered. For example see the following draft tables (only main fields are shown)
2.- Create a table of products with multiple fields to define all available product sizes, create a table of Orders with multiple fields to store all quantities required for product size. For example see the following draft tables (only main fields are shown):
First approach seems to me the most relational, but their disadvantage is that I need many small records only for the quantities for each product size required.
The second one, is not completely relational but requires only one big record to store all the information regarding to the Order and the quantities required by one product at a time.
I think is not relevant but I plan to use MySql database.
I hope some can guide me to decide wich schema is better or maybe suggest another one.
Thanks in advance, and I apologize for may poor english!
Hi Ned, thanks for your comment. In terms of design I agree that option 2 breaks the relational rules, but my concern is in terms of the volume because the data stored is to big at the detail level and the resources are too limited for the database and the application that manages that information.
Bookmarks