SQLite
SQLite is an ACID-compliant relational database management system contained in a relatively small C library. It is a public domain project created by D. Richard Hipp.
Unlike the usual client-server paradigm, the SQLite engine is not a standalone process with which the program communicates, but is linked in and thus becomes an integral part of the program. Therefore the primary communication protocol are direct API calls within the programming language. This can have a positive impact on the amount of overhead, latency times and overall simplicity. The entire database (definitions, tables, indices, and the data itself) is stored as a single standard file on the host machine. Its simple design is achieved by locking the entire database file at beginning of a transaction.
Features
The library implements most of SQL-92 standard, including transactions that are atomic, consistent, isolated, and durable (ACID), triggers and most of the complex queries. No type-checking is done. You can insert a string into an integer column, for example. Some users see this is an innovation that makes the database much more useful, especially when bound to a typeless scripting language. Other users see it as a major drawback.
Several processes or threads may access the same database without problems. Several read accesses can be satisfied in parallel. A write access can only be satisfied if no other accesses are currently being serviced; otherwise the write access fails with an error code (or can automatically be retried until a configurable timeout expires).
A standalone program called sqlite is provided which can be used to query and manage SQLite database files. It also serves as an example for writing applications that use the SQLite library.
Language bindings
The library can be used from C/C++ programs, but bindings for Tcl and several other scripting languages are also available.
There is a DBI/DBD module for Perl available on CPAN, DBD::SQLite, that is not an interface to SQLite, but rather includes the entire SQLite database engine in itself and doesn't need any additional software.
There is also a Python module for it called PySQLite.
PHP comes with SQLite included, starting with PHP 5. SQLite also works with PHP 4 but was not included with it.
See also
External links
- SQLite home page
- DBD::SQLite - A Perl module on CPAN.
- Sqlite-ruby - A Ruby Interface.
- SQLiteManager - A PHP4 multilingual web based tool to manage SQLite database
- SQLiteBrowser - SQLite visual database browser
- SQLite ODBC Driver
- SQLite C++ Wrapper