IBM Books

XML Extender Administration and Programming

Choosing an access and storage method

The XML Extender provides two access and storage methods to use DB2 as an XML repository: XML column and XML collection. You first need to decide which of the methods best matches your application needs for accessing and manipulating XML data.

XML column
Stores and retrieves entire XML documents as DB2 column data. The XML data is represented by an XML column.

XML collection
Decomposes XML documents into a collection of relational tables or composes XML documents from a collection of relational tables.

The nature of your application determines the type of access and storage method to use and how to structure your XML data. The following scenarios describe situations in which each access and storage method is the most appropriate.

When to use XML columns

Use XML columns in the following situations:

When to use XML collections

Use XML collections in the following situations:

You use the document access definition (DAD) file to associate XML data with DB2 tables through these two access and storage methods. Figure 7 shows how the DAD specifies the access and storage methods.

Figure 7. The DAD file maps the XML document structure to DB2 and specifies the access and storage method.


The DAD file maps the XML document structure to DB2 and specifies the access and storage method.

The DAD file is an important part of administrating the XML Extender. It defines the location of key files like the DTD, and specifies how the XML document structure relates to your DB2 data. Most important, it defines the access and storage methods you use in your application.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]