Link to WFC Website

 Newsletter - August, 1999

 

XML Extenders for IBM DB2 UDB 

XML is one of the emerging technologies that have the potential of causing fundamental changes in whole industries. XML is becoming a standard and reliable way to exchanging structured information for B2B (business-to-business) e-commerce and for advanced information retrieval.

The conversion of existing databases to XML servers is at the heart of these changes. The introduction of the XML Extender for DB2 UDB will provide a quick and easy way to accomplish this conversion.

As another member of the DB2 Extender family, the XML Extender embeds XML functions directly into the DB2 engine. The XML Extender enables a wide range of new applications through the following functions:

  1. Store an entire XML document within a column value
  2. Extract and update within a XML document
  3. Query within a XML document
  4. Create XML documents from one or more tables
  5. Update one or more tables from a XML document

First, a XML document can be stored within a DB2 column value. A set of new UDTs (user defined types) for XML columns allows an entire XML document to be stored as a varchar, CLOB, or even a double-byte CLOB. The XML document can also use a datalink type, meaning that the XML document can reside on the local or remote file system and still be managed by DB2. Further, an embedded XML parser will validate the XML document during its initial load and subsequent updates.

Second, values within a XML document can be extracted or updated (in place) from SQL. A set of UDF (user defined functions) retrieves any portion of the XML document within an SQL SELECT statement. Likewise, an UPDATE statement against one or more Xcolumn values can update any element or attribute value within the XML document.

Third, values within a XML document can be efficiently used within a query. By declaring specific XML elements as indices, special side tables are created and automatically maintained to enable these indices. If thousands of XML documents were stored within a DB2 table, quick retrieval of specific documents would be insured. Further, the XML Extender is compatible with the Text Extender to support complex text searching.

Fourth, XML documents can be created from one or more DB2 tables. A mapping is specified from the XML structure to various DB2 tables, which can be either newly created or existing from legacy applications.

Finally, a XML document can update one or more DB2 tables, which is the reverse of the previous function.

With the support of these five functions, the XML Extender for DB2 UDB will be a major advance for implementing XML servers as extensions of legacy applications.

- Richard Hackathorn
dick@webfarming.com