aspose file tools
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


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

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: 40952
    
  28
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: 31551
    
184

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]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40952
    
  28
Yes, you are right. I was mistaken; BLOB is correct. Sorry.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we store Objects In DATABASE..?