This database is modeled after PowerStore and the way that power store handles options.
Of course there are always multiple ways of doing the same thing, this database was created to handle product options and be as flexible as possible.
It can be used for product options that don't effect price and product options that do effect price.
The reason for the price increment column being in the productoptions table is so that the same option can apply to different products and have a unique effect on the price. For example, you may have shirts and pants that are sold in XL. For shirts, the price could increment by $2.50 and for Pants the price could increase by $5.00.
By applying the price increment when the option is attached to the product, you gain more flexibility.
as for efficiency, that can be viewed in a number of ways.
For a database, the most efficient way to store data is to "normalize" it. the goal of normalizing data is to cut down on redundant text entries. This is done through using foreign key relations. The optiongroups and options table is a good example:
optiongroups
optionGroupID | OptionGroupName
1 | Size
2 | color
options:
OptionID | optionGroupID | OptionName
1 | 1 | Small
2 | 1 | Medium
3 | 1 | Large
4 | 2 | Red
5 | 2 | yellow
6 | 2 | Green
Instead of storing the string "Size" in the first three records we store the number "1" which is the ID. an integer uses 4 bytes of storage, where the string would use quite a bit more, see the following for details on storage requirements for different data types:
storage-requirements.html
The same technique is used in the productoptions table to relate each product to an option:
ProductOptionID | ProductID | OptionID | OptionGroupID | OptionPriceIncrement
1 | 1 | 1 | 1 |
2 | 1 | 2 | 1 | 0.50
3 | 1 | 3 | 1 | 1.50
This is an example of adding small Medium and Large options to product 1. I this example medium adds 0.50 cents, and large adds $1.50, now we could add another product with the same options but different pricing and also add color to this one:
ProductOptionID | ProductID | OptionID | OptionGroupID | OptionPriceIncrement
4 | 2 | 1 | 1 |
5 | 2 | 2 | 1 | 0.75
6 | 2 | 3 | 1 | 2.50
7 | 2 | 4 | 2 |
8 | 2 | 6 | 2 | 0.25
In this case, the product is available in small medium and large sizes, and red and green color. Since green die is so expensive, choosing green adds $.25. The medium size adds $.75 and the large option adds $2.50