In spring 2000, a pipe ruptures on a guided-missile destroyer. The ship is a simulation, but the question is real: which valves must the crew close? Isolating a broken pipe means shutting the valves on either side of it. A program called Automated Common Diagrams tells the crew which ones to close and which to open after damage. D. Richard Hipp was working on that program.
Hipp was employed by General Dynamics, on contract with the United States Navy, designing software for the damage-control system aboard these destroyers. The system originally ran on HP-UX, Hewlett-Packard's version of Unix, with an Informix database behind it.
Informix worked great when it was up. The trouble was that the server sometimes went down. When it did, the crew's screen filled with a database error dialog box, and nobody reading that box cared how a server worked. Hipp's team got blamed.
A program built to name the right valves in an emergency depended on a separate machine that could simply stop answering. Hipp could fix his own code and still not fix that. So a question began to form, and nobody around him had an answer for it. Why should a damage-control diagram depend on a server at all? Could a database exist that needed no server, and that simply never failed?

The question nobody asked the server
Hipp kept turning the question over until it got smaller. The damage-control program never changed a record. It loaded its data into RAM, the computer's working memory, and from then on it only read. So what was the server doing there?
He went looking for an engine that would let him skip it, and came back empty-handed. He could find no SQL database engine that read directly from disk. SQL is the language programs use to ask a database questions, and every engine that spoke it seemed to expect a server standing in between.
Even the alternative he had tried left the problem in place. Postgres, the open-source database, worked well for development, Hipp says. But the database on the destroyer program was read-only, and that detail kept nagging at him. If nothing ever changed the data, why not read it directly from disk? Nobody was selling that, so he decided to write the engine himself.
The shape of it came from what had gone wrong on the ship. A client-server database runs as a separate process, and the application has to talk to it across a gap that can fail. Hipp's engine would have no standalone process at all. It would live inside the application that used it, so there was no second machine to stop answering.
The same thinking removed the people around the machinery. Nobody would need to install a database management system first, and nobody would need a database administrator to keep one running. When Hipp wrote down the goal for the first version, it said exactly that: an engine that needed no configuration and no administration, small enough to embed in other programs.
A compiler hidden inside a database
Then came a stretch with no paycheck to lean on. Hipp remembers a government funding hiatus in 2000, which he ties to a fight between Gingrich and Clinton, though he hedges: "if I recall correctly." The project work paused, and he used the quiet to sit down and write the engine.
He started from one idea. Every SQL statement, he decided, was really a program, and the engine's job was to compile it into something a machine could execute. A question typed in plain words would become a short list of small instructions.
So Hipp built two pieces. One was a byte code engine, a little machine that runs those instructions and answers the query. The other was a compiler that translated each SQL statement into that byte code. A compiler hidden inside a database was an odd thing to build for a damage-control screen, but it gave him a way to avoid a server entirely.
He first wrote it as an extension for Tcl, a scripting language he already worked in, which made it easy to try out and poke at. In August 2000 he released SQLite 1.0, with storage based on gdbm, an existing library for keeping data in a file.
Then came a decision about what to leave out. SQLite would have no stored procedures, the bundles of code that bigger databases keep inside the server. The developers describe the omission as an explicit choice for simplicity. With no server, there was nowhere to put them, and Hipp did not go looking for one.
Hipp had no reason to think anyone else would want it. But a tool that needs no server and no administrator is easy to pick up and carry, and it was about to start traveling without him.
Motorola calls about a tool that was never official
Hipp never meant SQLite to leave the test bench. On the Navy project he used it only for testing, he says, and never as an official part of the delivered system. Then it got out anyway, carried across the internet by people he had never met. He remembers a netnews post from that time, a message from someone asking about running an SQL database on a Palm Pilot.
The phone calls came next. Motorola wanted SQLite inside the operating system of a new cell phone, and Hipp, who had never sold anything, had to name a price. His first quote was around $80,000.
Symbian, maker of the operating system on Nokia phones, became one of the big early customers. Hipp flew to London for a meeting on Thanksgiving, leaving the holiday table behind for a conference room.
America Online wanted the engine on its CDs, and that pitch taught him something he had not planned to learn. Partway through his presentation, Hipp realized that a temporary index built on a shared table would go stale, because another user could change the table underneath it. He had to think through the flaw while the people from AOL watched.
A product inside other companies' products could not. So he set out to make the engine dependable for strangers, and in June 2004 he released SQLite 3.0, which added internationalization and manifest typing, a scheme that lets each value carry its own type. America Online helped pay for the work.
Their phones and devices ran on batteries, and batteries die at the worst moment. What would happen to a database file when the power went out in the middle of a write?
Pulling the plug two million times
In September 2001, Hipp pulled gdbm out of SQLite and put in something of his own: a B-tree, the branching structure that keeps data sorted on disk so it can be found fast. The result was SQLite 2.0, and it came with a capability the old library had never given him. SQLite could now run transactions.
A transaction is a bundle of changes that either lands completely or not at all, and Hipp attached a bold promise to it. SQLite would deliver ACID transactions, the standard guarantees of a trustworthy database, even if a crash or a power failure interrupted the work. That was the answer to the question the battery-powered customers had raised. The phone could die mid-write, and the file would still come through intact.
Saying so cost nothing. Proving it was another matter, because no one can reason their way to confidence about a power cut. The only evidence was to make the disaster happen on purpose. So SQLite's own tests simulate exactly the scenes a user never wants to see: power lost at the worst instant, and I/O errors, the failures that strike when a disk read or write goes wrong.
Hipp accepted a lopsided bargain to pay for that evidence. The library itself stayed small, about 156,000 lines of source code. The test suites that guard it grew to 92 million lines, hundreds of lines of test for every line of product. Each time a release is verified, more than 2 million tests run against it.

