XML Column method
The XML Column method provides the facility to store the entire XML document as is in a table column. The XML documents are inserted into table columns that are enabled for XML and can be updated, retrieved, and searched. The XML document can also be kept on the local file system and only a pointer to the document be kept in the table column.
If you want to search the XML document based on certain element or attribute values, you can map the element and attribute data from an XML document to DB2 tables called side tables. We can build indexes on these side tables to support fast structural search. Figure
When to use XML Column method
We recommend using the XML Column method under the following conditions:
The XML documents already exist.
There is a requirement to archive documents. For example, a news publishing company that serves articles over the Web may want to maintain an archive of published articles, which the users can search for.
Generally
Stores documents externally, but use DB2 for management and search.
Requirement for
Documents with large text blocks (no larger than 2 GB, in which case the table column cannot accommodate the document and it has to be decomposed into more columns) which require structured searches using Text Extender.