C# .NET - Which is better option to store large files - MS SqlServer Database or on the disk

Asked By Pranay on 20-Feb-13 10:54 AM
I've  large files and umpteen no. of files. Which is better option? Should I store the files in the MS Sql Server database or on the hosting server disk space? Is there anyother way to go about it?  Its a web application with centralized database. Standard security measures, I mean, asp.net membership security has to be implemented.
Any thoughts, suggestions,  and links to where I can find more material on this.
Thanks for your help and support
Yuri Kasan replied to Pranay on 20-Feb-13 03:28 PM
Definitely the disk, with pointers to a file in the database

Robbe Morris replied to Pranay on 20-Feb-13 03:30 PM
As yuri said, definitely the disk.  You'll want to store the path to the file in a table.  At some point, you may move these files off the local hard drive and access them over a shared drive or perhaps via http on another web server.  So, think about those scenarios up front as you decide what your table schema is going to look like and how you'll access the files in your code.
Pranay replied to Robbe Morris on 20-Feb-13 04:07 PM

I've a doubt, what about the disk space? I mean, database can take GBs of data but disk space is very limited. My hosting company provides 1000 Mb of disk space. Now if I've too many files won't that be an issue?

Otherwise, I know saving on disk is better as far as performance is concerned. Also, coding is little easier for the same but again data syncronization is another thing that needs to be taken care of.
Thanks for your help.
Robbe Morris replied to Pranay on 20-Feb-13 04:31 PM
Uh, your database ultimately stores its data files to the hard disk as well.  Why would you think storing the files in the database saves you disk space?  I can't imagine your hosting company would charge you much more for additional drive space should you need it.