title: iOS Core data - how to check before inserting
body: <p>I am using the core data in my application.
  I know how to insert a new object into it.which stores songs information into it.
  below is my table sturcture</p>
  
  <pre><code>song_id
  
  song_title
  
  song_description
  
  Songs *aSong = (Poem *)[NSEntityDescription insertNewObjectForEntityForName:@"Songs" inManagedObjectContext:myManagedObjectContext];  
  </code></pre>
  
  <p>here i want to know how to check whether the song_id is already available before inserting the object again inside the table.</p>
  
  <p>i mean before inserting the new object, how can i check for existence of it.</p>
  
  <p>also how to check the table is empty?</p>
  
  <p>Pls let me know and thanks</p>