JDBC 4.0 adds java.sql.Types.SQLXML for operating on XML columns.
There's an XML type implementation by Oracle, DB2 and Microsoft SQL
Server.
Is Apache Derby (Cloudscape/Java DB) the only open source database
software with an implementation of the XML column type (UTF-16 data)?
>JDBC 4.0 adds java.sql.Types.SQLXML for operating on XML columns.
>There's an XML type implementation by Oracle, DB2 and Microsoft SQL
>Server.
However, performance would likely be atrocious compared with a native
SQL database. It would only be useful for a one-time extract from a
small file. Otherwise you would be much better off to parse the file
and put the fields in conventional SQL form. Possibly that is what a
good implementation would do behind the scenes. It would not work
directly on the XML. It would import it first.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Lew - 24 Jul 2007 13:28 GMT
JB wrote:
> Is Apache Derby (Cloudscape/Java DB) the only open source database
> software with an implementation of the XML column type (UTF-16 data)?
No. Just about every database system supports a CLOB or TEXT type, which can
be used to store XML data. Postgres has "contrib" modules that let you
process text as XML, and supports different character encodings at the
database level. Usually one would create the db with UTF-8 encoding, which is
fine for XML. (UTF-8 is the usual and default encoding for XML.)

Signature
Lew
JB - 24 Jul 2007 18:29 GMT
> JB wrote:
> > Is Apache Derby (Cloudscape/Java DB) the only open source database
[quoted text clipped - 8 lines]
> --
> Lew
When did PostgreSQL add support for UTF-16?
Lew - 24 Jul 2007 22:51 GMT
>>> Is Apache Derby (Cloudscape/Java DB) the only open source database
>>> software with an implementation of the XML column type (UTF-16 data)?
Lew wrote:
>> No. Just about every database system supports a CLOB or TEXT type, which can
>> be used to store XML data. Postgres has "contrib" modules that let you
>> process text as XML, and supports different character encodings at the
>> database level. Usually one would create the db with UTF-8 encoding, which is
>> fine for XML. (UTF-8 is the usual and default encoding for XML.)
Also, the next version of PG will support the XML data type directly. It
still won't support UTF-16, though. Of course, UTF-8 is the default for XML.

Signature
Lew
JB - 24 Jul 2007 18:24 GMT
On Jul 24, 12:21 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> >JDBC 4.0 adds java.sql.Types.SQLXML for operating on XML columns.
> >There's an XML type implementation by Oracle, DB2 and Microsoft SQL
[quoted text clipped - 4 lines]
> small file. Otherwise you would be much better off to parse the file
> and put the fields in conventional SQL form.
The issue isn't the best design for performance. There are times when
there's a requirement to store XML in its native format.
There are SQL databases that have an XML type, just as they have a
VARCHAR type. JDBC 4.0 adds that as a new type.