title: Domain Model Design
body: <p>How would you create a domain model for this simple example?
  A recipe can have many ingredients and an ingredient can be used in many recipes.
  How much of each ingredient used in each recipe is also stored.
  I have designed the following three database tables to store this data and the relationships.</p>
  
  <p>I am now trying to create a domain model to represent this. I have a basic example with two classes.
  I then ran into trouble with this model when I thought about creating a new ingredient.
  There would need to be a class with out the quantity property.
  How should this be modeled?</p>
  
  <p><strong>Database Tables</strong></p>
  
  <p><a href="http://img190.imageshack.us/img190/340/databasex.png" rel="nofollow noreferrer">alt text http://img190.imageshack.us/img190/340/databasex.png</a></p>
  
  <p><strong>Domain Model</strong></p>
  
  <p><a href="http://img24.imageshack.us/img24/8859/classesy.png" rel="nofollow noreferrer">alt text http://img24.imageshack.us/img24/8859/classesy.png</a></p>