File system or BLOB?
At Karora, we have a document management engine that saves files in a "repository" (abstraction). The idea was that you could choose between saving files on the file system, or in a BLOB column of a database, when setting up the system.
I'm trying to figure out what the pros and cons each are. Here's what I've thought of so far:
File System
BLOB Column
Good
Simple
Administrators can "see" the files by browsing the file tree
Ability to use a SAN solution
Ability to reuse existing file system tools (e.g. virus scanners)
Easier to backup both the database and files at the same time
Transactional integrity with inserting the metadata and content. Most file systems aren't transactional.
Bad
Easy for the metadata to get out of sync with the database, through files being moved around or deleted outside of the system.
A client told us that a competitor's system that uses BLOBS causes great pain to the backup software, which gets confused when content is changed, causing the entire database to be backed up, instead of increments. (This sounds like more of an issue with the backup software than anything to me).
Would file size be an issue? I mean how much stuff can you can you stuff into a BLOB column anyway? We manage files over 100 megs. I suppose you could spread chunks of the file across rows, but that seems to be adding complexity to me.
I wonder about the concurrency aspects - BLOB's don't seem to be good at lots of simultaneous activity on the same record.
I also wonder about the read performance. Reading from a BLOB is slower than reading from a file on disk.
So far, we've written the file system repository and everyone seems pretty happy. Doesn't really seem to be any big demand for the BLOB solution, so I think we'll just leave it as is for now.
I'd be real interested to hear other people's comments/experiences on this.
Posted by BBG on 2005.02.02 at 08:57 PM in the devil is in the details | Permalink