title: Core Data: Sync data from Rest API
body: <p>I'm requesting data from Rest API and then save them to database with core data.</p>
  <blockquote>
  <p><strong>First API Result</strong></p>
  <ol>
  <li>A</li>
  <li>B</li>
  <li>C</li>
  </ol>
  <p><strong>Second API Result</strong></p>
  <ol>
  <li>A</li>
  <li>C</li>
  </ol>
  </blockquote>
  <p>We should remove 'B' because disappeared from API result. Currently we delete all data in table before add new data, But that does not look right.</p>
  <p>My question is how to detect removed data and delete them on database with the least CPU overhead?</p>
  <p>I have option to choose Core Data storetype (<strong>memory</strong> and <strong>sqlite</strong>)  and can't use NSBashRequest</p>