Chapter 4 Building Physical Diagrams


Denormalizing columns

You can denormalize columns to eliminate frequent joins using column denormalization.

Example


In this example, you want to have the division name printed on the pay slip of each employee, however, you do not want to create a join between those tables. You can denormalize columns in order to have column Div_Name in table PaySlip:


Column denormalization eliminates joins for many queries, however it requires more maintenance and disk space.

Column Denormalization Wizard

The Column Denormalization Wizard lets you duplicate columns in a selected table. The result is a replica of the original column in the target table.

For more information about object replicas, see the Shortcuts and Object Replications chapter in the Core Features Guide .

Steps To denormalize a column with the Column Denormalization Wizard:

  1. Select Tools→Denormalization→Column Denormalization, or right-click a table and select Column Denormalization from the contextual menu, in order to open the Column Denormalization Wizard:
  2. Select the table in which you want the denormalized columns to be added, and then click Next to go to the Column Selection page.
  3. The Column Selection page allows you to select the columns to replicate. Select one or more columns to replicate, and then click Finish.

    A replication is created for each selected column. You can display the list of replicas from the menu command Model→Replications. Each replica has its own property sheet. For more information about object replicas, see the Shortcuts and Object Replications chapter in the Core Features Guide .

Removing a denormalized column

You can move and paste a denormalized column into another model or package in the standard way.

Reverting a denormalized column

You can revert a column denormalization by deleting the duplicated column from the target table property sheet. This automatically removes the column replica. Note that you cannot revert a column denormalization by deleting a column replica from the list of replications.

 


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