• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

To CLOB or BLOB?

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am storing massive (>15,000) character StringBuffers (basically html files) into a mySQL database...I was wondering if it would be better to use a CLOB to store it in or to use a BLOB? I was thinking CLOB because
i could easily get it out of the database back to StringBuffer and use it in my java application.
Any thoughts would be much appreciated.
Thanks,
Nick Ueda
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's what CLOBs are for...
Just wondering what's the incentive for storing the whole HTML documents in the database instead of the more common combination of metadata in the database and raw HTML on disk?
 
Nick Ueda
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lasse,
By saying metadata do you mean a "reference" to the raw html on disk?
And by saying raw html do you mean the actual html file?
I was just wanting to get these terms straight.
In reply to your question:
I don't know...storing the content in a StringBuffer is the first
thing I thought of. I bet the way you suggested could very well
be alot easier.
Thanks,
Nick Ueda
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's exactly what I meant. That's how most people have done it, based on what I've heard.
 
reply
    Bookmark Topic Watch Topic
  • New Topic