aspose file tools*
The moose likes Object Relational Mapping and the fly likes How to save Java Object to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to save Java Object to database" Watch "How to save Java Object to database" New topic
Author

How to save Java Object to database

A.G Rajkotia
Greenhorn

Joined: Aug 11, 2011
Posts: 28
Can someone tell me how do we save java objects to database ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

That is an area known as ORM (Object-Relational Mapping), and has its own forum, so I've moved this question to that forum for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
A.G Rajkotia
Greenhorn

Joined: Aug 11, 2011
Posts: 28
can this be done using jdbc
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

Sure, you'll just have to manage the object-to-relational mapping yourself. (Which is a pain in the neck, hence the existence of ORM tools.)
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 1031
    
    5

JDBC traditionally uses SQL and stored procedures to access relational databases.

http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html

The industry is moving towards other forms of database, like object and graph.
If you are after a true object DB, check out something like http://www.db4o.com/ but there are quite a few others out there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to save Java Object to database