For my site I have tables
Category :: id | name
Product :: id | name | categoryid
Now each category can have different sizes, for this I also created a table
Size :: id | name | categoryid | price
Now the problem is that each category also has different ingredients that the customer can choose to add to the purchased product. And these ingredients have different prices for different sizes. For this, I also have a table like
Ingredient :: id | name | sizeid | categoryid | price
I am not sure if this structure is really normalized. Can someone please help me optimize this structure and index me this structure?
source
share