Database Package Templates

Instead of modeling each individual database package by hand, you can use a template and have PowerDesigner generate packages specific to each table. Database packages defined through a template are updated automatically when you make changes to the table definition, and you can quickly create packages for multiple tables from the Rebuild Table Database Packages dialog.

Database package templates are written in the PowerDesigner Generation Template Language (GTL). PowerDesigner provides a template for generating CRUD procedures, and you can create your own templates as necessary.

To define a database package from a template, simply select the template on the General tab of the database package property sheet.

Creating a Database Package Template

The available database package templates are defined in the DBMS resource file. Select Database > Edit Current Database, click the Database Package Templates tab. To create a database package template, click the Add a Row tool

Database Package Template Properties

To open a template property sheet, select it in the list and click the Properties tool.

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 DBMS version.

The following tabs are also available: