5

Basically, I'm writing an iOS app that makes use of a huge database that will not be edited at all. Between these two, I'm looking for faster query speeds. I have never used any SQLite or Core Data in my developing lifetime, so before I take a dive writing anything, I want to find out which of these (or if any alternatives) would be better for my task.

Any performance data or suggestions would be greatly appreciated.

Edit: Neither SQLite nor Core Data was able to deliver the performance I needed (although SQLite performed better). I decided to go with SQLite (with FMDB) and use multi-threading to get rid of stutters that occur when querying multiple times.

Jay
  • 299
  • 4
  • 13

3 Answers3

8

It depends on how you want to manage your data, if you want a relational database, use sqlite and if you want to save model objects (in the sense of the model-view-controller design pattern) to a file and get them back again, use Core Data.

According to me both are same for large database, in sqlite you can use transactions for getting huge data faster.

This link might helps you better.

Hope this helps you..

P.J
  • 6,547
  • 9
  • 44
  • 74
1

For me I will always use core data whenever possible. As it is easy to use and manage. For more you can check these links

  1. Core Data vs SQLite 3
  2. Use CoreData or SQLite on iPhone

Here are good tutorials of Ray Wenderlich on Core Data

  1. Core Data on iOS 5 Tutorial: Getting Started
  2. Core Data Tutorial: How To Preload/Import Existing Data
Community
  • 1
  • 1
Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
  • The thing is that I only need to read data, and most of the answers doesn't specifically answer that. – Jay Feb 02 '13 at 08:14
  • It doesn't going effect whether you are reading or writing data. These answer hold for using (by using it means reading or writing or both) core data or sqlite. – Inder Kumar Rathore Feb 02 '13 at 08:17
0

If your concern is performance, Core Data is good and can optimize the memory efficiently. Though please have a look at this pages that can help you Efficient storage and Concerning CoreData vs SqlLite. Hope this can help.

Community
  • 1
  • 1
βhargavḯ
  • 9,786
  • 1
  • 37
  • 59