SQLite Design and Concepts

  • Grant Allen
  • Mike Owens


The SQLite API is flexible, intuitive, and easy to use. It has two basic parts: the core API and the extension API. The core API revolves around two basic data structures used to execute SQL commands: the connection and the statement. Commands are executed in three steps: compilation, execution, and finalization. SQLite’s wrapper functions exec() and get_table() wrap these steps into a single function call, automatically handling the associated statement object for you. The extension API provides you with the means to customize SQLite in three difference ways: user-defined functions, user-defined aggregates, and user-defined collations.

Because SQLite’s concurrency model is somewhat different from other databases, it is important that you understand a bit about how it manages transactions and locks, how they work behind the scenes, and how they work within your code. Overall, the concepts are not difficult to understand, and there are just a few simple rules to keep in mind when you write code that uses SQLite.

The following chapters will draw heavily on what you’ve have learned here, because these concepts apply not only to the C API but to language extensions as well as they are built on top of the C API.


Query Processing Language Extension Page Cache Statement Handle Network File System 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Grant Allen and Mike Owens 2010

Authors and Affiliations

  • Grant Allen
  • Mike Owens

There are no affiliations available

Personalised recommendations