Live data from Hacker News

We’re pretty happy with SQLite and not urgently interested in a fancier DBMS

beets.io

31–40 of 149 posts

Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS

#31
post #17
post #9

SQLite also does remarkably well with recovering from all manner of power loss / crashes / worst case scenarios. We created a "power loss" rig just to test this facility for one particular system. Really SQLite's biggest weakness is concurrency, and if your app needs that in any serious amount you probably ought to look elsewhere. If you're just dealing with occasional concurrency though SQLite shouldn't be dismissed…

The breadth and depth to which SQLite is tested[0] is both admirable and inspiring. It's not just "internal" tests, like unit tests or things that can be run from client C programs, but tests of all kinds of hard-to-simulate external situations like out-of-memory and power failure situations. [0]: https://www.sqlite.org/testing.html

That is simply amazing write-up. I'd still not call it a high-assurance system given some things missing. Yet, the amount of rigor in the testing phase could easily be the baseline for that niche in that it exceeds about anything I've seen. There's basically so little I could suggest on code or testing side that I'm not going to even bother here given how marginal it would be due to effort already put in. Just too well-done for mere speculations.

I also noted that the assert section essentially does Design-by-Contract. This is a subset of formal specification that's prime value is in preventing interface errors (vast majority in big apps) and supporting formal verification. Done in design/spec phase in high-assurance since both Edsger Dijkstra and Margaret Hamilton independently discovered technique's value. Done at language-level since Eiffel due to Bertrand Meyer. Good to see that, even if not all techniques, they're doing the 80/20 rule to get most benefit out of what formal specs they're using. Also allow you to easily enable run-time checks if you can accept performance hit. Nice.

Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS

#33
Beet is an awesome program, you should really check it out if you still are among the minority of people who actually have a music collection and don't rent access from spotify/itunes/etc.

I'm glad to see this post; one of the reasons that I like beet so much is that everything is self-contained.

Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS

#35
post #32

Single user, embedded-database situations is what DBMS like SQLite is designed for. And this guy thinks he deserves a pat on the back for using a tool in the way it was designed to be used?

This was a useful and informative post.

Where on earth do you think the author is asking for a 'pat on the back' in this?

Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS

#36
post #35
post #32

Single user, embedded-database situations is what DBMS like SQLite is designed for. And this guy thinks he deserves a pat on the back for using a tool in the way it was designed to be used?

This was a useful and informative post. Where on earth do you think the author is asking for a 'pat on the back' in this?

The entire thing reeks of self-congratulation on how smart he is for not engaging in "premature-optimization" for using a embedded database engine...as the database engine embedded in an single-user application.

You say it is useful, I find it bizarre.

Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS

#38

Earlier quoted context omitted.

FWIW, I've run SQLite in a few production sites (low 6 figure pageviews per month) and it has worked fantastically. If you understand and work with the limitations, it really is amazing how much you can get out of it. I'm actually surprised WordPress hasn't ever moved over to it for ease of installation/deployment - WordPress and PHP seem more likely to trip over in most deployments I've seen before SQLite would.

What are the limitations? I love SQLite, and have vaguely heard that it has issues with concurrency, but what , exactly? I use it on production for www.tithess.gr and it seems to be working beautifully, no concurrency problems whatsoever there. What problems should I be expecting in a multi-access scenario? I've never had that question answered adequately.

From other limitations there can be the aspect of security. If you have a more complex application / set of applications you may want to use different database users for different purposes. Maybe some audit / append-only tables as well.

With sqlite whoever controls the app can do whatever they want with the database file.

Re: We’re pretty happy with SQLite and not urgently interested in a fancier DBMS

#39
Sqlite is fine for small scale systems. It is not a "web scale" database, but not every web site is "web scale." SQLite does have performance limits, and will break at certain load, but until that, it's okay. For single user databases, like desktop applications, SQLite is awesome! What the others bring to the table is concurrent sever performanc, user management, and such. There's nothing surprising about this, right?
Post reply on HN