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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

images... SQL or File

Status
Not open for further replies.

Zarcom

Programmer
May 7, 2002
1,275
CA
Hey peoples

Just wondering what your thoughts on this is. I am building a couple of site that need many images. Depending what item is selected that image will be displayed.

I have two ways to do this and am not sure which one to use.
1. Store the images in SQL and load them into the page programmatically

2. Store the images in a folder and keep the name of the image in the corresponding SQL record. When the record is selected set the picture URL to the stored name.

Which would you prefer.

Awaiting your thoughts

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
i'd store the image names.. that way less data will have to be managed by the database. you can easily distribute your images over as many servers as you need and even use external sites to host the images if needed.. maintainence is a bit rough like that though but much cheaper if you can handle it..

if cash and system resources are not an issue storing them in the database would be easier to maintain.
 
By Database you mean Access, right Mark? I didn't think you could store images in SQL Server, and if you can, I've seen many articles that talked about how that was NOT a good idea (like this one:
I'd have to go with the "storing names in the database and assigning the url" way of doing it. It's much easier just to say "thats where the file is".

But thats just me. How many images exactly are we talking about?

D'Arcy
 
How many? Um about 2000 at the moment that will increase as the site grows though.

I do mean SQL not Access. I know you can do it because the programmer that was here before me did it in a couple programs and it seems to work pretty slick. For now I am going with storeing the name and reading that in.

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Ah, so this is like an online shopping store idea or something?

One other option that you *could* look at (its more of a kewl geeky thing to do that uses brand-spankin' new technology-ish stuff) is to use svg (scalable vector graphics) format instead of jpg or gif.

An svg is a mathematical representation of an image in xml form. It generally gives a much better image than jpg or gif. Better yet, you don't actually store the "image", just how to draw the image (the xml).

Of course, limitations are that its not a fully accepted standard just yet, and you need a special plug in to view them (which IE 6.0 has, but not sure about Netscape).

So anyway, this may totally be of no use to you, but there is anotehr option anyway as far as storing the data (store the xml text in the database instead of an actual image).

D

 
I think I am going to go with the storing the image name. It'll be the fastest way for me and I am getting paid on contract so fast is good.

I like the SVG option, I have heard of it before and think it's a great idea. It's just not going to work with what we are doing.

I kind of like the SQL storage option but I don't know alot about it, and I would need to write some extra code for grabbing/displaying the images and saving them.

Thanks for the suggestions people

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top