Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to store images in database ?

843859Aug 31 2008 — edited Sep 1 2008
hi to all

In a standalone application, I need to store images (took by a camera) in a database.
Also I need (od course) to recover those images and to display them again.

I have not experience with this kind of problem so I looked for help in the forum,
and now I think I know that there are two possibilities to do it:
- to store the image inside a Blob column of the database;
- to store the image inside a BinaryStream column.
In the first case the data to store in the Blob column needs to be (transformed in) a java-byte[] type.
In the second case the data to store in the Blob column have to be (transformed in) a java-file type.
As well the documentation says that Blob is a better solution, someone in the forum said that, with
large images, he got better and more sure performances using BinaryStream type.

Before I begin to write the code I would like to know if what I learned is right,
and I would like to hear other opinions about this question.

thank you

regards

tonyMrsangelo

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 29 2008
Added on Aug 31 2008
8 comments
296 views