Working with Filestream and FileTable Together in SQL Server

Learn SQL with Udemy

For an instructor lead, in-depth look at learning SQL click below.


**

Introduction


In SQL Server, Filestream and FileTable were designed to deliver the best of SQL Server and Windows to store and manage documents and unstructured data. The rest of this post will take you through the process of working with them concurrently.

Getting Started with “Filestream”


SQL FILESTREAM feature allows storing of BLOBs (Binary Large OBjects) such as documents, images, videos, etc. directly to the NTFS file system. This largely eliminates the need for an extra layer to handle these types of data. Here is a quick example:


Create a Database that Supports Filestream


Working with “FileTable”


FileTable is a feature introduced in SQL Server 2012, which is built on the top of FILESTREAM technology. This makes it easier and more efficient to manage, access, and share file directories. Let’s start by enabling it:

Creating a FileTable


In Conclusion


Working with Filestream and FileTable together makes it possible to combine the benefits of SQL Server with those of the Windows operating system. This gentle introduction should serve as a starting point for using these tools to manage your unstructured data. But, of course, these features have more to offer, depending on your specific needs.

`

Leave a Comment