IBM Books

XML Extender Administration and Programming

XML collection: Integrated data management

Traditional SQL data is either decomposed from incoming XML documents or used to compose outgoing XML documents. If your data is to be shared with other applications, you might want to be able to compose and decompose incoming and outgoing XML documents and manage the data as necessary to take advantage of the relational capabilities of DB2. This type of XML document storage is called XML collection.

An example of an XML collection is shown in Figure 3.

Figure 3. Storing documents as untagged data in DB2 tables


Storing documents as untagged data in DB2 tables

The XML collection is defined in a DAD file, which specifies how elements and attributes are mapped to one or more relational tables. You can define a collection name by enabling it, and then use it with stored procedures to compose or decompose XML documents.

When you define a collection in the DAD file, you use one of two types of mapping schemes, SQL mapping or RDB_node mapping. SQL mapping uses SQL SELECT statements to define the DB2 tables and conditions uses for the collection. RDB_node mapping uses XPath-based RDB_node to define the tables, columns, and conditions.

Stored procedures are provided to compose or decompose XML documents. The stored procedures use the prefix db2xml, which is the schema name of the XML Extender. Use the following stored procedures with XML collections:

XML collection terminology

The following terms are unique to the XML Extender and are used frequently in this book.

composition
Generating XML documents from existing relational data as defined by a DAD file.

decomposition
Storing XML documents as untagged, relational data as defined by a DAD file.

document access definition (DAD)
For XML collection, a mapping of XML document structures to DB2 data structures for composing or decomposing XML documents.

DXX_INSTALL
The XML Extender installation directory.

XML collection
A method of storing and accessing XML data using a set of relational tables. Untagged data can be composed into XML documents, or it can be decomposed from XML documents. Also refers to the set of tables into which or from which XML documents are composed or decomposed.

XML stored procedures
Stored procedures to compose or decompose XML documents.


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