It’s been two years since I first wrote on using SQLite for iPhone SDK. Since then, iOS has come a long way, especially when it comes to storing data. But still, much remains the same. For instance, FMDB is still a great way of accessing SQLite databases directly, and if you’re most familiar with SQL and don’t want to learn too much new stuff (learning Objective-C and Cocoa can be enough by itself), this is a great way to write your first apps.

But, with iOS 3.0 came Core Data, and I was so happy when it did. Marcus Zarra wrote a great book with PragProg that I wholeheartedly recommend: it’s easy to read and thorough at the same time. I followed his workshop at NSConf ‘09, which was great, and I understand people have enjoyed the videos he and Scotty produced over at iDeveloper TV. I use Core Data in all my projects now, and its backed by SQLite, so I get a great mapping while having the performance of the database.

It being the year of the NoQL-databases, though, a post wouldn’t be complete without saying you can now ditch SQLite all together and use CouchDB. CouchBase have made a developer preview of CouchDB for iOS that I’m looking forward to try out. CouchDB has great replication, but I still need to learn more about how to handle security and access to data so to not give all my application users the keys to the “castle”.

Happy coding :-)

Categories: Technology