SQLite
From Free net encyclopedia
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 method can reduce the latency incurred when executing queries and processing their result sets. The entire database (definitions, tables, indices, and the data itself) is stored as a single standard file on the host machine. This simple design is achieved by locking the entire database file at beginning of a transaction.
SQLite's author sells training, direct technical support contracts and add-ons such as compression and encryption.
Contents |
Features
The library implements most of the SQL-92 standard, including transactions that are atomic, consistent, isolated, and durable (ACID), triggers and most of the complex queries.
SQLite uses an unusual type system. Instead of assigning a type to a column as in most SQL database systems, types are assigned to individual values. For example, one can insert a string into an integer column (although SQLite will try to convert the string to an integer first, if the column's preferred type is integer). Some users see this as an innovation that makes the database much more useful, especially when bound to a dynamically typed scripting language. Other users see it as a major drawback, since the technique is not portable to other SQL databases. SQLite prior to version 3 made no attempt to coerce data to the column's type.
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). This concurrent access situation would change when dealing with temporary tables. However, a multithread deadlock issue will arise[1]. This issue was addressed in version 3.3.4, released February 11, 2006.
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
- SQLite is embedded in the REALbasic framework, enabling applications developed in REALbasic for Windows, Linux or Mac OS X to use the SQLite database.
- 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, which implements the Python DB API version 2.0 (PEP 249).
- PHP comes with SQLite included, starting with PHP 5. SQLite also works with PHP 4 but was not included with it.
- Since Lazarus 0.9.8 and Free Pascal 2.0.0, SQLite is available for pascal programmers. There is a tutorial here.
- Mac OS X v10.4 ships with SQLite built in (
sqlite3
), and it's one of the data store options in Apple's Core Data API.
Products using SQLite
- SQLite is used by Kexi database environment, as a default built-in database engine.
- SQLite has been used in storing the index for a DVD set containing all the published issues of The New Yorker magazine.
- Yum, the package management tool for Fedora Core, has switched to SQLite and pysqlite for data storage and XML parsing since Fedora Core 4. According to feedback from users, the performance improvement is impressive with reduced memory consumption as well.Template:Fact
- The OpenOffice.org developers have considered embedding SQLite in the Base database module, but this depends heavily on the progress of sqlite-sdbc-driver, which is still in alpha status at the moment. Currently they have decided[2] to use HSQLDB, but the option is still open if and when the sqlite-sdbc-driver becomes mature and reliable.
- Also see this how-to: Using SQLite Database with OpenOffice.org.
- Open Outlook Connector, an open source Microsoft Outlook/MAPI connector has also made use of SQLite.
- A number of Apple's offerings utilise SQLite, including Apple Mail and the RSS manager which ship with OS X. Apple's Aperture software stores image information as an SQLite database.
- Monotone, a free distributed version control system, uses it.
- The new storage system implemented in the Mozilla Core (MozStorage) uses SQLite. Mozilla Firefox 2.0 will make use of this SQLite-based system to store bookmarks and browsing history. SQLite is also used or considered for Mozilla Calendar and Mozilla Thunderbird.
- PyKota, a free print quota and accounting solution, can use SQLite as its database backend.
See also
- SQLite Database Browser
- List of relational database management systems
- Comparison of relational database management systems
External links
- SQLite home page
- pysqlite - A Python Wrapper.
- DBD::SQLite - A Perl module on CPAN.
- Sqlite-ruby - A Ruby Interface.
- SQLiteManager - A PHP4 multilingual web based tool to manage SQLite database
- SQLite Developer - SQLite visual database manager
- SQLiteBrowser - SQLite visual database browser
- SQLite ODBC Driver
- Visual SQLite - SQLite GUI interface for Windows
- SQLiteSpy - Win32 GUI with Unicode support, Freeware
- SQLite Administrator
- SQLite.NET 2.0 - An ADO.NET 2.0 provider for SQLite
- Using SQLite Database with OpenOffice.org (via ODBC or sqlite-sdbc-driver)
- A tutorial on SQLite3
- Interview with Richard Hipp
- Dynamic Relational Conceptsde:SQLite
es:SQLite fr:SQLite id:SQLite it:SQLite nl:SQLite ja:SQLite pl:SQLite pt:SQLite ru:SQLite fi:SQLite zh:SQLite