I have a website which is using SQL SERVER 2008 which allows user to upload files like excel, word, txt, pdf, media files and other format also. (Just like Rapishare, Megaupload)
What is the best way to store them into SQL SERVER ?
I have a website which is using SQL SERVER 2008 which allows user to upload files like excel, word, txt, pdf, media files and other format also. (Just like Rapishare, Megaupload)
What is the best way to store them into SQL SERVER ?
FILESTREAM
or VARBINARY(MAX)
, but you should consider the pros and cons of doing so versus storing the files on the file system and just a pointer to the file in the database.
Pros for storing files in the database:
Cons:
In SQL Server 2012, FileTable will offer a more usable hybrid.
Since you use SQL Server 2008 you might look into the filestream feature. This should be an efficient way to store binary data from files with sizes over 1 MB file size.