Procedure Templates (PDM)

PowerDesigner procedure templates allow you to write table procedures in a modular reusable fashion. We provide basic templates for insert, select, update, and delete procedures. You can modify the code specified in these templates or create your own templates in the DBMS definition file.

To apply a procedure template to your procedure definition, select the template from the list on the procedure property sheet Definition tab (see Procedure Properties).

To review or modify the provided procedure templates, select Database > Edit Current DBMS, and then click the Procedure Templates tab. You cannot delete or rename these templates.
Warning!  The resource files provided with PowerDesigner inside the Program Files folder cannot be modified directly. To create a copy for editing, use the New tool on the resource file list, and save it in another location. To include resource files from different locations for use in your models, use the Path tool on the resource file list.

To create a new template, click the Add a Row tool.

Procedure Template Properties

The General tab contains the following properties:

Property

Description

Name/Code/Comment

Identify the object. The name should clearly convey the object's purpose to non-technical users, while the code, which is used for generating code or scripts, may be abbreviated, and should not normally include spaces. You can optionally add a comment to provide more detailed information about the object. By default the code is generated from the name by applying the naming conventions specified in the model options. To decouple name-code synchronization, click to release the = button to the right of the Code field.

DBMS

Specifies the parent DBMS.

Function

Specifies whether the template defines procedures or functions.

Procedure Name

Specifies the conventions for naming procedures based on the template.

Linked to table

Specifies whether the resulting procedure will be linked to a table.

Keywords

Provide a way of loosely grouping objects through tagging. To enter multiple keywords, separate them with commas.

The following tabs are also available:
  • Definition - Contains a field for entering the procedure code for the template.You can use PDM variables and macros and other tools available from the toolbar (see Writing SQL Code in PowerDesigner).