title: Core data model - relationships
body: <p>I am confused about how to design a Core Data Model for a particular trio of entities -- specifically,  the relationships between them.</p>
  
  <p>"Place" is an entity comprised of a name (String) and an address (String).</p>
  
  <p>"Leg" is an entity comprised of a start (Place) and an end (Place).</p>
  
  <p>"Route" is an entity comprised of an arbitrary number of legs (Leg) in a particular order.</p>
  
  <p>In sum, a Route consists of an ordered list of Legs which themselves simply represent straight lines between two Places.</p>
  
  <p>How would I model the relationship between the Leg and Place entities in the data model?  Each Leg has exactly two Places (start and end); and any Place could be associated with an unlimited number of Legs, either as a start or an end.</p>