InfoQ

News

New File Storage Mechanism for SQL Server

Posted by Jonathan Allen on Dec 03, 2007

Community
.NET
Topics
SQL Server
Tags
SQL Server 2008

SQL Server was never designed to act as a file system, but many developers use it that way nonetheless. Countless content management systems rely on either shoving large files into blobs or storing filenames. The former has subpar performance while the later requires manually keeping the file system in sync.

SQL Server 2008 seeks to correct this by introducing a filestream option that can be applied to a varbinary(max) column. When used, binary data is stored as files in a private section of a NTFS drive. This offers the performance of a normal file but without the concurrency and backup issues.

The files are created in a folder specified by creating a new FileGroup. In order to link files to rows, each row must contain a GUID column. No explanation was given for why this was necessary in addition to the actual file column.

about time by joey jo jo shabadoo Posted Dec 3, 2007 8:09 AM
Re: about time by Brian Lyttle Posted Dec 3, 2007 8:49 PM
  1. Back to top

    about time

    Dec 3, 2007 8:09 AM by joey jo jo shabadoo

    At least they are trying to address this. I've long been an advocate of keeping binary data out of the database and using the filesystem to um, store files. I've gotten weird looks in the past from Microsoft MVPs and n00bs alike. "Just put it in the database, that's what it's there for, it can handle it!".

  2. Back to top

    Re: about time

    Dec 3, 2007 8:49 PM by Brian Lyttle

    At least they are trying to address this. I've long been an advocate of keeping binary data out of the database and using the filesystem to um, store files. I've gotten weird looks in the past from Microsoft MVPs and n00bs alike. "Just put it in the database, that's what it's there for, it can handle it!".


    Well I there are limitations to both approaches. Depending on your needs, a single method of backup/restore may be useful. I think performance concerns can be dealt with in many situations, and you can end up with performance issues on the file system too. As with most things the fault is the people rather than the technology.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.