The Art of SQL Server FILESTREAM

Storing large object data in the database offers a number of benefits, but introduces performance challenges. Conversely, storing large object data in the file system has overriding performance advantages, but fails to offer some of the basic data integrity, security and manageability features that are required for business data, and which SQL Server provides. Up to now, most people have adopted file system storage by necessity, and often struggled to overcome the associated shortcomings. This is exactly where SQL Server"s new FILESTREAM feature fits in. Introduced in SQL Server 2008, it is implemented as an extension to the VARBINARY(MAX) data type and allows large object data to be stored in a special folder on the NTFS file system, while bringing that data under the transactional control of SQL Server. This book guides you step-by-step through every phase of FILESTREAM implementation, from enabling the feature, to creating FILESTREAM tables, to manipulating FILESTREAM data through the streaming APIs. We also cover, in detail, administration and troubleshooting of FILESTREAM databases and tables. No feature is used in isolation, so we devote several chapters to explaining how this new feature can be integrated into ASP.NET and Silverlight web applications, and into applications using Entity Framework. We also take a look at how well FILESTREAM plays with other SQL Server features such as SSIS and SSRS, pointing out various issues and pain-points along the way. We also devote a full chapter to the FileTable feature, a long-awaited new addition to FILESTREAM, with SQL Server 2012, which allows Windows applications to access FILESTREAM data exactly as is it were stored directly on the file system. We hope this book will get you started, quickly, with FILESTREAM, and then help you master all essential aspects of programming and administering FILESTREAM-enabled databases.