SQLite3: open-source Embedded Database
SQLite (SQLite3) is a relational database management system contained in a C library. 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 is a C-language library that implements a serverless, zero-configuration, small, fast, self-contained, high-reliability, full-featured, transactional SQL database engine. SQLite is the most used database engine in the world. SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day.
The database file format is cross-platform - you can freely copy a database between 32-bit and 64-bit systems or between big-endian and little-endian architectures. These features make SQLite a popular choice as an Application File Format.
- Unlike most other SQL databases, SQLite does not have a separate server process. 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.
- Think of SQLite not as a replacement for PostgreSQL or MySQL but as a replacement for fopen().
- SQLite uses dynamic typing. Content can be stored as INTEGER, REAL, TEXT, BLOB, or as NULL.
- Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes (write) to the database at a specific moment in time, however.
- SQLite uses reader/writer locks to control access to the database. When any process wants to write, it must lock the entire database file for the duration of its update. But that normally only takes a few milliseconds. Other processes just wait on the writer to finish then continue about their business.
Project Design and Security
- SQLite is a compact library. With all features enabled, the library size can be less than 600KiB, depending on the target platform and compiler optimization settings.
- Depending on how it is used, SQLite can be faster than direct filesystem I/O.
- Transactions are ACID even if interrupted by system crashes or power failures.