views:

7749

answers:

5

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?

+3  A: 

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

Galwegian
+5  A: 

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.

Jeroen Heijmans
+2  A: 

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.

Chris Hanson
+1  A: 

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/

Lee
A: 

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

database