title: SQL Server: How to store binary data (e.g. Word file)?
body: <p>I'm not a DBA, so I just don't know the upsides and downsides of using various methods of storing binary data in an SQL Server.</p>
  
  <ul>
  <li><code>varbinary(n)</code> stores only 8000 bytes</li>
  <li><code>varbinary(max)</code> stores 2 GB</li>
  <li><code>BLOB</code>s are meant for big files, but come with "administrative" overhead (the files being only referenced in the DB, but actually sitting on the local harddisk)</li>
  </ul>
  
  <p>I basically have about 1000 documents (per year) which I want to store in a SQL Server 2008 R2 database (being filled with a simple ASPX form upload, being viewed by a simple Gridview with download). All documents will probably be around 2MB - 8MB (Word, Excel files). My <strong>guess</strong> is that I should be using a table <code>MyDocuments</code> with the following layout:</p>
  
  <pre><code>MyDocuments 
      Data       varbinary(max)
      Title      varchar(255)
      ModifiedOn datetime()
      ModifiedBy varchar(100)
  </code></pre>
  
  <p>Am I on track with <code>varbinary(max)</code>? Or am I going in the wrong direction (e.g. Performance-wise)?</p>