Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News New File Storage Mechanism for SQL Server

New File Storage Mechanism for SQL Server

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.

Rate this Article