← Back to Glossary
Developer Glossary
SQLite logo

SQLite

Database

SQLite is a database engine that runs inside your application, not beside it. There is no server process, no configuration file, no port to open, no credentials to manage. The entire database lives in a single file on disk. It sounds too simple to be useful for real work, but SQLite is the most deployed database engine in the world, it ships inside every smartphone, every web browser, every copy of macOS and Windows. I use SQLite for local development, for embedded analytics in client applications, and increasingly for production workloads via Turso and Cloudflare D1 where the edge computing model makes a server-based database impractical.

The Backstory

D. Richard Hipp created SQLite in the spring of 2000 while working on a contract for the United States Navy. He was building software for guided missile destroyers that needed to run without a database administrator. The existing options, Oracle, PostgreSQL, even MySQL, all required a running server process, network configuration, and ongoing maintenance. Hipp needed a database that a military system could use without human intervention, on hardware that might lose power at any moment, in environments where running a separate database server was not an option. So he wrote one. SQLite 1.0 was released in August 2000, and it was radically different from everything else in the database world. No client-server architecture. No daemon. Just a C library that you link into your application. The entire engine compiles into a single 600-kilobyte file. By 2004, SQLite was embedded in the Symbian OS for mobile phones. When Apple chose it for the iPhone in 2007 and Google chose it for Android in 2008, SQLite became the most widely deployed software module in history. As of 2024, there are an estimated one trillion active SQLite databases running across all devices worldwide.

Under the Hood

SQLite achieves its reliability through a design philosophy that borders on obsessive. The codebase has 100% branch test coverage, not just line coverage, but every possible branch of every decision point in the code is tested. The test suite contains over 90 million test cases. Hipp has said that the ratio of test code to production code is roughly 600:1. The database uses a write-ahead log (WAL) that ensures every transaction is atomic, consistent, isolated, and durable, even if the power fails mid-write. The file format is stable and backward compatible to version 3.0.0, released in 2004, a database file created 20 years ago will open without modification in today's SQLite. This stability is why the Library of Congress recommends SQLite as a storage format for digital preservation. For my client projects, the practical benefit is that SQLite databases are trivially portable. You can email a database. You can check it into version control. You can copy it to an edge node. There is no export step, no dump file, no migration script. The database is the file.

Visit: sqlite.org

Want a lightweight, embedded database in your next app?

or hi@mikelatimer.ai