Tag ‘sqlite’

SQLite wrappers on iPhone

Brad Midgley

On a recent project that needed to keep data in sqlite, I experimented with an implementation of ActiveRecord and also sqlitepersistentobjects. I had passed up a few others that were too complicated or licensed under something like the GPL that prevented commercial work.

While the ActiveRecord author has to get an award for the quickest replies to email, sqlitepersistentobjects was easiest to get working. You don’t even “set up” a database for this wrapper. When you save an object an sqlite database “somewhere” is updated with the right tables. This presumably also handles updates to the metadata but I didn’t play with that.

With iPhone OS 3.0 coming up in a few months and including CoreData, this becomes a question of what to use for legacy devices or projects released before summer. CoreData is going to become the standard way to persist data locally.

Continue reading

SQLite basics: How to get a simple db into an iPhone app

Radu Cojocaru

sqlite-iphone-baseSQLite is a small SQL database engine and it makes a good fit for iPhone apps. You can create a SQLite database and its tables using Base app: http://menial.co.uk/software/base/. Base is a lightweight Mac OS X application.

Continue reading