SQLite
SQLite | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() ![]() | |||||||||||
![]() ![]() | |||||||||||
Tipe | serverless relational database management system (en) ![]() ![]() | ||||||||||
Versi pertama | Agustus 2000 ![]() | ||||||||||
Versi stabil | |||||||||||
Genre | Development Library | ||||||||||
Lisensi | Public domain | ||||||||||
Eponim | SQL ![]() | ||||||||||
Bagian dari | format berkas ![]() | ||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
'SQLite merupakan sebuah sistem manajemen basisdata relasional yang bersifat ACID-compliant dan memiliki ukuran pustaka kode yang relatif kecil, ditulis dalam bahasa C. SQLite merupakan proyek yang bersifat public domain yang dikerjakan oleh D. Richard Hipp.
Tidak seperti pada paradigma client-server pada umumnya, Inti SQLite bukanlah sebuah sistem yang mandiri yang berkomunikasi dengan sebuah program, melainkan sebagai bagian integral dari sebuah program secara keseluruhan. Sehingga protokol komunikasi utama yang digunakan adalah melalui pemanggilan API secara langsung melalui bahasa pemrograman. Mekanisme seperti ini tentunya membawa
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 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.
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). When you create temporary tables, however, multithread locking issue will arise[1]. The recent update version (3.3.4) should resolve this problem.
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. 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.
Products
- 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.
- The OpenOffice.org developers has considered to embed SQLite in the Base database module, but this heavily depends on the progress of sqlite-sdbc-driver, which is still in alpha status at the moment. Currently they have decided[2] to go with HSQLDB, but the option is still open if and when the sqlite-sdbc-driver became mature and reliable later.
- 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.
See also
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
- SQLite Spy - Another SQLite GUI interface for Windows
- 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 to SQLite3