Customizing Data Type Mappings

When generating another PDM from your PDM, PowerDesigner maps the existing column datatypes to appropriate data types in the new model. If the standard mappings are not sufficient for you, you can use the Enhance Data Type Mapping extension to specify alternative mappings, including on a column-by-column basis.

To review the conversions that PowerDesigner makes by default between the data types of a database or other modeling target and its standard conceptual types (which are also used in the CDM), select Tools > Resources > Type, select the appropriate file in the list and click the Properties tool. Expand the Script > DataType (for DBMSs) or Settings > DataType (for other resource files), and review each of the entries (which are described in their Comment field):

  1. Select Tools > Generate Physical Data Model, enter the appropriate generation options (see Core Features Guide > Linking and Synchronizing Models > Generating Models and Model Objects).
  2. On the Detail tab, click the Enable Transformations button to display the Extensions tab, and select the Enhance Data Type Mapping extension.
  3. Click OK to start the generation. The Data Type Mappings dialog appears, with the existing data types present in the model listed in the Original type column, and those that PowerDesigner proposes in the new DBMS in the Target data type column:

    Custom Data Type Mappings
  4. You can change data type mappings in two ways:
    • To change the mapping for all columns of a certain data type, select the desired new data type from the list in the Target data type column.
    • To change the mapping for one column only, click the Add Specific Column Mapping button, select the column from the tree, click OK, choose the new data type for the column, and click OK to add this mapping to the list.
  5. When you have modified all the necessary data types, click Close and the generation will continue, using your custom mappings where appropriate.
    Note: You can also customize data type mappings when changing the DBMS of your model with the Database > Change Current DBMS command. To do so, you must first attach the Enhance Data Type Mapping extension, by selecting Model > Extensions, clicking the Attach an Extension tool, select the extension, and clicking OK to attach it to your model.

    For more information about data types, see Customizing and Extending PowerDesigner > DBMS Definition Files > Script/Data Type Category and Customizing and Extending PowerDesigner > Object, Process, and XML Language Definition Files > Settings Category: Object Language.