Comment by Lhiw

4 years ago

SQLite is the most underrated database of all time.

I know it's popular, but nowhere near to the level it should be.

> nowhere near to the level it should be.

I get the impression that it's used exactly as it should be, in systems that need a database but don't need clustering or failover strategies.

  • > but don't need clustering or failover strategies.

    Even for those cases where you do need it, there are emerging options. You can handle replication 100% in business logic (something I personally enjoy), or you can use a path like dqlite to replicate the physical WAL log.

  • As far as I can tell, there’s far too many file formats out there. I’m sure sqlite should be used more than it currently is.

Why so? I have the impression every developer relies on it for a lot of local stuff, and many libraries also use it locally in users' machines for persistence needs.

What do you think it "should be" and is missing?

  • I think they have this perspective because SQLite is almost never mentioned when DBs are discussed. Almost everyone pushes postgres, which I think is often a bit insane. Postgres or (often rarely) MySQL is given as the answer to most DB questions, even when coming from clearly new devs. It's not often that the dev needs any of the large amount of setup/permissions required for postgres/MySQL. The fact that SQLite comes as part of python's standard library should be used as second nature for most devs. I feel the same way - that SQLite should be the default answer, and one should reach towards postgres or MySQL unless you really *have* to.

    • SQLite is not meant to compete directly with MySQL or Postgres. It's meant for local usage only, where you don't need high concurrency, managing multiple connections, replication, etc.

      I mean, you could probably use SQLite in many simple cases which currently use Postgres (personal servers, small apps), but advocating it as default solution is inadequate at best, if not misleading to people starting out in the field.

      1 reply →

SQLite is a file format with a SQL engine which makes it a great embedded database.

It is not an RDBMS in the true sense so in my opinion it is correctly rated.

I tried using SQLite to solve problems which normally would require an RDBMS and ran into so many issues like the lack of enforced static types, built in date or decimal types (and fast aggregations on dates), concurrent writes, etc. It’s only when you’ve gone through this process that you’ll realize that SQLite it not the database you think it is — and SQLite itself is up front about that: https://www.sqlite.org/aff_short.html