4 ms·
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 thin
by bob1029 7y ago
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.
- geokon 7y agowill you store large objects like images or audio file directly in SQL?
- bob1029 7y agoIn 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.
- bsenftner 7y agoCan confirm SQlite is used in AAA game engines as well as VFX production pipelines. I know because I put it there.
- solarkraft 7y agoSo - is SQlite a good file system? Should I just use it for everything?
- bob1029 7y agoI 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?
- nomadluap 7y agoSQLite has a page measuring performance of internal blobs vs external files: https://www.sqlite.org/intern-v-extern-blob.html https://www.sqlite.org/intern-v-extern-blob.html
- solarkraft 7y ago> 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.