Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql server vs window folder for storing images

Status
Not open for further replies.

duckyboyz

Programmer
Mar 28, 2002
57
US
In your opinion what's the most effecient way of storing image fields, in on the database or a storing the file location (i.e. the windows foler location ex. c:\image\image1.jpg"). I'm using crystal reports 8.0, sql 2000, and asp as the front end. when i select by last_name in the asp page it can return quite a few records. Sometime it slows down. would it be better to store the images in a windows folder and then store the file location on the sql table?
 
I would definitely fall down on the "store the images in the file system and just the location in the db" side of the fence in this situation.

On the ASP page it is much easier to just look up the location and output it inside the <img> tag than mess about trying to binary read the image direct from the db.

--James
 
I'm with JamesLean on this one. Storing just the pointer in the database is a much better and easier way to go.

When storing the pointer in the database, be sure to only store the relative link for the web site. c:\image\image1.jpg won't do your web site any good, however \image\image1.jpg will.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
I've read in SQLServer magazine that it is now easier to save images into the database, but after reading the article I remember thinking that it still wasn't a compelling reason to do so. I don't recall the issue, but I'm fairly sure it was this year. :)
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Just because something is easy, doesn't mean it's the correct thing to do.

It's easy to not patch my systems, but it's not the right thing to do if I want to keep them running.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top