Been seeing a lot of talk about SQLite being a good database - /g/ (#105972247) [Archived: 112 hours ago]

Anonymous
7/21/2025, 12:41:06 AM No.105972247
1752972823992282
1752972823992282
md5: 6b73bf70fdde6b5aaa6cf036d526621a🔍
SQLite is very limited because of its threading model, imo it's not usable outside of the single app model where you have a single user. It lacks robust concurrency, doesn't scale well under high write loads, and can become a bottleneck in multi-user or web environments. If you are thinking about using it just go with a reliable DB like Postgres or mySQL.
Replies: >>105972292 >>105973622 >>105974119 >>105975135 >>105976632
Anonymous
7/21/2025, 12:45:16 AM No.105972292
>>105972247 (OP)
People use it in browser-based applications and simple personal projects. It's about picking the write tool for the job. Postgres isn't needed for the a chore app that some hobbyist runs on their Raspberry Pi.
Replies: >>105972324
Anonymous
7/21/2025, 12:47:59 AM No.105972324
>>105972292
There are people suggesting that 99% of all websites only need to use SQLite. This type of statement is what I'm trying to address.
Replies: >>105972388 >>105972544
Anonymous
7/21/2025, 12:55:12 AM No.105972388
>>105972324
This is probably not far from correct. The average website likely has so little traffic that an SQLite db would more than suffice. For you to need anything more you'd need a high traffic site with a need to store a lot of data constantly, like 4chan or Amazon.
Replies: >>105973495
Anonymous
7/21/2025, 1:13:14 AM No.105972544
>>105972324
>There are people suggesting that 99% of all websites only need to use SQLite.
That is correct, yes. The vast, vast majority of websites serve information and don't allow any writes at all, and are serving <100 users at a time. SQLite is completely adequate for that.
Replies: >>105972560
Anonymous
7/21/2025, 1:15:43 AM No.105972560
>>105972544
To be clear: I'm not saying you SHOULD use it, I'm just saying most websites COULD because their traffic is so low.
Anonymous
7/21/2025, 3:29:08 AM No.105973495
>>105972388
4chan doesn't need a database for anything outside of logins, and those should be handled by an auth server
there are what, 120 boards, 150 threads per board, that's 18K plain html pages
your general file system can handle that
there's no search function on here, so just append the right thread when a post is submitted and the date modified on the file determines which is the oldest to be pruned
4chan should be one of the easiest websites to build if you think about it
Replies: >>105973601 >>105974060
Anonymous
7/21/2025, 3:46:30 AM No.105973601
>>105973495
Where are you storing cookies?
Anonymous
7/21/2025, 3:50:17 AM No.105973622
>>105972247 (OP)
>tfw when you’re JavaScript web app is so bloated you need a dedicated Postgres Server because you can’t write code that can function with a single threaded SQlite database.
Replies: >>105976632
Anonymous
7/21/2025, 4:54:57 AM No.105974060
>>105973495
4chan could be ran on SQLite
Replies: >>105974068
Anonymous
7/21/2025, 4:56:28 AM No.105974068
>>105974060
could be run*
Anonymous
7/21/2025, 5:04:47 AM No.105974119
>>105972247 (OP)
1. SQL in general doesn't "scale" well because CAP theorem
2. The solution is to shard the SQLite database and manage organization yourself on the filesystem, rather than a daemon and scheduler doing it for you.
Anonymous
7/21/2025, 8:28:17 AM No.105975135
>>105972247 (OP)
Which one does it support inserting images?
Replies: >>105975421
Anonymous
7/21/2025, 9:19:11 AM No.105975421
>>105975135
Just store the image data bro
Replies: >>105975630
Anonymous
7/21/2025, 9:51:32 AM No.105975630
>>105975421
Like a BLOB.
I realized that.
what about videos?
Also that way the database can go realllly big in size like easily 50 GB+
How would this work by then?
Replies: >>105975645
Anonymous
7/21/2025, 9:53:23 AM No.105975645
>>105975630
If you're concerned about it, store the media on a an S3 bucket or something
Replies: >>105975692
Anonymous
7/21/2025, 10:00:57 AM No.105975692
>>105975645
No, I want it all locally.
>S3 bucket
How much should I pay?
Anonymous
7/21/2025, 1:04:53 PM No.105976632
>>105972247 (OP)
>>105973622
Strapi defaults to SQLite