I use BerkeleyDB in Perl with DB_File.
-
How to store images (small size) as values?
-
Is BerkeleyDB a right choice for storing images within database? as unlike some other database systems, Berkeley DB offers no special support for binary large objects (BLOBs).
-
Storing images in mysql is questionable as implementing changes to a large database is harder; but is it the case for a key/value database like Berkeley.DB?
Exactly as documented, read file, say using File::Slurp::read_file, taking care to
binmode, and store the value in the hash.BerkeleyDB, not being a relational database, doesn’t have field types with limitations, so you can store anything (with the usual caveats)
Yes, storing binary data is questionable, because the filesystem is so good at doing exactly that, but people do it all the time without too much trouble — remember to backup your data regularly.