Friday, 26 March 2010 10:08

Images and Databases Featured

Written by Miguel
  • Print
  • E-mail
  • Share |
  • Be the first to comment!
3ddatabase

We store all sorts of information in a database table, so why not store your images in the same manner? Well, the reality is that storing images in a database table is messy and the disadvantages convincingly outweigh any possible advantage.

An image cannot be stored in a database table in it’s original format. Instead, it is stored as a binary large object, or a blob. Not every database supports blobs, and if you ever decide to migrate to a different platform, you might find yourself facing a major obstacle.

Let's look at the main disadvantages of storing images in a database table:
- Images cannot be indexed without textual information - Images are large in size (Kb), and can inflate the database tables - Retrieving images from the database table requires passing the image to a separate script, which slows down your page load speed

To summarize, storing images in a database table requires more development and is a messy process. Ideally, you want to store images in a folder, and store the image names and captions in a database table. This way the image information can be indexed and searched, the database table uses up less space and displaying the information on your web page is a lot faster.
Last modified on Monday, 17 May 2010 14:59
Miguel

Miguel

E-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view it

Add comment



Call Us: +27 11 612 7460
LiveZilla Live Help