Hi John,

On 12/7/08, [EMAIL PROTECTED] wrote:

1) a) generate my application in XCode, use the sqlite storage option, put
in some dummy data, then use sqlite3 to explore the resulting schema, b)
transform my data into the new schema using sqlite3 and sql.  Replace the
sqlite file created by my application with the new one containing my real
data.

Having played around with Core Data for a while my instinct is that
option 1 would present difficulties - Core data is particular about the
database.  Whenever, I've had to make a minor tweak to a core data
database outside of core data, I've had a sense of dread.  I'd go
straight for option 2 without spending a second on option 1.

That said, go ahead and dabble briefly with option 1, maybe you'll get
lucky.  Remember to consider metadata.

2) writing an import routine for my application, using NSTask (?) and
sqlite3.  This would likely only be used once.

I did something like that to bootstrap my point-of-sale application. I
didn't use NSTask, I just wrote methods on the relevant window
controllers to import tab-delimited customer and product data which I'd
exported from a filemaker database.  I wrote nested loops to un-flatten
the data into a more sophisticated schema.  Core data makes all that
pretty easy once you parse the tab-delimited data into objects, which
cocoa makes easy.

I thought, like you, that my code would only be used once but I ended up using it a dozen times while we were developing the app and changing our minds about the schema. And, if and when I have other customers for the
app, I'll use it again.

Let me know if you'd like some relevant snippets.

Steve

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to