How to import a pre-existing sqlite file into Core Data?


Staff member
I need to import a .sqlite file into Core Data, I searched on the internet and found:

<a href="">Core Data Tutorial: How To Preload/Import Existing Data</a>

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.

I also found this:

<a href="">Using a Pre-Populated SQLite Database with Core Data on iPhone OS 3.0</a>

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)?