title: Storing combinations of item properties in database
body: <p>I have a problem of such:</p>
  
  <p>Let's say I have an item, a CUP for example. I want to sell it, but want to allow the user to pick CUP properties, such as Size, Color, Material. When the user will select Size (maybe Large), color (maybe Black) and Material (maybe Glass) then I need to show him, that we have 20 such Cups in warehouse and the cost is $25 each. And now: I don't know how to store those combinations in database.</p>
  
  <p>Here is my ultra stupid solution:</p>
  
  <p>For each combination I will have a column, yet, adding any new combination might be painfull as well, as removing some, I will have to map them somehow, well...</p>
  
  <p>Id | Product Name | LargeBlackGlassPrice | LargeBlackGlassCount | SmallBlackGlassPrice | SmallBlackGlassCount | Medium...</p>
  
  <p>stupid idea, but as for now didn't hit anything better :/</p>
  
  <p>Hope it's clear what I want to achieve.
  Thank you</p>