SQLite Ships Inside Essentially Every Modern Smartphone
There is a specific line on the SQLite website that every mobile developer should read once: SQLite is found in every Android device and in every iPhone and iOS device. The project estimates that with more than four billion smartphones in active use, each holding hundreds of database files, there are over a trillion SQLite databases in the world. That number is an estimate, but the underlying fact is not. The engine is not an option you add to a phone. It is part of the platform you are already targeting.
What that means in practice is that your dependency on SQLite usually starts before your first line of code. Android's own system services have historically kept their state in SQLite files, and application frameworks expose it through higher level APIs. On iOS, apps reach it directly or through Core Data, whose default persistent store is a SQLite database. Mobile browsers keep history, cookies, and bookmarks in it. So does the messaging layer, the contact store, and a long list of preinstalled applications. Even a phone that appears to contain no databases at all is running on top of dozens of them.
The reason the engine fits mobile so well is a set of design decisions made decades before smartphones existed. SQLite is a library, not a server. There is no daemon to start, no port to bind, no configuration file, and no separate process to authenticate to. The entire database lives in one ordinary file that can be copied, backed up, or moved to another device, and it stays readable across architectures and byte orders. It is written in C with a small footprint, and it is dedicated to the public domain rather than released under a restricting license, which removed the last barrier to shipping it inside every operating system vendor's stack.
Durability is the other half of the story. A phone can lose power mid-write, be killed by the operating system to reclaim memory, or crash inside an app, and the database is expected to survive all three. SQLite is built around ACID transactions that hold up through abrupt process termination, which is exactly the guarantee a device without a shutdown sequence needs. That reliability is not free. It is paid for with a test suite that has been pushed to full branch coverage, with test code many times larger than the engine itself.
The constraints are equally concrete, and senior developers learn them the hard way. SQLite allows many readers but only one writer at a time, which is why write amplification becomes a problem when several threads in an app try to write simultaneously. Write ahead logging mode is the standard fix, and it is not the default in every environment. Because the database is a file, it inherits the behavior of the underlying filesystem, including locking quirks on network shares. And because there is no server process, there is no network protocol: it cannot be used the way a team uses PostgreSQL across a network.
For application design, the useful mental model is to treat SQLite as a file format with a query language rather than as a small database server. You ship schema migrations with the app, you version the file, you choose durability settings deliberately, and you accept that concurrent writes must be serialized somewhere. Those decisions are the same ones a backend developer makes, applied at a different scale, and the fact that the engine is invisible makes it easy to postpone them until a crash report forces the issue.
What makes SQLite interesting as a case study is how quiet its ubiquity is. It started in 2000 as a solution to a specific problem in software for US Navy destroyers, and it ended up as the substrate for mobile data because the author chose library over server. Nobody markets it. It does not have a cloud console or a pricing page. It is simply present, in the pocket of almost every adult on earth, holding the messages and histories and preferences that the phone needs in order to work.