Shred XML Documents Using DB2 pureXML: Two Methods for XML Decomposition in DB2 for Linux, UNIX, and Windows
This paper focuses on ways to "Shred" XML data in DB2. Shredding is the process of mapping XML elements and attributes into relational tables and columns. One way to shred in DB2 is through the use of an annotated XML schema. If the XML data contains an XML schema, it is the easiest and fastest way to perform decomposition. If the mapping is significantly complex and involves multiple tables, existing tools automate both the mapping and decomposition steps. Another, perhaps less-known, method for shredding is through the use of the SQL/XML function XMLTABLE. It is useful when an XML schema does not exist. Using the XMLTABLE function can be more complex since the decomposition steps must be manually coded.