Toad World® Forums

How to store photo images in an Oracle database table?

When you get right down to it, I’m not sure you’ve found the right tool yet for
the job . Oracle is a tool for storing data. Toad is a tool for manipulating
Oracle. Both have some data display capabilities, but data display is not their
main purpose – and when you get to displaying images, you ’ ve
exceeded both of their data display capabilities. (One of your previous
questions, when you asked “ what file extension do I write the file out to
disk with? ” , highlighted part of why that capability hasn ’ t been
built into Oracle or Toad: there are lots of data formats for storing images,
each of which requires separate code to display properly.)

You need an image library tool. Such a tool may well use Oracle as its data
store, but it would have additional functionality to display images from the
library – and to add images to the library, and probably more.

The cheapest and easiest image library tool is a shared folder on your network.
Just copy all the files there, and everyone can see all of them. You can work
with your network security if you want it a bit more protected – only
certain people can add/change/delete files, and a different list of people can
view them; perhaps different lists of users on different subfolders if that
’ s what you need.

If you don ’ t want to do that but want a web-based tool, I bet there are
a lot out there, but I don ’ t know.

Nate Schroeder

Enterprise Services - Data Management Team

Monsanto Company

800 N. Lindbergh Blvd. LC4D - Saint Louis, MO - 63167


Hi Nate and ALL,

Thanks for your prompt response. You made a very good point that both Oracle and Toad are not a tool for displaying data purposes, and I was wondering about that especially for displaying a stored photo image. So, displaying an Oracle stored photo image is not a trivial task. I need to either use an image library tool or other tools and perhaps with some scrips in order to display the images properly.

Have you or others done this type of project(i.e. from creating an Oracle database table, storing the photo images from a file (a PDF file in our case), to displaying a photo image)? If you or any others on this group mail list have done this, could you please share your experience of the tasks required to accomplish this type of project and an estimated time for the work breakdown structure?

Thanks again.

Photographs and pictures and Oracle BLOB data are easy to add to a Oracle table. There are two ways to load BLOBs and CLOBs into the database. The first method uses PL/SQL and the DBMS_LOB package and the BFILE datatype to transfer external LOB files into the database internal LOB structures. The second uses the Oracle Call Interface (OCI) to perform the same function. I’ve read an aritcle related to how to store photo or save image in an Oracle database table: