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

0

u/[deleted] Sep 11 '24

[deleted]

7

u/MaleficentFig7578 Sep 11 '24

What do NoSQL databases bring that SQL don't? you can always have a table with two columns: ID and JSON

0

u/[deleted] Sep 11 '24

[deleted]

2

u/CherryLongjump1989 Sep 11 '24 edited Sep 11 '24

There’s a reason why Google went from BigTable to BigQuery. You don’t hear about BigTable anymore now that you can access it via SQL. Even the platforms you mentioned such as Clickhouse offer a SQL API, as do many that you didn’t mention like Elasticsearch or Singlestore. SQL is not the problem, you’re confusing the query language with an RDBMS. These days if you don’t support SQL then that’s a liability that makes your database less likely to be adopted.

As far as embedded databases such as SQLite or DuckDB, the whole advantage is that you have SQL and ACID properties for every situation that calls for local storage or low-latency in-memory access, where none of your NOSQL solutions would be appropriate. It vastly expands the number of use cases for which a database is appropriate. It’s used for everything from config files to text messaging clients. There’s a reason why SQLite is actually the most prevalent database in existence. You don’t need a team of on-call engineers to administrate and handle server outages for the SQLite database in your iPhone app. SQLite also has the distinction where it’s actually part of standardized file formats, such as for geospatial data used by everyone from consumer to military use cases. People even build offline apps with eventual consistency by using an embedded database that eventually syncs with some server-side data store.

→ More replies (2)