How to create a better tables Structure.
- by user160820
For my website i have tables
Category :: id | name
Product :: id | name | categoryid
Now each category may have different sizes, for that I have also created a table
Size :: id | name | categoryid | price
Now the problem is that each category has also different ingredients that customer can choose to add to his purchased
product. And these ingredients have different prices for different sizes.
For that I also have a table like
Ingredient :: id | name | sizeid | categoryid | price
I am not sure if this Structure really normalized is. Can someone please help me to optimize this structure and which indexed do i need for this Structure?