Forum Moderators: open
Taking tangor's example, I would approach this a little differently. Put manufacturers/brands in a separate table as specified.
But for "color," imagine, if you will, a widget that may have hundreds of options, and that those options can change over time. Today it's just color; suppose you want to add an option for size? And the price of the item changes with the size? Tomorrow you have a widget that has variations of color, size and say, a trim?
You have a never-ending maintenance issue of adding more tables, modifying your code, and so on.
Consider an "options table" with the following attributes:
id product_id option_id option_name option_value required price
So at any time, you may add an option:
4321 1234 345435 color red 1 0.00
4322 1234 345435 color blue 1 0.00
4323 1234 865756 color green 1 0.00
4324 1234 345534 size small 1 7.95
4325 1234 344434 size medium 1 12.95
4326 1234 343334 size large 1 14.95
4327 1234 567567 trim silver 1 0.00
4328 1234 898778 trim gold 1 0.00
4329 1234 676967 widget cover 0 5.95
So for product ID 1234, you have the following options:
required:color
required:size, with differing prices
required:trim
optional:widget cover
if an item in size small is available only in pink but that same item in medium is offered only in blue and red?