@: Krik
I am wondering why one wouldn't just associate the options by storing the product id in with each option.
If i'm not mistaken , Your method looks like this:
product:
id , name
1 , table
2 , chair
options:
product_id , option_name, value
1, material , wood
2, material , wood
1, color , green
2 , color , green
my suggest was:
product:
id , name
1 , table
2 , chair
options:
option_id , option_name, value
1, material , wood
2, color , green
3, weight , heavy
connector_table:
product_id,option_id
1,1
1,2
1,3
2,1
2,2
Now adding a new product will not cause duplication in options table.
Its simple to create a dropdown from this options table, using the options table as pickup table.
In you version, how would you store the un-used options?
If i add new product, then i select from the dropdown list, or add new ones.
If i delete a product, its easy to delete from the connector table.
Hello, jjozsi.