Relational versus XML DB

All the world uses relational databases to store and query each and every item. To me this is like having a hammer that worked nice and now you use it to eat sushi. The alternative of the XML DB has long grown mature and it gets time to use it for what it is good for. A example of missuse of relational databases can be regarde e.g. in HP Operations Manager for Unix aka OMU 8 and below, where policies (configuration for monitoring) is stored in a relational database (Oracle) in many many complex tables. Just use a XML DB for such highly structured document-oriented objects, it is easy to query still but very easy to store and access. My split of when to use a relational DB and when to use a XML DB is exactly that, use XML DB for low-volume complex document-like objects. Clearly if one has a simple object with a fixed schema or mass-data such as measurements or audit logs that go into thousands and millions, not using a relational DB would be silly. Its two different weapons, use them when they are suitable.

A common way to avoid the hassles of relational multi-table splits is to use blobs but that only kills the option to query the inner structure of the object. If one would have used a XML DB document one could still nicely and quite efficiently be able to query inner values using XPath or XQuery!

There are several commercial and open-source Java-based XML DBs available, such as Xindice or eXist. I prefer eXist, it supports all query mechanisms is efficient and has good admin capabilities and can be easily integrated into other software e.g. as a war file.