Chapter 5 Managing Models
When a package begins to reach a critical size, it is useful to reorganize it into sub-packages using diagrams.
PowerDesigner lets you convert a diagram to a package using the Convert Diagram to Package wizard from the View→Diagram submenu. You can replace the existing diagram with a new sub-package in order to simplify the source diagram. This process moves the diagram and the objects it contains from its source package to a new sub-package. The diagram must contain symbols in order to display the Selecting Objects to Move page of the wizard and proceed to the convert.
When you convert a diagram to a package, object symbols of the diagram are always moved to the package. Objects themselves are either moved or replaced by a shortcut.
The linking objects that you move keep their links in the target package and a shortcut is usually created in the source package. The general rule being that conceptual modeling must be preserved.
Shortcuts creation rules in PowerDesigner also apply to moving objects between packages.
For more information on shortcut creation, see chapter Managing shortcuts.
PowerDesigner lets you select the objects of the diagram you want to convert to a package using the Selecting Objects to Move page of the wizard. Only relevant tabs are displayed. For example, if you convert to package a diagram that only contains tables and references, only the Table tab will be available, as the reference is contained in the table definition. Besides, when you deselect two objects related with an oriented link, the link is automatically deselected (for example two classes with an association link or two entities with a relation link). Just as when you deselect a non-oriented link, ending objects are automatically deselected. Also, objects that do not support shortcuts do not appear in the selection page as they are always moved with diagram.
For entities containing data items, the following situations can occur when you move the entity:
Data items | Namespace | Move result |
---|---|---|
Only used by selected entity | Move within the same namespace | The data items are moved with the entity |
Reused among different entities | Move within the same namespace | Shortcuts of data items are created for reused data items |
Used only by one entity or reused among different entities | Change namespace | Data items are copied in the other namespace |
To convert a diagram to a package:
Copyright (C) 2005. Sybase Inc. All rights reserved. |