Working with Document Access Definitions
by Dinesh[ Edit ] 2012-07-23 12:08:45
Working with Document Access Definitions (DAD)
XML Extender uses Document Access Definition (DAD) documents to map XML elements and attributes to DB2 tables. DADs are used to translate selected XML document data to “side tables,” which are tables that contain elements and attributes as table columns.
Despite the name, side tables are not something you can find at IKEA (For those of you who may have noticed—yes, we used the same joke in the SQL Server chapter—relational data jokes are hard to come by, we have to reuse them when we can!). Side tables are relation tables that are mapped to XML documents. They are used to index XML data for fast searches without all of the XML document clutter. DADs can also be used to translate data from XML documents to relational tables, and vice versa. There are three types of DADs: XML column, XML collection SQL mapping, and SQL collection RDB node mapping. SQL column DADs are used to map an XML document column to side tables.
XML collection SQL mapping is used to map an SQL query statement to XML document output. SQL mapping is used for queries only, not updates or inserts. XML collection RDB node mapping is used to map XML documents elements, attributes, and text nodes to column data in relational tables. RDB node mapping provides a little more information than SQL collection mapping.
It uses the additional information to handle both SQL queries and relational data updates and inserts.