If I use my database for relational data and opt to store large binary blobs in the filesystem, how can I integrate the two? How does this process work?
I know that the database will need to store a directory path/link to the corresponding blob, but can someone please enlighten me on the specifics? For example, I think I should have some shell scripts to first perform a virus check on the binary in a secure /tmp location and then move it to the actual storage location and update the path in the db. But to do this from the operating system will require a script to check periodically if there has been a change in a directory and then fire off actions. Is it possible to run a shell script from within a DB (I know the reverse is possible)?
Or are there better tools to do this sort of thing (integrate with filesystem storage) in MySQL/Postgres?