views:

247

answers:

4

I am building an iPhone app that contains medical information for medical professionals.

The data has a sort of taxonomy which is easily represented in the form of e.g. a mind map on a piece of paper. On the device, the idea is to navigate through a series of items in table views to get to a detail view with text and picture information. The no of child views/nodes varies from 1-4, and the number of items on each table view varies from 2 to 20. The detail items/views are about 120 in total.

Now, I have reasonably strong Obc-C/Cocoa skills (mostly mac), but have about zero experience from working with actual databases. So far, I have hard coded the information in nested NSArray/NSDictionary structures (much the way Apple demonstrates in its table view tutorial). This has obvious disadvantages, and I am considering swithcing to use some sort of database instead.

How would you, experienced iPhone programmers, solve a problem like this? SQLite database? Base app on Core Data?

Thankful for all sorts of help and suggestions.

-Gregor, Sweden

edit: implemented navigation/table view hierarchy with plist. Works like a charm. Will look into core data, if not for this project then for another with larger amounts of data.

+2  A: 

I've created an app with an SQLite3 backend that worked out quite well. Performance was good.

If I were to start a new project from scratch, I'd definitely look at Core Data, as long as it's okay the project only runs on 3.0+ devices, as Core Data is a new feature in 3.0.

Ask your client if it's a big deal that the app not support 2.2.1 (last I looked at AdMob, that's still about 25% of iPhone users and 50% of iPod Touch users). If it is a big deal, then your answer is forced upon you.

Shaggy Frog
A: 

Look into RDF and OWL, you might find some C libs to handle data in those formats, which I think is more adequate than trying to fit graphs into a relational database.

Chochos
+1  A: 

Core Data in the iPhone 3.0 SDK. Adoption rates of the 3.0 SDK are huge! It's a software upgrade, free on iPhone. Hardware updates of Open GL ES 2.0 are more costly, people are slower to adopt the new hardware. But research online shows adoption of 3.0 is high.

Improved performance, uses SQL Lite underneath, and it's cross platform to Mac OSX. Lots of how to's out there for it as well.

// :)

Spanky
A: 

CoreData on the iPhone makes this trivial, have a look at the Introduction Tutorial, then take a look at some of the other examples (there's complete versions of the tutorial app and the extended versions in the Dev Centre).

Timothy Walters