Generating SQL/XML Queries

SQL/XML is an XML extension of the Structured Query Language, which allows you to retrieve relational data using extended SQL syntax, and produce an XML result. SQL/XML has five main elements:

The main SQL/XML functions are the following:


An XML model allows you to generate SQL/XML queries for global elements, whatever the targeted XML language (XSD, DTD or XDR). You need first to map an XML model to a PDM, then to attach the SQL/XML extended model definition to the mapped XML model.

The best way to map an XML model to a PDM is to use the XML Builder Wizard from a PDM. The generated XML model is automatically mapped to the PDM and linked with the SQL/XML extended model definition. If need be, you can still modify the mapping through the Mapping tab of elements and complex types property sheets.

For more information on the XML Builder Wizard, see Generating an XML model via the XML Builder Wizard, in the Working with Data Models chapter of the Data Modeling guide.

Generated SQL/XML queries cannot be parameterized.

Warning!  

The following procedure assumes you have an XML model open in the workspace and mapped to a PDM.