0

I'd like to write an app which use Core Data and need some solution to insert information into my database. Could I use phpmyadmin for filling the db and then just export to sql or I need another solution?

Johannes Kuhn
  • 14,778
  • 4
  • 49
  • 73
nazarov
  • 167
  • 1
  • 11

3 Answers3

0

Well, phpMyAdmin is for MySQL and Core Data uses SQLite.

It's possible though. You could export as SQL in phpMyAdmin and replace one or two things to make it compatible with SQLite.

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
0

You could indeed populate an SQLite (note: not SQL) database directly and then use this with Core Data. However, I'd recommend against this, because it may cause maintenance problems down the road when the schema for Core Data's SQLite storage changes under your feet. Consider using Core Data itself to populate the database. And if you do this, you can fairly easily later on change the backing strategy of Core Data from SQLite to something else without incurring lots of work elsewhere.

More discussion:

Populating sqlite db created by CoreData

Any way to pre populate core data?

http://www.raywenderlich.com/980/core-data-tutorial-how-to-preloadimport-existing-data

http://forums.pragprog.com/forums/90/topics/2436

Community
  • 1
  • 1
occulus
  • 16,959
  • 6
  • 53
  • 76
0

Also, see Christian Kienle's Core Data editor

Scott Ahten
  • 1,141
  • 7
  • 15