Experience with SQLite as a Store of Files and Images
sqlite.org
sqlite.org
Of course depending on how you do backups this may be a non-issue (ex: filesystem snapshots with native delta snapshot transfer)
It maybe also be easier if you want to launch a photo viewer for example. You can just point it at the regular file rather than extracting a temporary file from the database, launching the viewer and making sure to clean up the file when the viewer is done.
The biggest benefit is that you get consistency for free. However this is often fairly easy to manage if you have a dedicated table for external blobs and common code to read and write them.
And it only requires two tables - one table for blob storage with an indexable column; and another table where you're storing the metadata associated to the rows in the blob table.
For a small number of users and simple apps, it can be an ideal solution. I know, because I've tried.
---
This is an interesting read from the official site as well - '35% Faster Than The Filesystem' / https://sqlite.com/fasterthanfs.html
Does it? Suddenly instead of just backing up the whole database you have to do delta backups which can make it quite a bit more difficult...
If you want to go more advanced, you can also store the deltas similar to source control. Then you can get a snapshot of the files at any point in time.
As I expected, I later had to recover various files that had been stored there. It was a lot easier than restoring the backup.
Kudos to SQLite.
Is it actually going to release deleted unused space or would be a manual defragmentation after some deletes.