iOS Core Data - Sql-lite Integration & Its Implications on Data Portability
I h开发者_开发问答ave 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.
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.
精彩评论