users@jaxb.java.net

Re: Tools for converting to relational database?

From: Wiedmann, Jochen <jochen.wiedmann_at_softwareag.com>
Date: Mon, 10 Feb 2003 20:51:04 +0100

> Hmmm... are there any tools out there for converting a flat XML file
> into a relational database? I have an entire database stored as a flat
> file because it is easy to edit that way. Eventually, thought, I need to
> convert it. How might I do that?

First of all: Convert the flat file into a set of smaller documents that
allow
to regenerate the original document by doing a join. This step is required
regardless of whether you use an XML database or a relational backend.

For example: Do not use this XML file:

     <addresses>
         <address id="1">...</address>
         ...
     </addresses>

But a set of files like

        <address id="1">...</address>

(In practice the required separation may not be so obvious, but it is
usually possible.)

Second: Do you actually want to use a relational database? Once you did
the first step, preferrably combined with some basic normalization, you have
typically avoided the most important limitations of XML databases.

Third: Ok, you need a relational backend. Then have a look at
http://jaxme.sf.net/ <http://jaxme.sf.net/> ,
http://castor.exolab.org/ <http://castor.exolab.org/> ,
http:/zeus.enhydra.org/, http://www.rpbourret.com/xml/XMLDataBinding.htm
<http://www.rpbourret.com/xml/XMLDataBinding.htm> ,
or many other similar sites. I recommend the first, because JaxMe 1 has a
runtime
designed after early versions of the JAXB specification. JaxMe 2 will follow
the
specification, but does not (yet!) have the integrated persistency layer.


Jochen