469,273 Members | 1,579 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,273 developers. It's quick & easy.

product jpegs: best database field type: BLOB or filename?

Hello,

I am currently upgrading a database of products to include pictures to
be displayed online. I would like to know whether it would be best to
store the pictures themselves in a database as a BLOB or whether it
would be best to simply store the filename. What are the pros and
cons?

Thank you,

Neil Zanella

Jul 23 '05 #1
1 2140
nz******@cs.mun.ca wrote:
I am currently upgrading a database of products to include pictures to
be displayed online. I would like to know whether it would be best to
store the pictures themselves in a database as a BLOB or whether it
would be best to simply store the filename. What are the pros and
cons?


Store as files:
+ Easy to make, easy to use. It can be difficult to read imagefiles from
database and then show them to user. It is often much simpler just to
generate a link to imagefile.
+ If database is down, files are still usable (if program logic allows that)
+ Database backups won't take that much space, which is a good thing, if
you don't need to make backups from files that often or at all.

- Backups require you to store the database + folder where images are,
which means more work for backupping.
- Copying the whole system for example to another server is often more
easy to do if all data is inside one database.
- If files should not be accessed by anyone, user access control to the
images is easier to handle, if data is inside database.
- Remote access to database requires remote access to files folder also.

If you don't need remote access, or strict user control, you will
propably be happier if you store the images into a folder instead of
database.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Plex | last post: by
6 posts views Thread by Selen | last post: by
2 posts views Thread by Matt Mercer | last post: by
3 posts views Thread by =?Utf-8?B?ZGF2aWQ=?= | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.