Discovered a plethora of interesting facts about SQLite. For those unaware — it is likely the most widespread database in the world. It’s utilized everywhere: from smartphones to cars and rockets. The scale of deployment — over _a trillion_ instances, billions of active copies worldwide. In your phone, dozens of applications use it.
Initially, SQLite emerged from the need to ensure reliable database operations on the USS Oscar Austin destroyer.
It is supported by _three people_. They do not admit external contributors. You can’t just send a pull request and hope the patch will be approved. SQLite’s development is backed by the company Hwaci. Interestingly, they seem to be involved in music too. Their website is extremely succinct. Office in a private house.
For each line of SQLite code, there are over 600 lines of test code. Tests cover 100% of branches (and 100% MC/DC) of the library. The test suite is highly diverse, including fuzzing tests, boundary value tests, regression tests, and tests simulating operating system crashes, power failures, I/O errors, and out-of-memory errors. Originally, SQLite was an extension of Tcl, and its main test suite is written in Tcl.
Interestingly, some SQLite tests are proprietary. The TH3 (Test Harness 3) test suite, which provides one hundred percent code branch coverage, is proprietary, and access to it is restricted.
I know of no other project that is open-source yet has paid tests.
To gain access, one must join the SQLite Consortium with an annual membership fee of 120 thousand dollars.
This is an interesting business model. Developers generate profit through licenses, paid support, service maintenance, consortium membership, and commercial extensions.
SQLite does not have a Code of Conduct (CoC); instead, they use a Code of Ethics derived from the “kinds of good deeds” from chapter 4 of the Rule of Saint Benedict. Google SQLite Code of Ethics, it’s a very intriguing document.
At the beginning of all source files, instead of legal notices, there is a blessing: “In place of a legal notice, here is a blessing: May you do good and not evil…”
SQLite creator Richard Hipp (D. Richard Hipp, DRH) couldn’t find any version control system that suited him, so he created his own called Fossil. Of course, Fossil is based on SQLite.
It reminded me of how Linus wrote Git.
DRH also wrote his own parser generator called Lemon.
All the above is described in more interesting details (and expanded) in an article on Habr, which is a translation into Russian of an article by Avinash Sajjanshetty. For originals — check the comments





