Forum Moderators: coopster

Message Too Old, No Replies

Database VS Files System for image storage

         

one_mind

3:05 pm on Jul 26, 2006 (gmt 0)

10+ Year Member



Hi,

I have a site where users can upload a logo image for their profile. At the moment, i just upload them to my server and place them in a logos file with each image named the same as their id number.

This works fine but am beginning to wonder if it would be faster to store all the logos in blob fields in a database. Or would that be slower?

Any opinions would be greatly appreciated.

Thanks :)

adni18

5:32 pm on Jul 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's probably more practical to store them as files. I don't know about the speed of database blobs, but if you actually store them as a file, then you can just link to the image right in the HTML, rather than calling a server script to read and print the contents.

adnovice88

6:26 pm on Jul 26, 2006 (gmt 0)

10+ Year Member



blobs are not slower but for images to be displayed on a site, they are not worth it.

i agree with adni18, linking to a file from html is cleaner and simpler.

coopster

10:40 pm on Jul 26, 2006 (gmt 0)

one_mind

3:36 pm on Jul 27, 2006 (gmt 0)

10+ Year Member



Great link,

Thanks guys :)

one_mind

5:02 pm on Jul 27, 2006 (gmt 0)

10+ Year Member



Anyone know anything about storing pdfs in a db?

I have to do something like this soon but am beginning to wonder if it would be better to keep them in a file also?

jatar_k

5:13 pm on Jul 27, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have always thought keeping large chunks, such as files of any type, is better in the filesystem as opposed to the db itself