Re: Using existing SQLite database with core data?
Re: Using existing SQLite database with core data?
- Subject: Re: Using existing SQLite database with core data?
- From: mmalc crawford <email@hidden>
- Date: Mon, 7 Apr 2008 00:13:21 -0700
On Apr 6, 2008, at 11:58 PM, Quincey Morris wrote:
On Apr 6, 2008, at 22:44, mmalc crawford wrote:
The fact that Core Data is an object graph management and
persistence framework does not in an of itself preclude it from
reverse engineering an existing database. EOF is also an "object
graph management and persistence framework" but it is able to
create a model by interrogating a database. Core Data happens not
to have that functionality.
[...]
Another way of saying this is that we have to regard Core Data as
destroying (well, "masking" might be more accurate) the databaseness
of the sqlite stores it uses, from the point of view of its client
code.
I think the term you're looking for is "façade".
Simply using an existing database as the persistent store, if it
were possible now, wouldn't put the databaseness back in. That
specific point, I assume, is why Apple explicitly warns that "Core
Data is not a RDBMS."
This is irrelevant. The question is not whether Core Data could be
"turned into a database"...
Anything is possible in a future incarnation of Core Data, but the
OP did ask, "*Is* there a reasonable way to get core data to use an
existing database...?" (my emphasis).
The OP asked, "Is* there a reasonable way to get core data to use an
existing database", to which you gave as the reason for the answer
"No", "Core Data is an object graph management system with a
persistent store, not a database client or server" -- this is a non
sequitur.
Core Data could still be "an object graph management system with a
persistent store" whilst at the same time using an RDBMS as a back end
(one of the supported persistent store types) and being able to
interrogate the database to derive a model. This is what EOF offers.
As Chris pointed out, if you would like a future version of Core Data
to have this functionality, file an enhancement request at <http://bugreport.apple.com/
> -- I'd add, ideally providing a good business case to support the
request.
mmalc
_______________________________________________
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