Generating a DAD file for IBM DB2
XSM User's Guide
Chapter 5
Exchanging data with databases supporting XML
IBM DB2 v8.1 (or higher) is a database server with an add-in for XML
storage and retrieval called IBM DB2 Extender. XML data (elements,
attributes) are mapped to relational data (tables, columns) through Document
Access Definition files (.DAD).
There are three types of DAD files:
Type of storage
Type of mapping
Xcolumn
column
Xcollection
SQL
Xcollection
RDB
An XML model targeted with DTD allows you to generate DAD files for
IBM DB2. You need first to map an XML model to a PDM, then to attach
the IBM DB2 DAD extended model definition to the mapped XML model,
and finally (optional) to define extended attributes for global elements.
Extended attributes specify the type of DAD file generated for each global
element. The DAD file is generated with the DTD file and a SQL file for
stored procedures.
Caution
The following procedure assumes you have a PDM open in the workspace
and targeted with IBM DB2 UDB 8.x Common Server as DBMS.
If the PDM is not targeted with the proper DBMS, select
Database Change Current DBMS.
To generate a DAD file for IBM DB2:
1
In the PDM menu bar, select Tools XML Builder Wizard.
Description
The Root element is mapped to a
table, and its attributes or child
elements are mapped to columns
identified by an XPath
The DAD file starts with a SQL
statement for the table mapped to
the Root element, and each child
element or attribute is mapped to a
column or a table name
A Relational Database node, with a
table and a column name, is
associated with each attribute or
child element of the Root element
237
Need help?
Do you have a question about the PowerDesigner XML and is the answer not in the manual?