Some people will tell you to never store this information in a database.
But before you believe them, I'd suggest you find out if they've even
I've been doing it for over 20 years (starting with doents using DB2
on IBM mainframes back in the 80's). It works quite well; databases are
well suited for quick retrieval of such information. Databases are
quite efficient at selecting from hundreds of thousands (or even
millions) of rows. Can you imagine having that many files in one directory?
Other advantages include ensuring data consistency (if you're using
INNODB database) - you can ensure you can't delete the blob while it's
still being referenced. You can't do that if they're stored in files.
Backup is much easier. You can move the database to a different server
without changing anything except the host name and not have to worry
about NFS, etc.
There are a lot of advantages to doing it this way. And people who
claim retrieval is too slow either haven't tried it or don't know how to
tune their system.
Remove the "x" from my email address
JDS Computer Training Corp.