Database Generation Dialog Options Tab

The Options tab allows you to specify what script elements to generate for each object type.

By default, there is an entry in the left-hand pane under the meta-category "All Objects" for each object type present in your model, and all the possible options are displayed in the right-hand pane. If you click on an object type in the left-hand pane, then the options are restricted to that object type.



Depending on the objects present in your model, some or all of the following options will be available.

Parameter

Description

Create <object>

Generates the object.

When generating primary, alternate, or foreign keys or indexes, you can choose between:

  • Inside Table – keys or indexes are generated during table creation

  • Outside - keys or indexes are generated with a separate SQL command, generally using an ALTER command after the creation of the table

The generation of keys or indexes outside the table is possible only if the Create entry exists in the Pkey, Key, Reference, and/or Index categories of your DBMS.

Drop <object>

Deletes an existing object, before recreating it.

Note that when generating defaults, if the Create and Drop check boxes are selected, the default objects will be created/dropped before domains and tables. For more information on the default generation statement, see Customizing and Extending PowerDesigner > DBMS Definition Files.

Begin script

Inserts a customized script before creation of the object.

End script

Inserts a customized script after creation of the object.

Physical options

Generates physical options for the object.

Comment

Generates a comment for the object.

Privilege

[users, groups, and roles] Generates privileges for the user, group, or role.

Permission

Generates the permission statement for a given user during creation of the object.

Check

[domains, tables, and columns] Generates check parameters and validation rules for domains, tables, and columns.

For table and columns, if this option is selected you can choose between:

  • Inside Table - checks are generated during table creation

  • Outside - checks are generated with a separate SQL command, generally using an ALTER command after the creation of the table

The generation of checks outside the table is possible only if the AddTableCheck entry exists in the Table category of your DBMS.

Open database

[databases] Opens the database.

Close database

[databases] Closes the database.

Default value

[domains and columns] Specifies a default value for the domain or column.

Install JAVA class

[abstract data types] Installs a Java class, which is stored on a server.

Remove JAVA class

[abstract data types] Deletes an existing Java class, before installing a new Java class.

User-defined type

[columns] Generates a user-defined data type for the column.

Decl. Integrity

[foreign keys] Generates declarative referential integrity for references specified to be Declarative in their property sheets. You can specify any or all of the following:

  • Update constraint restrict

  • Update constraint cascade

  • Update constraint set null

  • Update constraint set default

  • Delete constraint restrict

  • Delete constraint cascade

  • Delete constraint set null

  • Delete constraint set default

Index Filter

[indexes] You can specify from none to all of:

  • Primary key - Generates primary key indexes

  • Foreign key - Generates foreign key indexes

  • Alternate key - Generates alternate key indexes

  • Cluster - Generates cluster indexes

  • Others - Generates indexes for all key columns with a defined index

Trigger Filter

[triggers] You can specify the creation of triggers:

  • For insert

  • For update

  • For delete

Synonym Filter

[synonyms] You can specify from none to all of:

  • Table - Generates table synonyms

  • View - Generates view synonyms

  • Procedure - Generates procedure synonyms

  • Synonym - Generates synonym synonyms

  • Database Package - Generates database package synonyms

  • Sequence - Generates sequence synonyms

Force column list

[views] Generates a view with a list of columns, even if this list is identical to the corresponding columns in the SQL order. Allows you to generate the list of view columns with the view creation order. By default, the list of view columns is generated only if it is different from the list of columns of the view query. For example, in the following view query:

select a, b from Table1

columns a and b are view columns by default. The default generation statement is:

create view V1 as select a, b from Table1

If you select the Force column list option, the generation statement will become:

create view V1(a,b) as select a, b from Table1

You can save your option settings via the Settings set bar at the bottom of the tab. For more information, see Quick Launch Selection and Settings Sets.