This not only
meant a larger database and, hence, a larger backup, but also a slower application.
A traditional alternative to storing binary objects within the database would be to
simply have a VARCHAR field record the literal or relative path to the binary file itself (e.g., a
value such as C:\WordFiles\WordDoc01.doc). The path approach had drawbacks of its own:
??? Files were not controlled by SQL Server.
??? Files were not included with a SQL Server backup.
Because there was no direct relationship between the file and the database in the traditional
scenario, disaster for one (a lost database or lost file) meant disaster for both.
With the inclusion of FILESTREAM storage in SQL Server 2008, you can combine the
benefit of efficient file storage with the benefits of tightly coupled data stored within
the database itself. When you make use of FILESTREAM storage, you need to also make
use of a filegroup??”for example:
FILEGROUP FileStreamGroup1 CONTAINS FILESTREAM
( NAME = FileStreamDBResumes,
FILENAME = N'D:\test\Resumes')
The FILENAME property for the filegroup points to a directory structure.
Pages:
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608