storing pdfs in sql server 2008

maqskywalker
maqskywalker used Ask the Experts™
on
i have an application that generates some pdf files in a directory.

So for example in my application I have a folder called TestFolder that contains the following:

Testrecord1.pdf
Testrecord2.pdf
Testrecord3.pdf


I'm using sql server 2008.

Is it possible to store all those pdfs in into SQL Server?
What i mean is, is it even possible to store pdfs inside a sql server table?
If so what sql server data type is best to store those pdfs?
I mean if these were image files instead of pdfs I could store the images inside a table using image type for the data type. But I'm not sure about pdfs.

or
Is it better to just store the path to to each of these pdfs in a sql server table.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Administrator
Top Expert 2005
Commented:
I would recommend storing the path in SQL Server.  SQL isn't particularly efficient at working with BLOB data.  You will also be bloating your database instance and affecting backup/restore functionality.  If you have to store them in SQL Server then you will want to use VARBINARY(MAX)
Neil RussellTechnical Development Lead

Commented:
Agreed. Always try and avoid storing binary files in your database. Just store a reference to it far more efficient.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial