store image in DB or in file

  • Thread starter Thread starter clark
  • Start date Start date
C

clark

I have an app that needs to upload images for each active
member. Which is the best approach?
1. to store the img directly in SQL Server database
or
2. to store path/filename in db and put file on server

volume is potentially 10,000+ images
 
The answer is "it depends."
It depends on all kinds of things such as hardware, infrastructure, number
of users, peak loads, scalability requirements, etc.
Certainly storing the files in SQL Server is easier because you don't have
to worry about file management issues, such as naming conflicts, and files
being deleted, moved, etc.
Here's a good tutorial on the subject for you:
http://www.aspnetpro.com/features/2003/07/asp200307so_f/asp200307so_f.asp
 
This is true to some extent.
But keep in mind that Microsoft's next Windows file system is based on SQL
Server.
So soon you'll essentially be storing all your files in SQL Server whether
you want to or not.

Even so, the decision still basically comes down to App Performance vs.
Development Time.
 
I agree with your view points, but while waiting for Yukon I think that
because of SQL Servers rather poor BLOB handling, storing images in the file
system is by far the most efficient.
 
Back
Top