title: CoreData Relationship between entities and attributes
body: <p>I'm having a little trouble grasping CoreData relationships, i'm note sure which relationship type I should be using between my 2 entities or if my logic is correct.</p>
  
  <p>1) "Person" Entity - attributes such as name, tel, address, country, etc...</p>
  
  <p>2) "CountryList" - attributes such as countryName, countryLat, countryLong, etc..</p>
  
  <p>The CountryList entity is pre populated on first run of the app to include all the countries in the world and their respected data.</p>
  
  <p>Where i'm stuck is do I need a relationship between these two entities? </p>
  
  <p>I will be allowing the user to select a country from the CountryList entity data and wish to store there selection in the country attribute for Person entity.</p>
  
  <p>Do I just take the countryName from CountryList as a string and store it in country from Person? or can I make a relationship between them?</p>
  
  <p>I know a user can only belong to 1 country but a country can have lots of users so is this a one to many relationship? Or is it many to many because lots of users can belong to a country but a country can have loads of users? Confused!</p>
  
  <p>Could someone please enlighten me on this and point me in the right direction in what i should be doing in xcode.</p>
  
  <p>Many Thanks in Advance
  Matt</p>
  
  <p><strong>EDIT: Is this correct?</strong></p>
  
  <p>I have made the changes to Entity names etc and think I now have the relationship set correctly.</p>
  
  <p><img src="https://i.stack.imgur.com/Krxhj.png" alt="Xcode Screenshot"></p>
  
  <p><strong>EDIT 2: Removed country attribute and renamed relationships</strong></p>
  
  <p><img src="https://i.stack.imgur.com/QLbwo.png" alt="Xcode Screenshot"></p>