I’m designing a servlet(or action in Struts2) for file(images, documents, etc…) download.
But I’m wondering which is better approach to keep files on File system and in database just keep the path to the file OR to keep the files in the database like BLOBs.
I know that when I do query on database where is blobs is slower,
but if I keep in database It would me it easier to backup the data and guarantee consistency.
Any suggestions?
I’m designing a servlet(or action in Struts2) for file(images, documents, etc…) download. But I’m
Share
I never used a BLOB. E.g. I just store user uploaded photos normally in directories. I don’t see much reason for using a BLOB for storing files. You say it could be easier to backup – on the contrary, that could become very problematic, at least in our case as we have many GB of photos, but the database must be kept rather small in order to be able to backup it often and with PHPMyAdmin.