This is not a direct answer to your question, but I have experience using random access for (large) blocks in SQLite, and I advise you not to use it if you can. That's why:
Blobs completely break the SQL query format. If your blob data needs some kind of processing, you will definitely need to filter at some point. Whatever mechanism you have to deal with filtering in SQL is useless in this regard.
Working with binary blocks wrapped in databases that are opposite to binary data in raw files limits your options. You will not be able to randomly read and write data simultaneously with several processes, which is possible with files. You cannot use any tool that deals with this data, and provides only a file I / O interface. You cannot truncate or resize a drop. Files are simply a lot more versatile.
It may seem convenient to have everything contained in a single file, as it simplifies backup and transfer, but the pain of working with blobs is simply not worth it.
So, as your lawyer, I advise you to write your drops as raw files to the file system and just store the link to the file name in your database. If your drops are quite small and guaranteed not to grow, forget my advice.
paniq
source share