yes, the eCommerce database would accomplish this.
The tables use Primary key and Foreign Key column to relate to one another
In the products table, the ProductID is the Primary key, the product data would look like:
ProductID | ProductName etc
1 | wefted hair
2 | prebonded hair
3 | wigs
The optiongroups table uses the OptionGroupID as the primary key. the options groups data would look like:
OptionGroupID | OptionGroupName
1 | Color
2 | Size
3 | Style
The Options table uses the OptionID as the primary key and the OptionGroupID to relate the option to the option group. To add the color options, the OptionGroupID, will use the value 1, size will use the value 2 and style will use 3 :
OptionID | OptionGroupID | OptionName
1 | 1 |Black
2 | 1 |Dark Brown
3 | 1 |Medium Brown
4 | 1 |Light Brown
5 | 1 |Pale Blond
6 | 2 |12 inch
7 | 2 |14 inch
8 | 2 |24 inch
9 | 3 |straight
10 | 3 |deep wave
11 | 3 |french-curl
12 | 3 |loose wave
the productoptions table is used to tie the option to the product and add a price increment if the options will add to the base price set in the product table.
The OptionID is the primary key. ProductID is a foreign key relation to the product table. optionID is a foreign key relation to the Options table and OptionGroupID is a foreign key relation to the option groups table.
ProductOptionsID | ProductID | OptionID | OptionGroupID | OptionPriceIncrement
1 | 1 | 2 | 1 | 0
the example above uses:
productID 1 which is wefted hair.
OptionID 2 which is Dark Brown
OptionGroupID 1 which is color
OptionPriceIncrement 0
ProductOptionsID | ProductID | OptionID | OptionGroupID | OptionPriceIncrement
2 | 2 | 7 | 2 | 5.95
the example above uses:
productID 2 which is prebonded hair
OptionID 7 which is 14 inch
OptionGroupID 2 which is size
OptionPriceIncrement 5.95 This will be added to the base price set in the product table.