The day every branch was covered
On August 10, 2009, Hipp shipped SQLite 3.6.17, and the hole in the number finally closed. From that release onward, every release has had 100% branch test coverage. A branch is a point where the program must choose between two paths, and the tests now drive the code down every one of them, so no choice the library can make goes unexamined.

Hipp did not trust a single kind of test to find everything. He built four separate harnesses, each probing from a different angle. The oldest are the original TCL tests, written in the scripting language Hipp had used since the destroyer days and placed in the public domain. Beside them stands TH3, a suite that stays proprietary.
The third harness looks outward. The SQL Logic Tests run queries against SQLite and against other SQL databases, then compare the answers. If a rival engine disagrees, someone has to explain why. The fourth, a fuzzer called dbsqlfuzz, throws mangled and unexpected input at the library and waits to see what breaks.
Testing protected the code, but outsiders had a second thing to weigh: the file itself. Since June 2004, the SQLite 3 file format had been publicly documented as the engine's native format, so anyone could read exactly how the data lay on disk. A file written on a 32-bit machine opened on a 64-bit one, and a file from a big-endian processor opened on a little-endian one. Then came the promise that mattered most to a company building a product on top: the developers committed to keeping the format backward compatible in every future SQLite 3 release.
Yet the bet rested on more than tests and promises. Before a company could ship SQLite inside its own product, its lawyers would ask who owned every line.
Affidavits in a firesafe
Hipp and his colleagues answered the lawyers' question by giving up ownership. The authors dedicated all the code and documentation in SQLite to the public domain, so a company that embedded the library had no license to read and no terms to negotiate.
A dedication only means something if the author had the right to make it. So the team set a rule for where the code could come from: nowhere else. No line was taken from other projects or from the open internet. Everything was written from scratch, which left no stranger's code in the library for anyone to dispute.
Paper backed up the promise. Each author who wrote code signed an affidavit, and the signed pages went into a firesafe at the main offices of Hwaci. A customer who asked for proof of clean ownership could be pointed to a locked metal box.
The same worry shaped who could write for the project at all. Every contributor had to be a citizen of a country that allows works to be dedicated to the public domain, since a signature from anyone else might not hold. Anyone could read the source, but SQLite stayed open-source without being open-contribution. A patch that arrived from outside was not simply merged. The project could rewrite it from scratch, so that the lines that shipped came from authors who had signed.
For the community side of the work, the founders skipped the usual code of conduct. They wrote a code of ethics based on chapter 4 of the Rule of St. Benedict, the sixth-century guide to life in a monastery.
Empty tables in Skype
Once the lawyers had nothing left to object to, the library slipped into almost everything. Chromium-based browsers keep history, cookies and download history in SQLite databases. Firefox and Thunderbird store bookmarks, cookies and contacts in SQLite files that they manage internally. Adobe made SQLite the file format of Lightroom, a standard database in Adobe AIR, and a part of Acrobat Reader. Apple offered it as an option in Core Data, the macOS programming interface, and has included it since Mac OS X 10.4.
Then, on August 28, 2007, Jeremy Hinegardner went looking inside Skype on Mac OS X and confirmed that it carried an SQLite database too. He opened the file and found it hollow: every table in it was empty. A database with no rows had been installed and shipped all the same, which shows how casually the engine was being dropped into products. Hipp had once dreamed of a database that no one had to run, and here was one that no one even filled.

Asked how all of this came about, Hipp gives the plainest answer he can: he wrote SQLite, and it became popular. On that simulated destroyer, a burst pipe is contained by closing valves on either side of the break, and the crew never has to think about the water they have kept out. SQLite closes valves of its own around failure, sealing it inside one file and one library. The error dialog box that once cost Hipp's team the blame has no reason to appear, because the database that could have caused it never went down.
Editorial graphic and headline text by Signal Titans.
Source: How 1993's SQLite Began as a Simple Tcl Extension for a French Warship's SQL Database and Conquered the World's Software · SQLite, Version 3 · Recommended Formats Statement – Datasets | Resources (Preservation, Library of Congress) · Re: [sqlite] Skype client using SQLite? · SQLite Release 3.54.1 On 2026-10-16 · SQLite Copyright · Why SQLite succeeded as a database with Richard Hipp, creator of SQLite (Changelog Interviews #201) · The Untold Story of SQLite | CoRecursive Podcast · Interview: Richard Hipp on UnQL, a New Query Language for Document Databases

Leave a Reply