News for hackers. Stuff that matters.
Re:Appropriate Uses for SQLite by watermoose on Sunday September 25, 2016 @10:01PM (#12578723)
> Do people agree with this?

I don't. I've corrupted SQLite DBs enough to not have warm and fuzzy feelings about it like I used to have.

I think it's only a good choice when you just need a database for your app that will barely be using it, and if you didn't use it you'd be writing to a file instead. And, that's basically what the SQLite docs say.

However, even then, I think it can be short-sighted. I've used webapps before that used SQLite and I thought to myself: if they'd only used MySQL or PostgreSQL and then provided access to it, I could have used it.

Be aware though, if you decide to use a scalable DB like PostgreSQL, it will require a port to be open for the DB, even if only locally. If you're trying to minimize how people can access your data, you don't want a port open/an extra port open, and you're not going to hit it very hard, SQLite's probably your best choice.

Re:Appropriate Uses for SQLite by qwertyuiop924 on Sunday September 25, 2016 @10:08PM (#12578755)
OTOH, it is a Real DB, if a small one.

And corruptions, while obviously not unheard of, aren't very common. Even in power failure.

Re:Appropriate Uses for SQLite by watermoose on Sunday September 25, 2016 @10:17PM (#12578792)
Yeah- I changed my wording to "scalable". And I appreciate the developers and community around SQLite. It has its uses, and I appreciate it. However, I think it could be better with concurrency.
Re:Appropriate Uses for SQLite by qwertyuiop924 on Monday September 26, 2016 @07:50AM (#12581031)
It can have concurrent reads, and even concurrent read and write, but it doesn't support concurrent writes.
Re:Appropriate Uses for SQLite by mappu on Monday September 26, 2016 @12:29AM (#12579238)
>it will require a port to be open for the DB, even if only locally

Surely it supports AF_UNIX sockets?

Re:Appropriate Uses for SQLite by chungy on Monday September 26, 2016 @03:33AM (#12579970)
It does. The default PostgreSQL installation binds to port 5432 (I can't recall if that's loopback only, or global), but it can easily be disabled and use AF_UNIX sockets only.
Re:Appropriate Uses for SQLite by watermoose on Monday September 26, 2016 @07:00AM (#12580779)
I wasn't aware of that. Thanks!
Re:Appropriate Uses for SQLite by david-given on Monday September 26, 2016 @10:16AM (#12581951)
Can you talk at all about how the SQlite databases got corrupted? I'd be interested to know the circumstances. (The answer 'I have no idea, it was just one of those things' is perfectly acceptable.)