Script Generation

PowerDesigner can generate a SQL script from a PDM to create or modify a database. The statements that control script generation are available in the Script/Objects category.

When generating a SQL script, PowerDesigner takes each object to be created in turn, and applies the appropriate Create or other statement to create or modify the object:
For example, in Sybase ASE 15.7, the Create statement in the Table category is the following:
create table [%QUALIFIER%]%TABLE% 
(
  %TABLDEFN%
)
[%OPTIONS%]

This statement contains the parameters for creating the table together with its owner and physical options using variables (see Variables for Tables and Views) that extract the necessary information from the object's properties. The %TABLDEFN% variable collects the Add items in the Column, PKey, Key, and Reference categories, and the AddTableCheck item in the Table category.

Other statements in the object categories are used to customize the PowerDesigner interface and behavior according to database features, such as Maxlen, Permission, EnableOwner, and AllowedADT.