
XML Column Method Overview
XML |
Documents |
Application
DB2 XML Extender
DTD
DAD
XML Column Method
Document insert, update, delete, search & retrieve
(UDFs and Stored Procedures)
|
|
|
| elements/attributes | ||||||||||||||
|
|
|
|
|
|
|
|
|
|
| "as is" xml document | |||||||
|
| DTD_REF |
|
|
|
|
|
| ||||||||||
|
|
|
|
|
| XML Side Tables User Tables | ||||||||||||
|
|
|
|
|
| |||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| xmlClob or |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
| XML_USAGE |
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| xmlVarchar | ||||
|
|
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Figure 6-14 XML Column method overview
6.4.1 XML Collection
The XML Collection refers to a set of tables that is mapped to XML documents. This method is used to decompose the incoming XML document into database table columns or compose XML document from the data in database tables.
The XML Collection is defined in a DAD file, which specifies how the elements or attributes of an XML document are mapped to one or more tables. The collection is given a name so that it is easily run with stored procedures when composing or decomposing the XML documents.
The tables can be a new set of tables that the XML Extender creates based on the DAD file, when decomposing the XML document, or existing set of tables that were used to compose the XML document. Columns of these tables are mapped to the elements or attributes of the XML data. The data in these table columns does not contain XML tags; it contains the content of the element and the values of the attributes in the XML document. Figure
134 The XML Files: Development of XML/XSL Applications Using WebSphere Studio