Chapter 3 DBMS Reference Guide


Exploring the Script category

The Script category contains the following entries:

Statements for generation and reverse engineering

The Script category contains Database Description Language (ddl) statements used for script and ODBC generation and script reverse engineering.

For example, the standard statement for creating an index is:

create index %INDEX%

However, statement values vary from one definition file to another in order to respect the DBMS syntax and specific features. For example in Oracle 9i, the create statement for an index contains the definition of the index owner since Oracle 9i supports index owners:

create [%UNIQUE%?%UNIQUE% :[%INDEXTYPE% ]]index [%QUALIFIER%]%INDEX% on [%CLUSTER%?cluster C_%TABLE%:[%TABLQUALIFIER%]%TABLE% (
   %CIDXLIST%
)]
[%OPTIONS%]

Among other statements you have:

Modify statements

These statements are used during a database modification to modify attributes of already existing objects. They can be easily identified because most of them start with the word "Modify". For example ModifyColumn is the statement used for modifying a column.

However, not all statements start with Modify, for example Rename or AlterTableFooter.

The statement for creating a key is also special depending on the where the key is defined: if the key is inside the table, then it will be created with a generation order, and if the key is created outside the table, it will be a modify order of the table.

Database definition items

The Script category also contains items related to the database definition. These are not statements, they are not used during generation or reverse engineering but rather for customizing the PowerDesigner interface and behavior according to database features.

For example, item Maxlen in the table category, has to be set according to the maximum code length tolerated for a table in the current database.

Permission, EnableOwner, AllowedADT are other examples of items defined to adapt PowerDesigner to the current DBMS.

ODBC reverse engineering queries

Most ODBC reverse engineering queries start with "Sql" which is an easy way to identify them. For example, SqlListQuery is the query used to retrieve a list of objects, or SqlOptsQuery is the query used to reverse engineer physical options.

For more information on ODBC reverse engineering queries see section "ODBC reverse engineering".

 


Copyright (C) 2005. Sybase Inc. All rights reserved.