Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes Can we store Objects In DATABASE..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Can we store Objects In DATABASE..?" Watch "Can we store Objects In DATABASE..?" New topic
Author

Can we store Objects In DATABASE..?

Mortin kim
Ranch Hand

Joined: Nov 15, 2007
Posts: 44
HI.,

can we store objects in database,if so how..?
can any one send me the code.

Thanks and regards
Kim.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43995
    
  33
I thought, why not serialize it to a byte[] array and then put it in the database as a CLOB?

I found this article using Google.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

Originally posted by Campbell Ritchie:
I thought, why not serialize it to a byte[] array and then put it in the database as a CLOB?

I think Campbell means a BLOB. Blobs are for binary data (bytes) and Clobs are for character date (chars.)


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43995
    
  33
Yes, you are right. I was mistaken; BLOB is correct. Sorry.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Can we store Objects In DATABASE..?
 
It's not a secret anymore!