OK, so the products table would have 2 records:
ProductID | ProductName
1 | Boxer Brief
2 | Crew Neck Undershirt
In the OptionGroups table, you would have 2 options:
OptionID | OptionName
1 | Color
2 | Regular Size
3 | Big Size
4 | Tall Size
the Options table would create the options for each group:
OptionID | OptionGroupID | OptionName
1 | 1 | red
2 | 1 | yellow
3 | 1 | Blue
4 | 2 | Small
5 | 2 | Medium
6 | 2 | Large
7 | 3 | Small
8 | 3 | Medium
9 | 3 | Large
10 | 4 | Small
11 | 4 | Medium
12 | 4 | Large
now that the options are created, you assign them to the product through the Productoptions table.
you need to create one record for each option the product can have. for example if the product comes in:
Color: red and yellow,
regular size: Small and Medium
Big Size : Medium and Large
Tall size: Small and large
you would need to create 8 records:
productOptionsID | ProductID | OptionID | OptionGroupID
1 | 1 | 1 | 1
2 | 1 | 2 | 1
3 | 1 | 4 | 2
4 | 1 | 5 | 2
5 | 1 | 8 | 3
6 | 1 | 9 | 3
7 | 1 | 10 | 4
8 | 1 | 12 | 4