r/programming • • Sep 10 '24

SQLite is not a toy database

https://antonz.org/sqlite-is-not-a-toy-database/
811 Upvotes

309 comments sorted by

View all comments

Show parent comments

40

u/gimpwiz Sep 11 '24

Yep, it seems to me that if I'm going to have a webserver, I may as well also have a postgres/mysql server, slap em together and do whatever I want, it's gonna work great and be free and be easy to configure and keep going. But if I want to ship something that needs to have a database locally, sqlite is a great option if the data isn't enormous and not super complex. Which 99.8% isn't.

7

u/throwaway490215 Sep 11 '24

have a postgres/mysql server, slap em together

If somebody tells me they "slap em together" I can think of a thousands methods its set up and its complications.

How does the service start? How does the service fail? How are backups handled? How are connections authenticate / secrets managed ? Are API & db on the same computer or network?

Using SQLite everybody knows we're talking about a file.

12

u/nikomo Sep 11 '24

Using SQLite everybody knows we're talking about a file.

Sobs in :memory:

1

u/Practical_Cattle_933 Sep 28 '24

I create a systemd service for both