[thelist] The BLOB Ate My Picture WAS Extracting pictures from a database

Jay Blanchard jay.blanchard at niicommunications.com
Fri May 31 06:46:00 CDT 2002


[snip]
Is it possible extract pictures from a database to be integrated in a web
page?
[/snip]

In short Jakob, yes. But there is a much longer answer...

Dependent upon database (M$ SQL, MySQL, PostGres, DB2, Access, whatever) and
the method of delivering dynamic information to the web page (ASP, PHP, C++,
whatever) you have many choices. Some are better than others. A lot of
databases support BLOB's (Binary Large Objects) where the actual picture can
be stored in the database. You have to use your delivery language to gather
items concerning image size for attributes, etc. Using BLOB's	may cause some
database performance related problems, dependent on amount of data, size of
data, etc.

Another method mentioned here is storing the image URL in the database for
the picture. Then, instead of retrieving a binary from the DB you are
retrieving a short line of text, very fast, very efficient. Again, you have
to take advantage of your delivery language for things like attributes as
you will "assemble" the image URL during the upload process, which will then
be saved in the database, attributes and all.

HTH!

Jay





More information about the thelist mailing list