SQLite
From Wikipedia, the free encyclopedia
Developed by | D. Richard Hipp |
---|---|
Initial release | August 2000 |
Latest release | 3.6.12 / 2009-03-31 |
Written in | C |
Operating system | Cross-platform |
Type | RDBMS Embedded database |
License | Public domain |
Website | http://www.sqlite.org/ |
SQLite is an ACID-compliant embedded relational database management system contained in a relatively small (~225 kB[1]) C programming library. The source code for SQLite is in the public domain.
Unlike client-server database management systems, the SQLite engine is not a standalone process with which the program communicates. Instead, the SQLite library is linked in and thus becomes an integral part of the program. It can also be called dynamically. The program uses SQLite's functionality through simple function calls, which reduces latency in database access as function calls within a single process are more efficient than inter-process communication.[clarification needed] The entire database (definitions, tables, indices, and the data itself) is stored as a single cross-platform file on a host machine. This simple design is achieved by locking the entire database file at the beginning of a transaction.
SQLite is embedded into a growing number of popular applications. For example, Mozilla Firefox stores a variety of configuration data, (bookmarks, cookies, etc.), in internally managed SQLite databases.
Contents |
[edit] History
SQLite was first designed by D. Richard Hipp in the Spring of 2000 while working for General Dynamics on contract with the United States Navy.[2] Hipp was designing software used on-board guided missile destroyer ships, which were originally based on HP-UX with an IBM Informix database back-end. The design goals of SQLite were to allow the program to be operated without database installation or administration. In August 2000, version 1.0 of SQLite was released, based on gdbm (GNU Database Manager).
[edit] Features
SQLite implements most of the SQL-92 standard for SQL. For example it has partial support for triggers and supports most complex queries, but it silently ignores referential integrity constraints (foreign key constraints)[3] unless one uses the .genfkey
command of the sqlite3
shell tool to compile them into triggers.[4]
SQLite uses an unusual type system for an SQL-compatible DBMS. Instead of assigning a type to a column as in most SQL database systems, types are assigned to individual values; in language terms it is dynamically typed. Moreover, it is weakly typed in some of the same ways that Perl is: 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). This adds flexibility to columns, especially when bound to a dynamically typed scripting language. However, the technique is not portable to other SQL databases. The inability to have the domain integrity coming from statically typed columns, as in typical databases, is a common criticism. The SQLite web site describes a "strict affinity" mode, but this feature has not yet been added.[5]
Several computer 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.
A standalone program called sqlite3 is provided which can be used to create a database, define tables within it, insert and change rows, run queries and manage an SQLite database file. This program is a single executable file on the host machine. It also serves as an example for writing applications that use the SQLite library.
SQLite also has bindings for a large number of programming languages, including BASIC, C, C++, Common Lisp, Java, C#, Visual Basic, Delphi, Curl, Lua, Tcl, REBOL, R, PHP, Perl, Ruby, Objective-C (on Mac OS X), Python, newLisp, Haskell, OCaml, Smalltalk and Scheme. There is also a COM (ActiveX) wrapper making SQLite accessible on Windows to scripted languages such as Javascript and VBScript. This adds database capabilities to HTML Applications (HTA).[6]
[edit] See also
- List of relational database management systems
- Comparison of relational database management systems
- SQLite Manager
[edit] Further reading
- SQLite Tutorial An article exploring the power and simplicity of SQLite.
[edit] References
- ^ "Distinctive Features Of SQLite". SQLite. March 3, 2008. http://www.sqlite.org/different.html. Retrieved on February 7, 2009.
- ^ Owens, Michael (2006). The Definitive Guide to SQLite. Apress. doi: . ISBN 978-1-59059-673-9.
- ^ "SQL Features That SQLite Does Not Implement". SQLite. January 1, 2009. http://www.sqlite.org/omitted.html. Retrieved on February 7, 2009.
- ^ "genfkey.README". SQLite. February 25, 2009. http://www.sqlite.org/cvstrac/fileview?f=sqlite/tool/genfkey.README. Retrieved on March 18, 2009.
- ^ "Frequently Asked Questions". SQLite. January 26, 2009. http://www.sqlite.org/faq.html. Retrieved on February 7, 2009.
- ^ "sqlite - Sqlite Wrappers". SQLite. February 7, 2009. http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers. Retrieved on February 7, 2009.
[edit] External links
- SQLite home page
- Linux Format interview with Richard Hipp
- Introduction to SQLite at Google Video
- Guardian interview with Richard Hipp
- FLOSS Weekly audio interview with Richard Hipp
|