News for hackers. Stuff that matters.
Re:Sqlite 3.30.0 by Scarbutt on Saturday October 05, 2019 @01:48AM (#21164029)
But why?(for a server)

Postgres can run in a 256MB VPS(if one can find one these days) and has more features that you might need later.

Installing is as easy as 'apt-get install postgresql', create user, create database, done.

Re:Sqlite 3.30.0 by throwaway_bad on Saturday October 05, 2019 @02:58AM (#21164183)
I have a small blog (using Ghost) that uses sqlite as the main database and it's incredibly easy to maintain. It's just a single file. For example if you want to back up, you just copy the file or add it to git. If you want to do a diff you just do sqldiff on two files. It is as easy as working with json or csv files, except with atomic writes and better querying.

From their site: https://www.sqlite.org/whentouse.html

>SQLite does not compete with client/server databases. SQLite competes with fopen().

Re:Sqlite 3.30.0 by majewsky on Saturday October 05, 2019 @07:04AM (#21164878)
> For example if you want to back up, you just copy the file or add it to git. If you want to do a diff you just do sqldiff on two files.

With Postgres, you run pg_dump on the database (which is a shell one-liner, only with slightly more arguments than cp) and that's even better for putting into git because it's a text file that git can diff natively and store efficiently with delta compression.

Re:Sqlite 3.30.0 by hardwaresofton on Saturday October 05, 2019 @02:31AM (#21164135)
SQLite is even easier to start with -- I'm not trying to say Postgres is not the right choice, but it is certainly a more complex choice.

Postgres is a fantastic database, but most of the time getting started with and using SQLite will be easier. For example -- you'd never have to secure firewall rules to a SQLite instance. Bad defaults (unlikely but possible) or some bad post-install configuration and you've got an exposed server.

I want to emphasize that my point about SQLite being viable for startups was with the assumption of a low-write high read workload -- most of the time queries won't even hit the DB but instead be served by some caching layer. It's also really easy to scale read only versions of your applications horizontally if all you've got to do is ship/swap out DB files (again at this point it might make more sense to look into a bigger DB and just scaling vertically).

Re:Sqlite 3.30.0 by xyzzy_plugh on Saturday October 05, 2019 @02:08AM (#21164069)
Furthermore, postgres has great replication, and a read-replica is trivial to set up. sqlite is amazing (for any embedded database, absolutely) but postgres can't be beat as a go to for server side.
Re:Sqlite 3.30.0 by cyphar on Saturday October 05, 2019 @06:30AM (#21164783)
To paraphrase the SQLite site: "SQLite isn't competing with [PostgreSQL]; it's competing with fopen(3)."

The primary purpose is to replace custom (and fragile) single-file databases with something that is far more resilient and provides uniformity in implementation. The fact that it is a suprisingly good SQL database (to the point where folks are actively arguing that much more fully-fledged databases are better in some aspects) is incidental.

Re:Sqlite 3.30.0 by netol on Saturday October 05, 2019 @03:44AM (#21164277)
There is no real reason to use sqlite in web apps. Just use postgres and mysql, that's the the industry standard and you'll have less issues
Re:Sqlite 3.30.0 by gunnihinn on Saturday October 05, 2019 @08:45AM (#21165195)
Fewer.