title: Considerations where to store documents - on file server or in DB?
body: <p>I have a design decision to make regarding documents uploaded to my web site: I can either store them on my file server somewhere, or I can store them as a blob in my database (MSSQL 2005).  If it makes any difference to the design decision, these documents are confidential and must have a certain degree of protection.</p>
  
  <p>The considerations I've thought of are:</p>
  
  <ol>
  <li>Storing on the file server makes for HUUUUUUUGE numbers of files all dumped in a single directory, and therefore slower access, unless I can work out a reasonable semantic definition for a directory tree structure</li>
  <li>OTOH, I'm guessing that the file server can handle compression somewhat better than the DB... or am I wrong?</li>
  <li>My instincts tell me that the DB's security is stronger than the file server's, but I'm not sure if that's necessarily true.</li>
  <li>Don't know how having terabytes of blobs in my DB will affect performance.</li>
  </ol>
  
  <p>I'd very much appreciate some recommendations here.  Thanks!</p>