Skip navigation.
 
mlRe: Learning SQLite by watching Core Data?
FROM : Ben Trumbull
DATE : Mon Jun 23 22:58:00 2008

>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

Related mailsAuthorDate
mlLearning SQLite by watching Core Data? David Carlisle Jun 23, 20:06
mlRe: Learning SQLite by watching Core Data? Ilan Volow Jun 23, 20:40
mlRe: Learning SQLite by watching Core Data? I. Savant Jun 23, 21:05
mlRe: Learning SQLite by watching Core Data? David Carlisle Jun 23, 21:19
mlRe: Learning SQLite by watching Core Data? Hamish Allan Jun 23, 21:29
mlRe: Learning SQLite by watching Core Data? I. Savant Jun 23, 21:29
mlRe: Learning SQLite by watching Core Data? I. Savant Jun 23, 21:30
mlre: Learning SQLite by watching Core Data? Ben Trumbull Jun 23, 22:14
mlRe: Learning SQLite by watching Core Data? Ben Trumbull Jun 23, 22:58
mlRe: Learning SQLite by watching Core Data? Jens Alfke Jun 23, 23:27
mlRe: Learning SQLite by watching Core Data? David Carlisle Jun 23, 23:35
mlRe: Learning SQLite by watching Core Data? Jens Alfke Jun 23, 23:44
mlRe: Learning SQLite by watching Core Data? David Carlisle Jun 23, 23:52
mlRe: Learning SQLite by watching Core Data? David Carlisle Jun 24, 00:13
mlRe: Learning SQLite by watching Core Data? Steven W Riggins Jun 24, 00:18
mlRe: Learning SQLite by watching Core Data? Jens Alfke Jun 24, 00:37
mlRe: Learning SQLite by watching Core Data? Andy Lee Jun 24, 00:40
mlRe: Learning SQLite by watching Core Data? Allen Cronce Jun 24, 16:05