Chapter 3 Building Physical Diagrams


Rebuilding defaults

You can generate defaults from domains and columns having default values. The Default Rebuild feature uses the default values to create default objects and attaches them to the appropriate domains and/or columns.

Note   Upgrading models
When you open a model containing domains with default values and saved in a previous version of PowerDesigner, default objects corresponding to the default values are created in the model.

Default objects are also created when you change the DBMS of a model containing domains with default values, to a DBMS that supports default objects. The opposite process occurs when you switch to a DBMS that does not support default objects: default objects are converted into default values.

Default name template

You can define a template for the generated default names. This template has the D_%.U:VALUE% value and supports the following variables:

You can define one template for domain defaults and one for column defaults.

Rebuild options

You can select the following rebuild options:

Rebuild option Details
Reuse defaults with identical value Allows you to reuse default objects with identical value among columns and domains. If you do not select this option, rebuild creates one default per object
Delete and rebuild Detaches the default objects attached to selected objects and deletes them if they are not used. If you select all objects, this option allows you to clean up the model from all existing defaults and recreate new default objects

Steps To rebuild defaults:

  1. Select Tools→Rebuild Objects→Rebuild Defaults.

    The Default Rebuild dialog box appears.
  2. Define a default name template in the Domain and Column boxes.
  3. <optional> Select the Reuse default with identical value check box if you want defaults to be reused in the model.
  4. <optional> Select the Delete and rebuild check box if you want unused defaults to be deleted before rebuild.
  5. Click the Selection tab to display the Selection page and select domains and tables for default generation.
  6. Click OK.

    The defaults are automatically created and attached to the domains and/or columns.

 


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