I'm considering a project where I would store large binary files (1-15meg) in a database. (MySQL) There will be many inserts (not usually concurently), few select's and rarely deletes.
My question is this: Can this be done efficently(read: conserving memory) in perl? (Under mod_perl & DBI?) The only solution that comes readily to mind is to slurp the file into one honkin' scalar, and use binding values to stuff it into the database. This poetentially has some nasty memory usage problems.
I'd like to use the database to store files because it allows me to keep all data related to the application in one place. However, If this approach has more drabacks than benefits, I'll just revert to using a sql table to manage on-disk files.
Thanks in advance for any ideas or suggestions.