Re: Embedded database server or CoreData?
Re: Embedded database server or CoreData?
- Subject: Re: Embedded database server or CoreData?
- From: Keary Suska <email@hidden>
- Date: Thu, 11 Jan 2007 16:59:08 -0700
- Thread-topic: Embedded database server or CoreData?
on 1/11/07 4:06 PM, email@hidden purportedly said:
> I have an app that basically submits queries to a MySQL
> database and displays the results in an NSTableView - it works well.
> However, I am using the MCPKit (or sMySQL as it used to be called),
> which means the application has to be GPL; we were hoping to release
> it under the BSD license. So we've identified two options: 1) if
> it's going to be GPL anyway, we should imbed the MySQL server to make
> life easier for the users, or 2) make it all a Core Data app and
> release it under BSD.
>
> I'd rather use Core Data if at all possible. I've never used
> Core Data before and don't really know where to start. How should I
> go about making my MySQL database into a Core Data entity? Is this
> possible? If it is, how would you submit the SQL queries, or would I
> have to translate them all into Core Data formatted queries? If it
> is not possible, does anyone have any tips for embedding the MySQL
> server into the app?
You might hear this many times before the day is done, but you mention a
common misconception for Core Data. In addition to what the docs say, Core
Data is *not* an interface or technology for database access. It is nothing
more than a convenient API for persistently storing data, using a very
limited number of data storage types. There is no way, without a lot of
hacking, to have Core Data use any other persistent store than what it
currently supports, which for databases is only SQLite.
Core Data, IMHO, is also sufficient only for basic data manipulations, and
doesn't even support all of the capabilities of SQLite. I would say that if
you really need RDBMS functionality you probably don't want to use Core
Data, although Core Data may be sufficient for many applications.
If SQLite is sufficient for your purposes, then you will want to read the
Core Data docs thoroughly, as well as any online discussions you can find
regarding the limitations of Core Data. Keep in mind also that Core Data
tends to enforce data manipulations into the application, rather than
leveraging the database back-end.
If you need more than what Core Data/SQLite offers, I would recommend using
PostgreSQL as a back-end. This way you avoid MySQL's annoying licensing
restrictions and utilize a superior RDBMS. There was a post not too long ago
about an API for Postgres that uses Core Data-like syntax, and this may be a
route you may prefer. Just search on "PostgreSQL Core Data" in the list
archives, and you should find it without too much hassle.
Best regards,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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