Select the Schema Generation Options

You can choose to include all the objects in your model in the schema, or only a few selected objects. You can also choose how you want to generate the objects.

Follow these steps:

  1. Select the main subject area or a specific subject area for which you want to generate the schema.
  2. Click Forward Engineer Schema Generation on the Database toolbar, or click Actions, Forward Engineer, Schema.

    The Forward Engineer Schema Generation dialog appears.

  3. To select the schema generation options for tables, follow these steps:
  4. Select Table, Create, and then select the following check boxes:
    Table

    Includes a Create Table statement for each selected table in the generated schema.

    Table Validation

    Includes the validation rules that are associated with tables as table-level check constraints. Select Create to include the constraints in the CREATE TABLE statement. Or, select Alter to include the constraints in the ALTER TABLE statement.

  5. To select the schema generation options for columns, select Column and select the following options:
    Validation

    Includes the validation rules that are associated with columns as column-level check constraints. Select Create to include the constraints in the CREATE TABLE statement. Or, select Alter to include the constraints in the ALTER TABLE statement.

    Physical Order

    Preserves the physical order of the columns in the generated schema. If you clear this check box, the ordinary column order is used in the generated schema. The column order is used to establish the Primary Keys, Alter statements, and so on, in the generated schema even if you select Physical Order in the Column Options.

    Default

    Includes the default value statements that are defined for the columns.

  6. To select the schema generation for Indexes, select Index, Create Index, Table Index, and then select the following check boxes:
    Primary Key (PK)

    Creates an index on the primary key that you have defined for each table.

    Alternate Key (AK)

    Creates an index on the alternate key that you have defined for each table.

    Foreign Key (FK)

    Creates an index on the foreign key that you have defined for each table.

    Inversion Entry (IE)

    Creates an index on the inversion entry that you have defined for each table.

  7. To select the schema generation for Referential Integrities, select Referential Integrity and then select the following check boxes:
    CREATE/PK

    Includes a primary key clause in a CREATE TABLE statement.

    ALTER/PK

    Includes the PRIMARY KEY clause in an ALTER TABLE statement.

    Foreign Key

    Creates a referential integrity on the foreign keys that are defined for a table. Select the type of referential integrity that you want to create:

    ON DELETE

    Enforces the selected referential integrity option, if the value is deleted in either a primary or foreign key field.

    ON UPDATE

    Enforces the selected referential integrity option, if the value is updated in either a primary or foreign key field.

    CREATE/FK

    Include a FOREIGN key clause in a CREATE TABLE statement.

    ALTER/FK

    Include the FOREIGN KEY clause in an ALTER TABLE statement.

    UNIQUE (AK)

    Enforces the rule requiring that alternate key values must be unique.

    Owner Override

    Override the owner name that is indicated either in the Tables dialog, or in the Model Properties dialog, Defaults tab. When you click the Override Owner option, a new dialog opens. Indicate the owner name that must be overridden. When you generate the schema during forward engineering, this name overrides other owner names that you previously indicated.

  8. Click Generate to start the schema generation process for forward engineering, or alter script generation or OK to save the changes and close the dialog.

    Note: When you generate a schema on the server, changes to table properties, such as table name, columns, or relationships, are updated on the server only after you select the DROP TABLE and CREATE TABLE options.