SQLite foreign key constraints are disabled by default

Today, I learned that SQLite only enforces foreign-key constraints if explicitly instructed. I imagine this is well-known and trivial for the SQLite initiated, but we’re a Postgres shop; I have used SQLite sporadically, primarily for experiments like today’s, and this one amenity was certainly unexpected. Anyways. I had all my ON DELETE CASCADE constraints nicely configured, but related records in child tables were not being deleted when I deleted the parent....

February 22, 2024

SQLite is the only database you will ever need in most cases

The name SQLite is a nice name, but the “lite” part is misleading, it sounds like it is only useful for tiny things - which is very wrong. SQLite should be named AwesomeSQL, because that is what it is. SQLite is probably the only database you will ever need in most cases Yeah. This article resonates with me. SQLite is the de-facto standard engine for embedded systems. But it should also be the go-to database for all those websites and services that don’t need to scale to multiple machines....

April 17, 2021