What is SQLite?


SQLite is a relational database management system contained in a C programming library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The lite in SQLite means light weight in terms of setup, database administration, and required resource. SQLite is the most widely deployed database in the world with more applications than we can count, including several high-profile projects.
In contrast to many other database management systems, SQLite is not a client–server database engine. Rather, it is embedded into the end program. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file. The database file format is cross-platform, it can freely copy between 32-bit and 64-bit systems or between any operating system. These features make SQLite a popular choice as an Application File Format.
SQLite uses dynamic types for tables. It means you can store any value in any column, regardless of the data type. It also allows a single database connection to access multiple database files simultaneously. This brings many nice features like joining tables in different databases or copying data between databases in a single command.
SQLite is a compact library. With all features enabled, the library size can be less than 500KiB, depending on the target platform and compiler optimization settings. If optional features are omitted, the size of the SQLite library can be reduced below 300KiB. SQLite can also be made to run in minimal stack space (4KiB) and very little heap (100KiB), making SQLite a popular database engine choice on memory constrained gadgets such as cellphones, PDAs, and MP3 players. SQLite generally runs faster the more memory you give it. Nevertheless, performance is usually quite good even in low-memory environments. 

So, how SQLite is serverless?

Normally, an RDBMS such as MySQL, PostgreSQL, etc. requires a separate server process to operate. The applications that want to access the database server use TCP/IP protocol to send and receive requests. This is called client/server architecture.

As we touch up earlier,  SQLite does NOT require a server to run. SQLite database is integrated with the application that accesses the database. The applications interact with the SQLite database read and write directly from the database files stored on disk.

How it is Self-Contained?

SQLite is self-contained means it requires minimal support from the operating system or external library. This makes SQLite usable in any environments especially in embedded devices like iPhones, Android phones, game consoles, media players, etc. If you want to develop an application that uses SQLite, you just need to drop a SQLite file into your project and compile it with your code.

How SQLite require Zero-configuration?

The serverless architecture make it usable without installation. There is no server process that needs to be configured, started, and stopped. Even, SQLite does not use any configuration files.

Why safe for transation?

All transactions in SQLite are fully ACID-compliant. It means all queries and changes are Atomic, Consistent, Isolated, and Durable. All changes within a transaction take place completely or not at all even when an unexpected situation like application crash, power failure, or operating system crash occurs.

Who use SQLite?

Many well known companies are using SQLite database due to its effective features and freeness. Here are the few popular projects/Applications that usage SQLite -

Browsers - Google Chrome, Mozilla Firefox, Opera, Safari, Android Browse, Mozilla Thunderbird etc.

Web application frameworks - Laravel, Drupal,  Trac, Ruby on Rails, Django, Bugzilla, web2py etc.

Middleware - ADO.NET, ODBC, XULRunner etc.

Applications - Adobe Systems, Skype, Service Management Facility, Evernote etc.

Operating systems - Google's Android, OpenBSD, FreeBSD, Windows 10, Oracle Solaris 10, Apple's Mac and Ios etc.