Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 591895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:40:58+00:00 2026-05-13T15:40:58+00:00

I have a design decision to make regarding documents uploaded to my web site:

  • 0

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.

The considerations I’ve thought of are:

  1. 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
  2. OTOH, I’m guessing that the file server can handle compression somewhat better than the DB… or am I wrong?
  3. 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.
  4. Don’t know how having terabytes of blobs in my DB will affect performance.

I’d very much appreciate some recommendations here. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:40:59+00:00Added an answer on May 13, 2026 at 3:40 pm

    In SQL Server 2005, you only have the choice of using VARBINARY(MAX) to store the files inside the database table, or then keep them outside.

    The obvious drawback of leaving them outside the database is that the database can’t really control what happens to them; they could be moved, renamed, deleted…..

    SQL Server 2008 introduces the FILESTERAM attribute on VARBINARY(MAX) types, which allows you to leave the files outside the database table, but still under transactional control of the database – e.g. you cannot just delete the files from the disk, the files are integral part of the database and thus get copied and backed up with it. Great if you need it, but it could make for some huge backups! 🙂

    The SQL Server 2008 launch presented some “best practices” as to when to store stuff in the database directly, and when to use FILESTREAM. These are:

    • if the files are typically less than 256 KB in size, the database table is the best option
    • if the files are typically over 1 MB in size, or could be more than 2 GB in size, then FILESTREAM (or in your case: plain old filesystem) is your best choice
    • no recommendation for files between those two margins

    Also, in order not to negatively impact performance of your queries, it’s often a good idea to put the large files into a separate table alltogether – don’t have the huge blobs be part of your regular tables which you query – but rather create a separate table, which you only ever query against, if you really need the megabytes of documents or images.

    So that might give you an idea of where to start out from!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to make a design decision with regards to fields in the database.
I am trying to make decision how to design my app. I have about
I have to make a decision regarding generalization vs polymorphism. Well the scenario is
I'm about to make a design decision that could potentially have visible performance implications.
What could have been the design decision behind restricting a class to either public
I have the following design decision to make - running into it for the
So I have a design decision to make. I'm building a website, so the
I have tough time making this design decision. I could go with traditional new
More of a design/conceptual question. At work the decision was made to have our
I've got a design decision to make and am looking for some best practice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.