• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

Can I store objects

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I store objects in the database using JDBC
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try serializing the object and storing it as a blob.
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's true, although if your database doesn't support BLOBs, you can also use other "binary" types such as Oracle's RAW and LONGRAW. Even if the database does support BLOBs, I'm not sure that you gain anything by using them, since their main advantage over (say) a LONGRAW is that a BLOB allows you to update or retrieve only a portion of the data, and in the case of a serialized object instance, I can't think of any situation where you'd want to do so. Besides, if your database supports BLOB (which is a SQL3 data type), there's a good chance that it also supports structured data types (also defined in SQL3), and you'd probably be better off using one of those. There's some good information on SQL3 types at:
Alternatively, you could pick up a copy of my book, which covers these topics in a bit more detail.
Brett Spell
Author, Professional Java Programming
[This message has been edited by Brett Spell (edited February 24, 2001).]
Anderson gave himself the promotion. So I gave myself this tiny ad:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic