Hi, I'm designing a database for an E-commerce web project. It is a tennis equipment shop contains products such as Racquets, Balls, Apparels and other sports accessories. Each product have different sets of option (E.g Racquets have strings, tension, size and Apparels have color, size).
First I was planning to make three tables for products:
"PRODUCT" -|----------|O< "OPTION_GROUP" -|---------|< "OPTION"
Each product will have an option group and the group further will contains options. But there some options that are same in the products (Some tennis racquets have same option list for selecting strings) and some options differ in the size in different products (One racquet is available in 3 sizes ,while other one in 2). So i've decided to make following schema.
"PRODUCT" -|----|O< "PRODUCT_OPTION" >O|---|- "OPTION_GROUP" -|---|< "OPTION"
"PRODUCT_OPTION" will be a junction table containing product,options_group and option IDs to create many-to-many relation among the three table. I've included options in it because it is not necessary that product will have same size of options than the option_group actually contains. So now there will be only one group and junction table will specify what option group product contains and how many options are in it.
So hows my plan?... Am I mistaking somewhere or is there another way to create more efficient and optimized database.