Many people think of storing images in a database as a complete overhead or even that the performance suffers. This might be very true for a database product that has no special image functions or performance issues with large objects stored within the database. Good news for every developer, meet Intermedia a part of Oracles Database offering…..
Oracle Intermedia
Intermedia is part of every Oracle Database (except Oracle’s Express Edition. Well, they had to make you go for your money…) and is the most overlooked part within Oracle. With Intermedia you can replace all you blob fields with a intermedia type (ordimage). When using a intermedia field the images will be stored within that field and also any metadata (XMP; IPTC; DICOM and EXIF) can be extracted and again stored as XMLTYPE fields (which then again can be indexed with OracleText).
Also every image that is stored with intermedia retains all image informations like height, width, imagesize, imagename and so on. Oracle did even go further and made all those Intermedia variables available within PL/SQL. With it we are able to retrieve the width of a image stored in the database as simple as:
SELECT i.image.getwidth()
FROM images i
(you have to alias the table or else it does not work)
But InterMedia can do more then just storing images. It is able store audio and video as well. Plus with the Oracle Application Server installed you will be able to stream all you images to your application (like we do with Razuna). Plus you will be able do some simple image manipulation with PL/SQL as well.
So, the next time you are planning on a database model, take a look at InterMedia. More information about InterMedia can be found at Oracle.
If you have any question or would like to see more, please feel free to leave comments.