Has anyone tried any of the SQLite3 wrapper APIs to simplify database functionality on iPhone?

Coming from a non-SQL background, I had to complicate SQLite3 for several days. Has anyone had good results using any of the SQLite3 wrapper APIs? Do they work reliably? What's better? I can also hear Core Data coming to the iPhone. Not sure if this information is trustworthy or not, but maybe some of you know: Will there be Core Data for iPhone at some point?

0


a source to share


4 answers


If you are just starting out now, I would use Core Data.

I spent some time last year looking at various wrappers at the time. In the end I didn't use them.



I think the NDA was still in place when I looked, so I may have missed the best ones, but I found most of them were very thin wrappers. For my purposes, that meant it added an external dependency, didn't preserve a lot of typing, and I probably still had to dive into using sqlite function calls sometimes anyway. It just wasn't worth it.

+3


a source


FMDB is easy to use and abstracts some of the nasty SQLite from you, but still provides SQL.

I used it in a project, but I subclassed it to add my own partial-OO layer. The advantage of this approach is that if I need more speed or something I didn't anticipate (like triggers), I can do it. There is no "workaround" in Core Data and I have to rely on core data optimization, memory usage, etc.



Another difference is that Core Data will allow your application to remain completely OO. With FMDB or another database solution, you are always tightly connected with the organization of the database. This is a design decision, not one that you can change later.

+4


a source


Why not specify CoreData using SDK 3.0?

If for some reason you need to support 2.x, you should look at SQLitePersistentObject . It is slow and has some bugs, but it is VERY easy to use. Unfortunately, it is no longer under active author development.

+2


a source


Additional Notes : Some time ago, with a small sample project (2.x), I used fmdb . As far as I remember, it was pretty easy to use. However, this required knowledge of SQL.

+1


a source