Two options for iOS data storage: CoreData vs. SQLite

Did research finding ways to setup a database for iOS. Looks like there are two main ways of executing this.

SQLite:

  • SQLite is, as advertised, lightweight.
  • SQLite uses less memory and storage space.
  • SQLite can be tedious and error-prone to code.
  • SQLite is supported on Android and Microsoft Windows Phone.

Core Data

  • Longer learning curve: it takes some study to understand.
  • Objects are easier to work with.
  • Underlying storage details are handled atomically (support for iCloud).
  • Undo and Redo features

Though SQLite database is the default persistent store for Core Data on iPhone, Core Data is not a relational database. It is actually a framework that lets developers store (or retrieve) data in database in an object-oriented way. With Core Data, you can easily map the objects in your apps to the table records in the database without even knowing any SQL.

 

Gone through some tutorials:

1. https://www.udemy.com/sqlite-programming-on-iphone-for-beginners/

2. http://www.appcoda.com/sqlite-database-ios-app-tutorial/

3. http://www.raywenderlich.com/913/sqlite-tutorial-for-ios-making-our-app

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *