tags:

views:

54

answers:

4

I am working with Jsbs and want to select a DBMS for my application that require a native XML database. Can you people guide me?

1) how many DBMS are supported by Java (is it true almost all DBMS are supported by java?)

2) Which one will be the best selection for XML storage and retrieval?

Thanks in advance.

A: 

1) Yes, there are JDBC drivers for all the major DBMS (Oracle, MySQL, Postgres, DB2...) and also some interesting java DBMS like HSQL

2) As far as I know Oracle, DB2, PostgreSQL (and probably MySQL) all have XML column types

pablochan
A: 

It is not obvious to me that you need anything more than support for Blobs or Clobs to implement simple XML storage and retrieval. You'd only need special XML support if you needed to perform queries against the data contained in the XML.

What you are talking about is an "XML enabled" RDBMS. Depending on your actual requirements, you may also want to look into native XML databases (NXDs). There is even a standard Java API (XQJ) for querying NXDs, though not all vendors support it.

Stephen C
A: 

Most modern databases have JDBC-drivers, which is what is needed for Java programs to connect to the database. You generally want type 4 drivers which do not depend on native code.

For starting I would recommend Apache Derby, which is written in Java and can be part of your program, which keeps it simple. http://db.apache.org/derby/. If you later find you need another database you replace the JDBC-driver, and double-check your SQL-statements.

Thorbjørn Ravn Andersen
+1  A: 

Here is a list of JDBC Drivers and the DBs they work for. Probably every database out there has a JDBC driver.

As far as supporting XML it depends if you want to be able to do queries against the XML or not. Most modern DBMSs support XML to some degree. Do you have one you are already using, or that you are recommended to use ?

Romain Hippeau