the optiongroups table defines that types of options you will offer, create a new record and set the OptionGroupName to "Size", the OptionGroupID will automaticly be assigned a number, if it is the first record, the number will be set to 1:
optiongroups:
| OptionGroupID | OptionGroupName |
|---------------|-----------------|
| 1 | Size |
|---------------|-----------------|
the options table defines the options that belong to a group, create a new record for each size option, set the OptionGroupID to use the number for the size option in the optiongroups table, and the OptionName to the name of the size:
options:
| OptionID | OptionGroupID | OptionName |
|----------|---------------|------------|
| 1 | 1 | 350mm |
|----------|---------------|------------|
| 2 | 1 | 400mm |
|----------|---------------|------------|
| 3 | 1 | 450mm |
|----------|---------------|------------|
the productptions table assigns the options to the product. the ProductOptionID is an auto inclrement column and will automaticly get a value.
the ProductID column should be the ID for the products, it relates to the products.ProductId
the OptionID column is the ID for the option from the options.OptionId column
the OptionGroupID is the ID of the optiongroup from the optionsgroups.OptionGroupID
the OptionPriceIncrement defines how much more the option will cost for that product
this is an example if the ID of the product is 1923
productptions:
| ProductOptionID | ProductID | OptionID | OptionGroupID | OptionPriceIncrement |
|-----------------|-----------|----------|---------------|----------------------|
| 1 | 1923 | 1 | 1 | |
|-----------------|-----------|----------|---------------|----------------------|
| 2 | 1923 | 2 | 1 | 50 |
|-----------------|-----------|----------|---------------|----------------------|
| 3 | 1923 | 3 | 1 | 75 |
|-----------------|-----------|----------|---------------|----------------------|