All pastes #2081368 Raw Edit

Anonymous

public text v1 · immutable
#2081368 ·published 2011-09-19 17:41 UTC
rendered paste body
I am working on a shopping cart application, and I am pretty much stumped on how to model Items and Options according to the following requirements:

    1)Each Item may have zero or more Options (color, size, etc)
    2)Each Option may have several different values (e.g. green, blue, red, and orange for color)
    3)Two Items with the same Option may have different values for that option (e.g. you may order a t-shirt in green or orange, and you may order a ball cap in blue or red)

I'm sure that this is a somewhat common scenario, but it is not one that I have ever faced before. Any ideas?