XML Journal

Native XML databases today: a look at what's available. (Content Management).(Buyers Guide)

The use of XML is on a rapid incline, and with this growth comes high demand for storing and retrieving XML documents in their natural, structured format. This need has resulted in many companies developing what are now referred to as native XML databases. Currently, there's a variety of these databases on the market, and still many people are unaware of their availability and function. A brief tour of a select few will familiarize you with some products that are available and give you a general idea of the functionality of native XML databases.

What Are Native XML Databases?

As the name implies, native XML databases (NXDBs) are specially designed systems used to store XML documents. What differentiates NXDBs from other databases is the way they actually store these documents. XML-enabled databases break down the XML documents into data elements for storage, possibly in relational tables. In contrast, NXDBs use XML documents as their fundamental unit of storage. This storage process parallels the way relational databases have rows in tables as their fundamental unit of storage. NXDBs conserve the original structure of the document as opposed to breaking it down into data objects or tuples. This new technique actually provides quite a few benefits.

One of the benefits is that users don't have to worry about mapping the XML document to an alternate data structure; they can simply insert the data in XML format and retrieve it in its original XML format, known as round-tripping. Round-tripping is especially valuable when very complex XML structures exist that would be almost impossible to map into a more structured database. Another benefit is that due to the storage of the document as a whole, queries don't require rebuilding of the document. Thus, users experience faster retrieval times. Finally, many NXDBs may exploit XML-specific capabilities not included in most relational databases currently available.

General Functionality of NXDBs

While all NXDBs are slightly different, the vast majority share the same basic functionalities and standards. Of course, they all maintain data at the document level. Many NXDBs manage stored documents as collections. Similar to the relational concept of a table, storing documents in this manner allows users to query and interact with the documents as a set. Many NXDBs also follow at least a subset of the XML:DB Initiative standards released by the World Wide Web Consortium (W3C).

Nearly all NXDBs support some kind of query language--XPath is the most popular query language currently used. It was recommended by the W3C and is supported in just about every NXDB. Unfortunately, XPath does have some limitations, including its failure to support joins across documents, sorting, and grouping. A more recent query language recommended by the W3C is XQuery (XPath is actually a subset of XQuery). Many of XPath's problems have been resolved with XQuery. While XPath is more widely used, due to the advantages of XQuery, most NXDBs will most likely migrate toward this language.

Almost all NXDBs also support some level of indexing. Most allow indexing on the data stored as collections, more specifically, elements and attribute values. This can greatly increase the speed of queries.

NXDBs usually support some type of updates. Currently a variety of techniques is used. A few products support XUpdate (from the W3C XML:DB Initiative). However, most NXDBs force the entire document to be retrieved in order …

Read all of this article – and millions more – with a FREE, 7-day trial!