Q : Use SQL Server or Files For Storage?

M

Marauderz

Quick question for opinions, I thought I read an article about this
somewhere but I can't remember where.

The question is if I was creating a file storage system for a web site that
might have a high rate of requests should I use SQL server as my storage
then use the content-disposition header to deliver the file? or should I
just use SQL to store links to the files on the server. am I right to think
that using actual files would allow my system to have better performance
since IIS would cache and stream the files properly. But if I use SQL to
store my files it'd be more secure since the file can only be accessed after
going through both forms authentication, and my own code to extract the blob
data from SQL Server itself? But performance would suffer since I have to
pull it out from the database, coerce the data into a memory stream then
only write it down the response stream.

Opinions please?

Thanks,
Marauderz.
 
K

Kevin Spencer

Storing files in SQL Server is going to be a performance hit, especially if
they are binary files. You can make storing the files in your file system as
secure as you want it to be. So, all other things being equal, store your
files in the file system.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
M

Marauderz

Thanks for the responses guys, the problem is I'm working with some other
devices like Nokia phones and others. =P So if I use links and I want to
protect my files I'd be using an ASPX page or IHTTPHandler to process and
ensure the request is authentic then stream it through via a BinaryWrite.

So the question is of course.. can I rely on the Content-Disposition HTML
Header so that I can name and transfer the files down to them phones
properly? =P

Thanks again for the responses.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top