• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Learning SQLite by watching Core Data?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Learning SQLite by watching Core Data?


  • Subject: Re: Learning SQLite by watching Core Data?
  • From: Ben Trumbull <email@hidden>
  • Date: Mon, 23 Jun 2008 13:58:00 -0700

While Core Data technically uses SQLite, it does undocumented voodoo with SQLite,

Core Data only use public SQLite API.

For all intents and purposes, Core Data + SQLite should basically be considered a proprietary format.

It's the same SQLite file format as on any other platform.

The layout and naming of the tables and columns is undocumented because we do not support applications accessing our persistent stores out from underneath us. We cannot condone violating the encapsulation of our APIs.

It should be self evident there's no way to ensure the API contract we provide if the data is mutated by a third party. The only way for validation or delete rules to work correctly is if you actually use them.

As well, SQLite itself continues to evolve, and we use new features on new versions of OSX. The data files themselves are backwards compatible, but you may not be able to replicate the interaction between Core Data and SQLite on older releases. e.g. the 10.5 version of Core Data expects the 10.5 version of SQLite. Copying the SQL we send and then pasting it on 10.4 is not supported.

Guaranteeing we only use SQLite in a certain fashion would limit the improvements and features we could add in the future. To date, this constraint has been mostly requested by people wanting to write Windows software.

I notice you have never filed a bug against Core Data. Perhaps you should submit your feature request.

You might also want to pick up a copy of Martin Fowler's Patterns Of Enterprise Application Architecture if you'd like to understand more
about how to store and retrieve objects using relational databases

Martin Fowler has some interesting tidbits, but on the whole this book is not appropriate for desktop application development. It has little to do with how databases actually work, and is focused on enterprise Java server applications.
--


-Ben
_______________________________________________

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


  • Prev by Date: Re: caching NSCollectionView
  • Next by Date: Re: CoreData local and on server sync
  • Previous by thread: Re: Learning SQLite by watching Core Data?
  • Next by thread: caching NSCollectionView
  • Index(es):
    • Date
    • Thread