title: How to import a pre-existing sqlite file into Core Data?
body: <p>I need to import a .sqlite file into Core Data, I searched on the internet and found:</p>
  
  <p><a href="http://www.raywenderlich.com/980/core-data-tutorial-how-to-preloadimport-existing-data">Core Data Tutorial: How To Preload/Import Existing Data</a></p>
  
  <p>It is creating a Python script to populate this database by reading in the contents of our old database, and creating the appropriate rows in the new database. But my sqlite database is too large in term of number of tables and columns, this may cost me a considerable amount of time.</p>
  
  <p>I also found this:</p>
  
  <p><a href="http://ablogontech.wordpress.com/2009/07/13/using-a-pre-populated-sqlite-database-with-core-data-on-iphone-os-3-0/">Using a Pre-Populated SQLite Database with Core Data on iPhone OS 3.0</a></p>
  
  <p>But I don't quite understand it, it looks like it's copying old database to a new one, then how does it add Z_ suffix to all the table and column names? Also, it asks me to create entities and attributes, is there anyway this can be done automatically(from sqlite dabase file)?</p>
  
  <p>Thanks!</p>