This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Common data type for XML in a database

 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to store XML in a database, however as my application currently runs under mysql, sql 2005 and oracle 10g I would like to use a column type in each database which is the same, at least from the perspective of jdbc.

Can anyone suggest anything, all the vendors seem to have different names for similar types and it's very confusing.

The data will not be indexed and is just for storage. I cannot guarantee that an xml will be limited to only small sizes.

Thanks

Dave
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about the CLOB (Character Large Object)type?
One important thing to keep in mind is to use the correct character encoding whatever data type you use.
 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But some database vendors don't seem to call their CLOB by that name, so can you tell me what their respective terms are ?

Thanks

Dave
 
Paul Clapham
Sheriff
Pie
Posts: 20966
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, your question is "What does Oracle call a CLOB?"

That isn't much of an XML question. More of a JDBC question, I would say. Moving...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,
mysql and Oracle both call it a CLOB.
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
Dave,
mysql and Oracle both call it a CLOB.


... and SQL Server, Sybase, DB2, etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic