title: Using SQLite in Mac App
body: <p>I am trying to look for a good tutorial/jump point to use SQLite in MacOSX App. I do have knowledge in iPhone development but never dealt with SQLite before, all my apps were enterprise lever where i talk to RESTFul server to post and get data, and all the sql stuff is at server side.</p>
  
  <p>All my search attempts returned iphone results and some UI wrappers OSX, i guess there are less people out there that code for OSX than iphone :)</p>
  
  <p>I am trying simply to make my app:</p>
  
  <ol>
  <li><p>When it runs for the first time, checks and create a DB if it does not exist. I prefer to make the code invoke a sql script that will create the db if it does not exist, or if does exist it can check and make sure all tables, FK relations ..etc are correct. (I know how to do that script I just need the how to invoke in cocoa OSX apps)</p></li>
  <li><p>Basic SQL stuff. INSERT/UPDATES/DELETE?</p></li>
  </ol>
  
  <p>But before all this, is SQLite3 the correct approach for MAC OSX apps or I should stay with using plist files? Can the user "Normal" mess the state of SQLite3? are there any permissions issues that i have to worry about? I want my users just to launch the app and I will do everything in the background for them (I know I will support 10.8+ for this)?</p>