When to use a Native XML Database

March 21, 2008

I recently discovered an excellent treatise on XML and Databases by Ronald Bourret. It is certainly worth reading. Mr. Bourret describes the various options for storing XML in databases. He claims that the most important factor in choosing a database is whether the information is data-centric or document-centric. I will take some liberties and paraphrase his descriptions:

  • Data-centric information uses XML solely as a data transport mechanism. It is not important that the data is, for some length of time, in XML format. Examples are sales orders, flight schedules, scientific data, and stock quotes. For such cases, he recommends using a traditional database, such as a relational, object-oriented, or hierarchical database.
  • For document-centric information, XML fulfills a greater role. In this case, the XML elements, attributes, and structure are meaningful and have value. Examples are books, email, advertisements, and hand-written XHTML documents. For such cases, he recommends using a native XML database or a content management system.

He does say that these rules are not absolute, without going into further detail. Let me describe some reasons why you may want to store data-centric information in a native XML database:

  • Performance improvements. See my previous post for details regarding the performance for queries.
  • Greater business agility. Respond quickly to dynamic conditions by easily accommodating changes to data and schemas.
  • Lower development costs. Reduced code and development complexities lead to shorter development cycles when updating your systems or adding new applications.
  • Improved business insight. Gain competitive advantage through better and quicker access to business insights.
  • Space savings. Databases like DB2 use inlining and compression to realize between 3x and 6x space savings when storing XML data.

I will go into more detail on some of these reasons in subsequent posts.

About these ads

4 Responses to “When to use a Native XML Database”


  1. Hi,

    I was just researching XML support in DB2 and found this post. I thought I might point out that I’ve written an article that is more relevant to this topic:

    “Going native: Use cases for native XML databases”
    http://www.rpbourret.com/xml/UseCases.htm

    This is based on a 2005 survey of about half the native XML database vendors, including almost all of the major vendors.

    To quote from the conclusion: “[The most common uses of native XML databases are] managing documents, integrating data, and managing semi-structured data. What is important about these uses is that most represent cases where people have tried to use relational or other types of databases and have either failed or written less sophisticated applications than they would like. Native XML databases have succeeded because of their query languages (most notably XQuery, but also XML-aware full-text queries), the flexibility of the XML data model, and their ability to handle schemaless data.”

    Of note, performance was not a primary criteria in any of the use cases reported by the vendors. Instead, it was a secondary benefit to simply being able to solve a previously insoluble problem.

    – Ronald Bourret


  2. Hi Ronald,

    Thanks so much for the comment. Being able to do something that was previously very difficult, or not possible, is of course the most significant benefit. Although, we have seen situations where performance is very important for organizations. For instance, we have seen the “need for speed” in transactional systems where organizations use XML-based industry standards like ACORD, FpML, or FIXML as their data format. The benefits of native XML storage can be quite pronounced at query time because you do not need to perform additional XML parsing on the data you retrieve. This can have a big impact on reporting and analysis. In financial services and retail, the timely availability of reports is very important. We have seen the availability of reports in such situations drop from as much as 24 or 48 hours down to a few short minutes, which has a very real impact on those businesses. So, to summarize, we have seen performance benefits drive native XML adoption in data-centric use cases where organizations have large XML-based transactional systems.

    Regards,
    Conor.

  3. pradeep Says:

    the purpose of storing the data in XML is kinda for document centric data …. so this is the situation where we use XML ?

    data centric-traditional databases like Mysql ,oracle etc etc?
    document centric-XML besides db2 or oracle?

  4. pradeep Says:

    i mean for data centric we use rdbms


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 51 other followers

%d bloggers like this: