News for hackers. Stuff that matters.
Re:SQLite the only database you will ever need in most cases by tzs on Thursday April 15, 2021 @10:44AM (#26821115)
> In the end, I always come back to Postgres. It's unbelievably powerful, lightweight and there's not much it can't do.

How lightweight?

SQLite itself is around 600 KB. That's with all features enabled. I believe you can get it it down to about half that if you disable features you don't need. RAM usage is typically under a dozen or so KB.

It doesn't even require that you have an operating system. All you need for a minimal build is a C runtime that includes memcmp, memcpy, memmove, memset, strcmp, strlen, and strncmp, and by default also malloc, realloc, and free although it has provisions for providing different memory allocators, and you have to provide some code to access storage if you are running on a system that doesn't have something close to open, read, write, and the like.

This means it can even be used on many embedded systems far too small to run a Unix.

Heck, it is not even too unreasonable to compile SQLite to webasm and include it on a web page if for some reason you need client side SQL on the web.

Re:SQLite the only database you will ever need in most cases by exyi on Thursday April 15, 2021 @11:50AM (#26821958)
Depends on what you need. It does not seem like a great idea to run Postgres in a browser, but it is usually less resource hungry than the JVM-based app using it to return HTML or JSON, so I can call it lightweight for server use.
Re:SQLite the only database you will ever need in most cases by nawgz on Thursday April 15, 2021 @12:28PM (#26822620)
> Heck, it is not even too unreasonable to compile SQLite to webasm and include it on a web page if for some reason you need client side SQL on the web.

With the deprecation of Web SQL, I highly doubt this is a use-case anyone cares for anymore.

Anyhow, I see your main point: SQLite is indeed "Lite", so it makes sense to use in embedded or small single-consumer cases. I just don't think those are very interesting tools to make in 2021, we expect collaboration and concurrency, so PostgreSQL wins in my imagination-space. I am a web developer though, so I am inherently biased.

I also am not the person you were just discussing with

Re:SQLite the only database you will ever need in most cases by dragonwriter on Thursday April 15, 2021 @01:59PM (#26823979)
> With the deprecation of Web SQL, I highly doubt this is a use-case anyone cares for anymore.

WebSQL didn’t die as a standard because noone wanted client SQL on the web, it died because SQLite was the only reasonable way of providing it, preventing multiple really-independent implementations.

Re:SQLite the only database you will ever need in most cases by ptman on Friday April 16, 2021 @09:23AM (#26833552)
There are people compiling sqlite to webasm, so it's a use-case some care for.
Re:SQLite the only database you will ever need in most cases by derefr on Thursday April 15, 2021 @03:22PM (#26825005)
> This means it can even be used on many embedded systems far too small to run a Unix.

A good example is that SQLite is used inside many video games. You wouldn't put Postgres in your game engine.

Re:SQLite the only database you will ever need in most cases by spicybright on Thursday April 15, 2021 @07:36PM (#26827509)
Is using something with that small a foot print even worth it in today's age? Surely postgres and other don't have THAT big of an overhead, at least for the features they provide.