How to store Java Objects in Oracle?

Posted on 2007-08-12
Last Modified: 2012-05-05

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.  

Question by:srinitin
    LVL 8

    Expert Comment

    why you want to store objects?

    you may use serialization instead
    LVL 86

    Accepted Solution

    What's your motivation? You can use OR-mapping such as Hibernate
    LVL 8

    Assisted Solution

    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
    LVL 4

    Assisted Solution

    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:

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

    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    The viewer will learn how to implement Singleton Design Pattern in Java.
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now