0

I'm trying to develop one iPhone App like the Recipes example of Apple, but I have one question? I want to show data that I have stored in a database, but I don't want user to add data or edit this information. I only want to show the data in a table view like name, description, image, etc. What's the best option? Core Data (and how I add the data) or Sqlite data base?

Thanks for all.

Jordi

Lie Ryan
  • 62,238
  • 13
  • 100
  • 144
Jordi
  • 1
  • Core Data uses SQLite behind the scenes. – Paul Tomblin Oct 30 '10 at 19:37
  • Tomorrow it could use FooBarBazDB instead of SQLite, so don't depend on the above holding true for all time. – jer Oct 30 '10 at 19:48
  • Is the database on in the app's bundle? Plists are your friend! `[NSArray arrayWithContentsOfFile:@"myfile.plist"]` <-- array of NSDictionaries. Each NSDictionary represents a record. –  Oct 30 '10 at 20:19
  • possible duplicate of [Is Core Data useful for readonly data too?](http://stackoverflow.com/questions/1638443/is-core-data-useful-for-readonly-data-too) – Brad Larson Oct 30 '10 at 21:40

2 Answers2

1

For such a simple use case, use Core Data. It is higher level, significantly easier to code for (no, really, it is), and the documentation is quite thorough, both from Apple and from third parties.

bbum
  • 162,346
  • 23
  • 271
  • 359
0

It almost sounds like you don't need a database at all. If the data is static and not very complex, one alternative would be to create a plist as part of your application bundle, and read that plist into an ‘NSArray‘ or ‘NSDictionary‘ using the technique in this question: Plist Array to NSDictionary

Community
  • 1
  • 1
Jim Flanagan
  • 2,129
  • 15
  • 19