Use Core Data or not? Use Core Data or not? sqlite sqlite

Use Core Data or not?


First of all Core data is not a database. So if you have feeling of database usage in future than move to SQLite.

Core data is a framework that manages object graph. Core data persist that object graph by writing it to disk.

Where as SQLite is a lighter version of SQL, So it limits some complex functionality of SQL language, And yes it is a pure database.

Core data is not a database how ever you can manage object and entities as like database tables and attributes as a columns.

Conclusion:

Go for Core data, it will reduce the time of database connection opening and querying. As I said it is not a database so all database limitations are not in a picture.


Core Data is the best option to use but if somehow you want to port the application to android or windows and want to keep the code similar then you can go for SQLITE as SQLite is supported by all major platforms. Whereas core data is only part of iOS


Using CoreData is always a better option.

  1. Core Data is built on top of SQLite, so you work on SQLite either way :)
  2. Core Data works with Objects so no worries working with Queries.
  3. Complex queries and data retrieval is easier.
  4. Database locks and other sync errors are auto handled.

Finally, it has everything that you require at the moment.