Chapter 3 Building Physical Diagrams


Rebuilding primary keys

Rebuilding primary keys in a physical diagram updates primary keys for tables.

Rebuilding primary keys is useful following the reverse engineering of a database in which all of the primary keys could not be reverse engineered, or if you did not select the rebuild option for primary keys when you reverse engineered the database. The rebuild option for primary keys creates primary keys for tables that have no key and a single unique index.

You can choose to rebuild all primary keys in your model, or select the tables for which you want to rebuild the primary keys.

Steps To rebuild primary keys:

  1. Select Tools→Rebuild Objects→Rebuild Primary Keys to display the Rebuild Primary Keys dialog box.

    It lists all the tables in the current model.


    Note   Rebuilding primary keys in a package
    To rebuild the primary keys in package, select the package from the dropdown listbox at the top of the page.To rebuild the primary keys in a sub-package, select the Include Sub-Packages icon next to the dropdown listbox, and then select a sub-package from the dropdown list.

  2. Select the tables containing the primary keys that you want to rebuild.

    Note   Selecting or clearing all check boxes
    You can select all check boxes, or clear all check boxes, by selecting the Select All tool, or Clear All tool, from the toolbar at the top of the page.

  3. Click OK.

 


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