News for hackers. Stuff that matters.
Re:SQLite Is Serverless by bob1029 on Sunday January 26, 2020 @05:55AM (#22151495)
I have found that you can go for a disturbingly-long period of time using primitive schemes like LINQ<->Objects<->JSON to persist your business data before things start to get hairy. Personally, I would say 10 megs of persisted data is about the upper limit before I am going to start reaching for SQLite. If you start to get clever with schemes like one file per serialized entity, you could potentially avoid using a 3rd party database indefinitely. I have found that the technical cost of using SQLite from the start is so low that I just start out using it by default even if the file will never exceed 1MB.
Re:SQLite Is Serverless by solarkraft on Monday January 27, 2020 @06:44PM (#22165053)
> If you start to get clever with schemes like one file per serialized entity, you could potentially avoid using a 3rd party database indefinitely

Most file systems will start to get slow at some point with too many files in a folder.

Re:SQLite Is Serverless by geokon on Sunday January 26, 2020 @06:10AM (#22151545)
will you store large objects like images or audio file directly in SQL?
Re:SQLite Is Serverless by bob1029 on Sunday January 26, 2020 @08:32AM (#22151977)
In most cases I will. Pulling a blob out of a row is a lot faster than opening an additional file handle. There aren't really any downsides to this either unless you are running table scans. SQLite does support indexes (even full-text) and they do work miracles so do use them when necessary.

I would go so far as to argue that SQLite could be used to store all of the assets for any large piece of software (I.e. a AAA game). This would probably wind up faster and more reliable than most alternative solutions out there today.

Re:SQLite Is Serverless by bsenftner on Sunday January 26, 2020 @10:30AM (#22152488)
Can confirm SQlite is used in AAA game engines as well as VFX production pipelines. I know because I put it there.
Re:SQLite Is Serverless by solarkraft on Monday January 27, 2020 @06:46PM (#22165056)
So - is SQlite a good file system? Should I just use it for everything?
Re:SQLite Is Serverless by bob1029 on Monday January 27, 2020 @07:36PM (#22165320)
I think hard drive manufacturers should just embed SQLite directly into their devices and optimize the SQLite VFS implementation to be flash aware at the controller-level. Who needs a file system when your disks speak SQL?
Re:SQLite Is Serverless by nomadluap on Monday January 27, 2020 @09:20AM (#22159425)
SQLite has a page measuring performance of internal blobs vs external files: https://www.sqlite.org/intern-v-extern-blob.html