Persistentdata for beginners: SQLite 3 API

SQLite 3 API provides the standard SQLite C API on the Symbian platform. We introduced this component last year as a Symbian^3 feature to make it easier to port applications written in C (see bug 305).

If you’d like to learn more about SQLite, then I recommend the talk below. The lead author of SQLite, Dr Richard Hipp, explains all about SQLite, who uses it and what makes it unique. He describes the architecture and summarises the C and TCL interfaces. The talk is about 30 minutes long, followed by 15 minutes of questions and answers from the audience.

Introduction to SQLite – Google TechTalks May 31, 2006

Both Symbian SQL and SQLite 3 API use SQLite as their database engine.

As mentioned in the last post, Symbian SQL wraps up SQLite in a client-server architecture and offers an optimised integration of SQLite with the rest of the platform. This includes Symbian-specific features such as a Symbian C++ API, platform security, and performance/RAM usage optimisation.

The advantages of Symbian SQL make it the recommended choice for most applications, but the SQLite C API may be a better choice if you are porting code already using SQLite or developing new applications in C that will use SQLite. If you’re using Qt to write your application, you can use the QtSQL API (which has a driver for SQLite).

SQLite 3 API

You can find the sqlite3.h header file in \epoc32\include\stdapis. See Further resources below for links to API reference documentation. Client code should link to sqlite3.lib.

The sqlite3api component uses version 3.6.3 of SQLite. Note that the current build configuration disables virtual tables, SQLite loadable extensions and the ability to issue progress callbacks during long-running SQL statements.

Further resources

SQLite is comprehensively documented on the SQLite website (sqlite.org). Recommended pages for the C API are:

Coming up next…

The Store component will feature in the next part of the Persistentdata for beginners series.

Store has been a part of the Symbian platform since 1995. It provides essential APIs for data management – streams and stores.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: