August 16th, 2024

The Untold Story of SQLite

Richard Hipp discusses SQLite's evolution, created to solve database reliability issues. It gained traction through interest from Motorola and AOL, becoming essential in smartphones and aviation, emphasizing rigorous testing.

Read original articleLink Icon
The Untold Story of SQLite

Richard Hipp discusses the evolution of SQLite in a recent episode of the CoRecursive podcast. SQLite, a lightweight database engine, has become integral to various technologies, including web browsers, smartphones, and even commercial aircraft. Hipp's journey began while working on a project for a battleship, where he faced challenges with the existing database system, Informix. Frustrated by its unreliability, he decided to create a new database engine that could operate without a server, leading to the development of SQLite in 2000. Initially, it was a side project, but as he shared it online, it gained traction, particularly after Motorola expressed interest in integrating SQLite into their new cell phone operating system. This marked the beginning of SQLite's widespread adoption. Over the years, Hipp has navigated relationships with major tech companies, refined testing procedures, and ensured the database's reliability, which is crucial in high-stakes environments like aviation. His story highlights the unexpected journey of an open-source project that became a foundational technology in the digital world.

- Richard Hipp created SQLite to address reliability issues with existing database systems.

- SQLite is now widely used in various applications, including smartphones and commercial aircraft.

- The project gained traction after Motorola and AOL expressed interest in using it.

- Hipp emphasizes the importance of rigorous testing and reliability in critical applications.

- SQLite's success illustrates the potential of open-source projects to evolve into essential infrastructure.

Link Icon 10 comments
By @dave78 - 2 months
SQLite being released in the public domain has to be up there as one of the greatest gifts ever given to the global software development community. I'd love to know what led to the licensing decision. The wide-open rights to use it however you see fit have undoubtedly enabled countless applications to exist that otherwise would have been very, very difficult to create - especially mobile apps.

Whatever money Dr. Hipp makes from SQLite it is surely not enough relative to the value that it has provided to millions of people.

By @dhbradshaw - 2 months
Wonderful article!

I enjoyed this incidental homage to postgres:

"He came up with this huge corpus of SQL statements, and he ran them against every database engine that he could get his hands on. We wanted to make sure everybody got the same answer, and he managed to segfault every single database engine he tried, including SQLite, except for Postgres. Postgres always ran and gave the correct answer. We were never able to find a fault in that. The Postgres people tell me that we just weren’t trying hard enough. It is possible to fault Postgres, but we were very impressed."

By @CoastalCoder - 2 months
Bit of a tangent, but Adam Bell was recently laid off from his day job, and IIRC hasn't found work yet.

If you see value in Corecursive, it's probably an especially considerate time to support him on Patreon.

By @myfonj - 2 months
* (2021)

IIRC one of the best episodes of the Corecursive podcast I've heard so far.

By @password4321 - 2 months
By @isoprophlex - 2 months
Besides giving the world a great piece of tech, Hipp seems to be such a great, levelheaded guy too.

SQLite was my gateway drug to data analysis, because I didn't know any better I just started using that for automated tasks that were done in excel up to that point. It was the basis of my career in data, after I decided to get out of academia.

Anyway.

I've recently built a SQLite extension that bakes Lua into SQLite. You can do

    SELECT lua('return some_business_logic(...)', col1, col2 FROM some_table;
It's very much a V0.01 alpha thing, but it's feasible.

The idea allows running complex business logic directly inside the SQLite process. This all for speed and efficiency as you don't schlep data in and out of your language calling SQLite, and for better testability as it seems the sweet spot in terms of decoupling business logic from the query writing.

I've been at it on my own too much, I can't really reason about it anymore.

So, dear HN, is this idea completely idiotic or am I onto something that the world would benefit from?

By @udev4096 - 2 months
That was full of great insights! Especially, the part about freedom and future advice. Thank you for posting it

> Richard: I had this crazy idea that I’m going to build a database engine that does not have a server, that talks directly to disk, and ignores the data types, and if you asked any of the experts of the day, they would say, “That’s impossible. That will never work. That’s a stupid idea.” Fortunately, I didn’t know any experts and so I did it anyway, so this sort of thing happens. I think, maybe, just don’t listen to the experts too much and do what makes sense. Solve your problem.

By @hprotagonist - 2 months
The bit on test coverage is particularly good: https://corecursive.com/066-sqlite-with-richard-hipp/#testin... :

Let’s not dwell on the details, but I had this idea, I’m going to write tests to bring SQLite up to the quality of 100% MCDC, and that took a year of 60 hour weeks. That was hard, hard work. I was putting in 12 hour days every single day. I was just getting so tired of this because with this sort of thing, it’s the old joke of, you get 95% of the functionality with the first 95% of your budget, and the last 5% on the second 95% of your budget. It’s kind of the same thing. It’s pretty easy to get up to 90 or 95% test coverage. Getting that last 5% is really, really hard and it took about a year for me to get there, but once we got to that point, we stopped getting bug reports from Android.