Article:
  ColdFusion MX on Mac OS X, Part 3
Subject:   Move existing .gif to new sql database
Date:   2002-11-07 11:22:04
From:   rlsjhsbell
How do I move several, pre-existing .gif files into an SQL database without referencing the path?
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Move existing .gif to new sql database
    2002-11-09 11:26:55  dicklacara [View]

    You didn't say which SQL database.

    Many SQL databases do not have the capability to store Binary Large OBjectS (BLOBS), so this may not even be possible with your particular SQL database.

    For those databases that do handle BLOBS, it is usually recommended that you *Not* store images in the database:

    1) it is far slower and less efficient than using t the file system to store images.

    2) it puts a tremendous burden on the database server

    3) it has an adverse effect on other database operations.

    4) The total number of images that can be stored in a database is far less than can be stored in the file syste,

    5) Your CFMX (or other language) application needs to retrieve the image and pass it to the web server, placing an extra (and unnecessary) burden on your CFMX (or other) Web Application server.

    6) A Web Server (like Apache) is designed to retrieve images from the file system and serve them to a client browser -- it does this much more efficiently than any scenario involving a Web Application Server (CFMX), a web application (your CFMX template) and a DAtabase server.

    Many people think that by storing images in a database:

    1) they can control access to the images

    2) they can record accesses of the images

    3) they can search on image attributes

    All of these can be accomplished much more efficiently by storing the image path, statistics and attributes in the database, while storing the actual image in the file system.

    Finally, storing images in a database, by itself, does not provide security or prevent copying of images -- once they are received by the client browser, they can be saved and copied at will.

    DIck