Generating Other Models from an XSM

You can generate physical data models (PDMs) and other XSMs from an XSM.

  1. Select Tools, and then one of the following commands to open the appropriate Model Generation Options window:
    • Generate Physical Data Model... Ctrl+Shift+P
    • Generate XML Model... Ctrl+Shift+M
  2. On the General tab, select a radio button to generate a new or update an existing model, and complete the appropriate options.
  3. [optional] Click the Detail tab and set any appropriate options. We recommend that you select the Check model checkbox to check the model for errors and warnings before generation.
  4. [optional] Click the Target Models tab and specify the target models for any generated shortcuts.
  5. [optional] Click the Selection tab and select or deselect objects to generate.
  6. Click OK to begin generation.
    Note: For detailed information model generation, see Core Features Guide > Linking and Synchronizing Models > Generating Models and Model Objects.

The following table details how XSM objects are generated to PDM objects:

XSM PDM

Elements

Tables or columns:
  • Root elements - are generated as tables.
  • Non-root elements with complex types - are generated as tables or columns, depending on the option chosen in the Persistent groupbox on the Detail tab of the element property sheet.
  • Non-root elements with primitive or simple types - are generated as table columns.
Note: Root elements with a primitive or simple type are not generated except where they are referenced by other elements or complex types.

If you have a single root element and want to generate its immediate children as tables, select the Skip single root element option on the PDM Generation Options window Detail tab.

Simple types

Domains. The datatype of the domain depends on the derivation of the simple type:

  • simple types with a list derivation - varchar.
  • simple types with a restriction derivation - the datatype of the base type
  • simple types with a union derivation - the most permissive of the unioned types

Complex types

Merged with their parent element.

If the complex type is the restriction or extension of a simple type it will be generated as a column called Value linked to the domain generated from the simple type.

Attributes

Columns with datatypes determined by resolving any derivation. Attributes and attribute groups defined at the model level are not generated except where they are referenced.

Business rules

Business rules

Key constraints

Keys

Unique constraints

Indexes

Keyref constraints

References (if the referenced constraint is a key)

IDs (DTD)

Keys

Note: References, substitutions, imports, and includes are always resolved, and attributes and attribute groups defined at the model level are generated only where they are used. Notations, redefines, anys, and (for DTDs) entities, are not generated to PDMs. To view the mappings between your XML objects and the objects generated from them, open the Mapping Editor from the generated model (see Core Features Guide > Linking and Synchronizing Models > Object Mappings).