Given a product, a product may have variations (e.g. size: Small, Medium, Large or color: White, Black). If a product has more than one variation, then the total variations is the combination of the individual variations (e.g. Small White, Small Black, Medium White, Medium Black, Large White, Large Black). Each combination of variations will be assigned its own SKU, price, stock level, etc. Each variation will also be associated with general product details (e.g. product name, product description, etc.).
What's the best way to model product variations when you don't know what the variations can be? I'm thinking it may be EAV, but I've had problems with that in the past. Wondering if there is a better way.
UPDATE 1:
This is not a duplicate of How to design a product table for many kinds of product where each product has many parameters.
After reading the accepted answer, I'm still at a lost. It seems like my reluctance around EAV is well founded. So maybe I stay away from that solution. Furthermore, if I were to use EAV, what about attributes that are always there, such as price, SKU, and stock levels? I know those must always exist -- and, as such, they don't need the flexibility of EAV.
@Bill Karwin says that his first choice would be to use Class Table Inheritance. I'm not sure if that'll work for me. I need to store tens of thousands (maybe hundreds of thousands) of records. I do not know upfront what the variants are going to be (my code will know as it parses XML feeds and spreadsheets on the fly -- but no sooner). So, trying to predict at this point what other tables I'll need is impossible.
So - I'm still lost. How do I model product variants?