How do I go about making a database app for the iPhone?
May 16, 2010 5:45 AM   Subscribe

What is the best way to go about creating a simple iPhone database access application? I'm looking to create an application which, although it could be very easily done in a web-based manner through the combination of php and mysql, I'd like the data to all be stored locally on the iPhone, in the app itself.

Is there an API within the iPhone SDK for such a thing? Is SQL even the best format for storing the data? The database itself is very simple (see screenshot of structure) and the interface for recalling data will also be simple. I intend to use scrolling wheel selectors for the user to select the five variables for the query (as per the hours and minutes in this picture).

I've looked all over, and I've seen a great many differing articles on how iPhones handle databases, but none of them are particularly clear. Can anyone give me a straightforward answer to my problem?

Essentially, I'm looking to run a php/mysql database locally on the iPhone with a minimalist interface.
posted by Biru to Computers & Internet (6 answers total) 3 users marked this as a favorite
 
Core Data might be what you're looking for.
posted by The Michael The at 6:08 AM on May 16, 2010


Best answer: If you're used to working with MySQL and SQL queries, then the easiest way to do it on the iPhone may be using SQLite3, a lightweight SQL database that comes with the iPhone OS. Running queries and such with SQLite is pretty similar to doing it with MySQL. Here's a tutorial I found with a quick web search.

Also, if you're more of a web person, you might look into writing a web app that uses HTML5 local storage. I've never done this, so I'm not sure the mechanics involved, but it might be easier than teaching yourself iPhone app programming if that's not a skill set you have already.
posted by captainawesome at 6:23 AM on May 16, 2010 [1 favorite]


Response by poster: Thanks to captainawesome for pointing me in the right direction reference SQLite.

This has a start to finish guide with all the coding examples I need also included.
posted by Biru at 7:15 AM on May 16, 2010




I found this series helpful
posted by mblandi at 5:00 PM on May 16, 2010


I used a program called handbase back when i had a palm pilot and it worked great. They have an IPhone version according to the website.

You would not even have to actually compile an app. It would allow you to build a custom database within the app itself.
posted by mrgoldenbrown at 6:54 PM on May 16, 2010


« Older Shakespeare quote in French   |   I messed up Ralph's computer-help! Newer »
This thread is closed to new comments.