kpowning wrote:They add every size no matter what to a variants table then which ever products are not available in certain sizes and colors you need to enter a product exemption into a table called product_ex then if they select that color and size they customer sees in the store this variation is not available
Given thirty seconds to think about it (which included about fifteen to reinsert missing punctuation) that sounds largely the only way to do it. There is no direct relation between size and colour; only between product and size, and product and colour; so any size/colour combination can only exist with respect to a given product (clearly, not having any x-large green t-shirts available doesn't automatically mean you can't get an x-large green hoodie). Not to mention the fact that there may be an arbitrary number of other option categories, so you can't go around creating a new table for each one.
The most significant change I can see would be to replace the exemptions table with a table of available option combos, with foreign keys to products, sizes and colours. List what you do have instead of what you don't have, because you only want to offer what you do have. If you only kept a list of what you don't have (your "exlcusions" table) then you end up having to search through it to find out what's not there.
In the absence of that, a full cartesian product of all three source tables (where the - I think it's called - "class_options" table is used twice, each time filtered by a different classid), filtered by product ID, and subtracting the exemptions, would have the same effect. I haven't seen the exemptions table, so I'd only be guessing if it looked something like
product_id | colour_id | size_id
-----------+-----------+--------
1 | 3 | 12 // No small red Item 1s! Oh, noes!
(Incidentally, notice how using the forum's formatting tags is much easier and more convenient than cropping and posting a screenshot?)