| re: whats wrong with using a BLOB?
Others may have different views, but in my applications, I keep very large data items, like images, as files in directories, and just store the links to these in the database.
It is a matter of efficiency. Images can be very large, and very variable in size. A database table that holds these can then become very large, and unless Mysql has some internal way of storing blobs in a very intelligent way, the changing of an image (updating it) would seem in my mind to be very inefficient.
Storing a file link in the database is on the other hand leading to relatively small tables. As long as someone is updating the image file and not its location or name, then the file link stored in the database will remain valid. But if for some reason people start renaming their images or moving them around on the hardisk, then you need to make sure the database is correspondingly updated.
On the other hand, if you use a database as the only way to access your files via file links stored in the database, then you can just dump all your files into one directory someplace, you can name them whatever you wish, because you can just find them via your database application.
|