[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to store Java Objects in Oracle?

Posted on 2007-08-12
6
Medium Priority
?
1,359 Views
Last Modified: 2012-05-05
Hi,

I'm looking to store java objects in an Oracle database. Can an object be stored in a database?   I don't want to store the attributes of a class.  


TIA
0
Comment
Question by:srinitin
5 Comments
 
LVL 8

Expert Comment

by:mnrz
ID: 19678744
why you want to store objects?

you may use serialization instead
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 172 total points
ID: 19678826
What's your motivation? You can use OR-mapping such as Hibernate
0
 
LVL 8

Assisted Solution

by:mnrz
mnrz earned 164 total points
ID: 19678834
if you're insisting in storing the whole object, you can serialize the object and insert into a BLOB field and while reading from database you should deserialize the object

but this is very bad way
0
 
LVL 4

Assisted Solution

by:doraemon-nolife
doraemon-nolife earned 164 total points
ID: 19680962
Try using ORM framework, for example Hibernate, Torque, iBatis, etc.

Each java object should correspond to a table in your database, not a column.

Check this site for Hibernate information:
http://www.javapassion.com/handsonlabs/hibernatestepbystep/

I personally recommend Hibernate because it won The Most Effective Framework Award for 2 subsequent years.

:)
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20213348
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month18 days, 10 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question