I have products in my database (MySQL). I have my prices based on different combinations of options for my products. I have the following data:
PRODUCTS
prodID | prodName
1 | Ball
OPTIONS
optionID | optionName | prodID
1 | color | 1
2 | size | 1
3 | material | 1
OPTIONVALUES
ovID | optionID | ovValue
1 | 1 | red
2 | 1 | blue
3 | 2 | small
4 | 2 | big
5 | 3 | wood
6 | 3 | glass
for prices I would like to have like this:
red small wood ball - $13 red small glass ball - 14 red big wood ball - 16 red big glass ball - 17 blue small wood ball - 12.5 [...]
How can I design the database structure for this? I have tried several ways but none was good. if the number of the options were static then every option could have its own table, but this was that is not a good solution.