Chapter 9 Working with Data Models


Generating an XSM from a PDM via the XML Builder Wizard

The XML Builder Wizard helps you build an XML model (XSM) that will be used to generate SQL/XML queries for retrieving data from databases. It is more powerful than the standard PDM-XSM generation, as it helps you to customize the XML hierarchy to be built, and sets up the XSM to retrieve data from relational databases supporting SQL/XML, and for generation of an annotated schema (see the Working with XML and Databases chapter in the XML Modeling guide).

Steps To generate an XSM from a PDM via the XML Builder Wizard:

  1. In your PDM, select Tools→XML Builder Wizard to open the XML Builder Wizard to the Model Selection page:


    Select whether you want to create a new XML model or update an existing XML model currently open in your workspace.
  2. Click Next to go to the Tables and Views Selection tab:


    Select the tables and views you want to generate. By default, all tables and views are selected.
  3. Click Next to go to the XML Hierarchy Design tab:


    On this tab, you construct the XML hierarchy that you want to generate:

  4. You can build your XML hierarchy using the following techniques:

  5. Click Finish to generate the XSM.


    In the case of an update to an existing XSM, your hierarchy will be created as a new root in the model.

    The SQL/XML extended model definition is automatically attached to the XML model to enable you to generate SQL/XML queries from global elements. For more information, see the Exchanging Data with Databases supporting XML chapter in the XML Modeling guide.

XML Builder Wizard tools

The following tools are available to help you build your hierarchy:

Tool Description

Properties – Opens the property sheet for the selected table, view, or column.

Add Object - Adds the selected PDM object to the XML hierarchy.

Create Default Hierarchy for Selected Objects - Adds the selected PDM objects to the XML hierarchy.

 


Copyright (C) 2008. Sybase Inc. All rights reserved.