• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Day 10. Creating Database-Driven Web Pages > Adding Graphics to the Recordset

Adding Graphics to the Recordset

It would be nice to show a picture of each doggy in the tblSimpleDoglist table. Without explicit Dreamweaver MX support, however, how can you use graphics within the database? The answer is simple; just store a URL to the location of the images within a directory on the server. Rather than storing the image itself, you store a reference to the image. This means you're going to need a slight variation of the table you're currently using, but nothing too serious.

Caution

If Dreamweaver MX ultimately adds embedded image support in the future, I would still think twice before using it. By employing the blob data type (Binary Large Object), it is possible to store images, files, and other binary data directly in a database table.

Keeping images in a database is at times useful and can speed up image retrieval from within a large library. Unfortunately, it also removes access to the files from the people who need it—namely, the designers. Depending on the system, the only person who might have access to the files is the database programmer. Because Dreamweaver MX tries to create a distributed editing environment, this works against one of the basic philosophies of the software.

I've personally worked on systems that stored all the graphics within a database. Each time a button, logo, or other element needed updated, the designers would call on me to retrieve the image. I would send it to them and then reimport the updated graphic. Not much fun, if you ask me.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint