Re: Data managment
Re: Data managment
- Subject: Re: Data managment
- From: Jens Alfke <email@hidden>
- Date: Mon, 12 Apr 2010 09:33:07 -0700
On Apr 12, 2010, at 7:36 AM, Billy Flatman wrote:
> Is it possible to get core data data models to save differently, one for a document save which for example might be an XML format, and one into the applications bundle as an SQLite file?
> That way when a document is saved the main database won't be duplicated, just the document specific data.
You can have different documents with different data models, without needing to use different on-disk data formats. In other words, you can have two different document types both of which use SQLite.
CoreData is very powerful, but it’s going to take over your app — you’ll end up writing everything using managed objects and bindings. Which can be good, but there’s a whole ‘nother learning curve for that. It can be easier to just use a data storage API directly even if it doesn’t get you all the bells and whistles.
If you want to go with SQLite, you might consider using one of the Cocoa adapter libraries so you can use an Objective-C API and not have to deal with translating between char* and NSString all the time. The two I know of are FMDB and QuickLite.
There are also other data storage libraries that have a simpler data model than sqlite (they’re like on-disk NSDictionaries) so they’re a bit simpler to use and can potentially run faster. Tokyo Cabinet seems like the main contender in that area right now. It comes with C and C++ APIs; I don’t know if anyone’s adapted it to Objective-C yet.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden