1

I have some very fundamental question with regard to using Core Data vs Sql-lite for data persistance on the iOS platform (4.0+).

Basically I am looking to build some cross platform app which basically are quite data-intensive i.e get frequent updates from central db.

Based on what I have read below, I have come to the conclusion that even given the inherent performance advantage of the Core Data framework, I will have to utilise the FMDb for reading the SQL-Lite database directly as Core Data frame-work will be unable to work with a generated DB.

So my questions are the following

1) Is my conclusion above valid? Is there some other solution I am overlooking?

2) Can I use a mix of the two? My understanding is that the Core Data framework is primarily a object graph management api, ergo, Can I utilize the Core Data Framework to manage the in memory graph of the objects while still using FMDb to populate it?

I am quite new at iOS programming so any insights will be quite helpful.

Please feel free to ask any questions if I have not been very clear with my question.

Thanks

Shreyas N


P.S Before I get slapped on the wrist for asking something which might have been answered :) , here are the questions I looked into before posting this.

Core Data vs SQLite 3

Core Data vs. SQLite for SQL experienced developers

Portability of Core Data's SQLite file between OS X and iPhone OS

and some other place online using a bit of fundamental google-fu.

Community
  • 1
  • 1
JustShrey
  • 72
  • 11

1 Answers1

0

1) Is my conclusion above valid? Is there some other solution I am overlooking?

Not exactly. Depending on your server-side capabilities, you could make the SQLite database that is being pushed to the iOS client using Core Data on the server.

2) Can I use a mix of the two? My understanding is that the Core Data framework is primarily a object graph management api, ergo, Can I utilize the Core Data Framework to manage the in memory graph of the objects while still using FMDb to populate it?

Yes. I have done this in many projects.

xyzzycoder
  • 1,831
  • 13
  • 19
  • Thanks for the quick response, Could you please elaborate on point one. Any links or tutorials would be much appreciated. – JustShrey Feb 02 '11 at 08:59
  • If your server environment is running OSX, you could use Core Data on the server to create a SQLite database to be pushed to the client. – xyzzycoder Feb 02 '11 at 09:12
  • Interesting, never thought of the OSX server. However I dont think that we will be using that as our hosting service. Anyway thanks for the info. Actually am thinking of doing something like this on a linux server. i.e send updates/ additional data as a sql-lite file. – JustShrey Feb 03 '11 at 06:02