native iPhone database, all data on iPhone

Is it possible to make a big 50MB database native on the iPhone? So that it can be searched very quickly in a smart way? With SQlite?

Answers


Yes, you can use SQLite on the iPhone. Since the database is just a file, you can add the 50 MB file to your application, and that's it. SQLite's performance on the iPhone is good, in my experience, although YMMV depending on your exact table layout and indexes.

In my opinion, it's definitely worth checking out the FMDB wrapper suggested by Galwegian; it makes the programming quite a bit easier than directly using SQLite library itself.

Although 50 MB is way below the limit, be aware that a 50 MB application will take some time to download for people, and people cannot install it from the AppStore without either a WiFi connection or iTunes.


SQLite is part of the supported API available on the iPhone.

Also, 50MB isn't really a "large" database. SQLite will handle it without even blinking.


There's some talk to a SQLite for iPhone SDK in this article. It uses FMDB, which is a cocoa wrapper fro SQLite3


By all means use SQLite. I find it very easy to use. If you need some sample code check out http://tetontech.wordpress.com/2008/06/28/iphone-objective-c-sqlite-development/

If you would like an easy to use wrapper check out QuickConnectiPhone. This framework has a wrapper that you could pull out and use.

https://sourceforge.net/projects/quickconnect/


I know the OP probably has long found their solution by now, but I thought I'd add (for the sake of anyone landing here from a google search) our database SDK, RDM Embedded, from Raima, as another possible solution.

As far as I can tell, it's the only other native database (not a wrapper) alternative to SQLite on the iPhone, and the only one to support both network and relational database models.

We have some info at raima.com/iphone


Need Your Help

Building and using shared libraries with bjam

linux gcc ubuntu bjam boost-build

Using bjam on ubuntu, I am building a c++ shared library and trying to use it in an executable. I have to build as shared since it wont link as static (lots of undefined references arise). Thats fi...

how to change listview data on spinner selection?

listview arraylist android-sqlite spinner android-spinner

i have a spinner and a listview in a view. data is coming in both from sqlite .