Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to store binary data (pictures) in a Oracle database

Re: how to store binary data (pictures) in a Oracle database

From: Doug Anderson <dathedba_at_mindspring.com>
Date: 1997/01/29
Message-ID: <5co5vk$fa4@camel1.mindspring.com>#1/1

 <krain_at_bk.bosch.de> wrote:
>I would like to know how to store binary data (pictures)
>in a Oracle database.
>For example: I would like to store a "*.gif" picture in the database.
>The gif-picture is in a file on my harddisc. How can I put the picture in
>the database ?
>Do I have access to the picture with ORACLE-FORMS 4.5 ?
>Or: How can I retrieve the picture from the database?
>I am looking for a demo-table, where I can see how it works.

There are two approaches that you may think about. The first is to store the path and filename as a string in the database. When you reference the picture it must go to the location referred to by the database to get the picture.

The second option is to store the whole picture in the database as a row of 'LONG RAW' datatype. This allows up to 2 Gigabytes of binary data but is very difficult to maintain. Most datatypes in Oracle allow one to copy the data from one table to another with a simple 'CREATE TABLE .. AS SELECT columns FROM ...'. But alas, 'LONG RAW' does not.

Received on Wed Jan 29 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US