7
Partially adapted from… PowerDesigner Tips and Tricks Adapted from PowerDesigner Advanced Tips and Technique, a TechWave 2001 session by Jay Stevens, Manager, Worldwide Product Support, Design Tools Tips and Tricks with PowerDesigner Diagrams PowerDesigner introduced a new concept in Version 7 to help you manage projects involving large models and/or team design efforts – Diagrams, Packages and Shortcuts. Diagrams allow you to create multiple views of our model without affecting the underlying metadata. There are some nice advantages of this feature that go beyond subdividing the view into subject-areas. For example: Diagrams as an alternate view: Diagrams can help you prepare and maintain separate views of the same model information, like a high level view vs. a detailed view. Simply create two diagrams in the same package, one to display the objects without attributes or identifiers and another that can display them with both. In this way, you can easily create multiple views of differing detail or complexity, like one view for the end user, one view for DBA or developer and one view for management Diagrams as an alternate notation: Another interesting use of the diagram concept is to create two different views of the Physical Data Model – one using the Relational notation, and a second one using the Conceptual (Entity/Relationship or Crows-feet notation). This way, your audience can see the same information, but in the notation they prefer, without having to maintain two different sets of metadata. Reports can include both diagrams making it easy to publish both a standard view and a conceptual view of the physical model. Tips and Tricks with PowerDesigner Packages PowerDesigner’s Packages give you the ability to sub-divide the model into more manageable, more secure subject areas or units of work. These divisions come with the concept of ownership, and allow you to contain an object’s definition to one particular area, or package. There are some other advantages to this feature: Using Packages for object selection PowerDesigner can take the contents of a single package and use it as the input to the code and model generation systems, to the report writer, as well as for use in the consolidation and extraction process to the repository. This makes it easy for you to

Power Designer Tips Tricks

Embed Size (px)

DESCRIPTION

Trucos para el Power Designer

Citation preview

Page 1: Power Designer Tips Tricks

Partially adapted from…

PowerDesigner Tips and Tricks Adapted from PowerDesigner Advanced Tips and Technique, a TechWave 2001 session by Jay Stevens, Manager, Worldwide Product Support, Design Tools

Tips and Tricks with PowerDesigner Diagrams

PowerDesigner introduced a new concept in Version 7 to help you manage projects involving large models and/or team design efforts – Diagrams, Packages and Shortcuts. Diagrams allow you to create multiple views of our model without affecting the underlying metadata. There are some nice advantages of this feature that go beyond subdividing the view into subject-areas. For example:

Diagrams as an alternate view:

Diagrams can help you prepare and maintain separate views of the same model information, like a high level view vs. a detailed view. Simply create two diagrams in the same package, one to display the objects without attributes or identifiers and another that can display them with both. In this way, you can easily create multiple views of differing detail or complexity, like one view for the end user, one view for DBA or developer and one view for management

Diagrams as an alternate notation:

Another interesting use of the diagram concept is to create two different views of the Physical Data Model – one using the Relational notation, and a second one using the Conceptual (Entity/Relationship or Crows-feet notation). This way, your audience can see the same information, but in the notation they prefer, without having to maintain two different sets of metadata. Reports can include both diagrams making it easy to publish both a standard view and a conceptual view of the physical model.

Tips and Tricks with PowerDesigner Packages

PowerDesigner’s Packages give you the ability to sub-divide the model into more manageable, more secure subject areas or units of work. These divisions come with the concept of ownership, and allow you to contain an object’s definition to one particular area, or package. There are some other advantages to this feature:

Using Packages for object selection

PowerDesigner can take the contents of a single package and use it as the input to the code and model generation systems, to the report writer, as well as for use in the consolidation and extraction process to the repository. This makes it easy for you to

Page 2: Power Designer Tips Tricks

process only one portion of the model at a time. If you want to create a report on some of the objects in your model, you can contain those objects to a single package, and create a report based only on the package. You can, of course, select multiple packages at once, but still have the benefit of easily reducing the amount of work being done by PowerDesigner.

Multiple levels of sub-division

PowerDesigner does not stop at one level of Packages. You may easily add packages within packages and create a hierarchy as deep as you need it. This is second nature to Java developers, the concept comes directly from the UML idea of packages, but for folks in the data modeling world, this is a nice improvement from the traditional, one-level deep subject area mechanisms you’ve had in the past.

Permissions in the repository

As you have seen in past issues of Blueprint, PowerDesigner has an excellent Enterprise-class repository for you to manage your models, and design as part of a team. You have also seen that PowerDesigner’s repository allows you to set permissions on packages, and use this to help prevent users from affecting controlled work being done by other users or teams.

However, there are cases where PowerDesigner will allow a change made in an authorized package to change contents in an unauthorized package, to ensure model integrity. If this happens, do not be alarmed, it is expected. One classic example of this feature is when you delete an object: if you delete an object that is referenced by other packages as a shortcut, you not only delete the source object (this is allowed since it is contained in the authorized package), but you also delete the shortcuts from all other packages (even if you are not authorized to read/write those packages) since without the object, the shortcuts have no meaning.

Object and Database Support Editor

PowerDesigner has the capability to have anyone customize the database support or the object language generators. This seems simple enough, but there are many elements to this work. To make things a little easier, here are some definitions to help you focus your efforts to customize PowerDesigner:

Main sections of the Editor:

• For All:

• General - Identification and major flags

• Extended Attributes - allows extension of PowerDesigner metadata, sometimes used for special database or object language support

• For Database Support

• Script

Page 3: Power Designer Tips Tricks

• SQL - Major SQL behavior

• Objects - Details for each type of object

• Datatype - Datatype conversion tables

• ODBC - Same structure as Script, used if ODBC requires different commands

• Object Language support

• Sctipt

• Constants - Define standard constants allowed

• Datatypes - Define mapping to PowerDesigner datatypes

• Events - Define standard events, i.e. constructor

• Namings - Define default names for generated operations

• Objects - Details for each type of object

• Stereotypes - Allows the extension of standard UML objects to be more specific

Merge screen is used for everything

As documented in the September Blueprint, the compare/merge technology is what helps you create models that are truly different representations, different views, of the same system. You can be certain the object and data models that you create in PowerDesigner are representing the same solution to the business problems outlined in the OO or data analysis you’ve performed. However, there is yet another place you can use this technology that is not directly related to modeling, but is related to extending the capabilities of PowerDesigner itself.

Compare and Merge for definition files

If you have changed any existing object language or database definition, you may need to compare back to the original file to see what you have changed. When PowerDesigner’s new versions are released, Sybase makes changes to the shipped versions and you may need to use this feature to migrate all or selected changes made to an older version of the definition into the new, improved Sybase version. Some of the changes you made may have been to add a capability not yet supported by Sybase, but is now obsolete because Sybase has officially added support – so the migration of your edits needs to be user-selectable. You can select the compare/merge facility from the Compare button in the Resource List window (Figure 1).

Page 4: Power Designer Tips Tricks

Figure 1 - The Compare Button

Drilling into the details in the Compare/Merge tool

If you are viewing large properties (like the code in the Implementation field, for example) it is often difficult to see the differences between the target and the source. To overcome this, simply double click the property. This will display a new window, which will display all the differences between the two objects for that specific detail. Looking at the implementation code detail, the difference appears in a new window as a “diff” report. (Figure 2).

Page 5: Power Designer Tips Tricks

Figure 2 - The "Diff" report for a method body change

This feature is especially useful for descriptions, annotations, triggers, stored procedures, language implementation fields, etc. where there is a large body of text or code to compare.

List tips

In PowerDesigner, you will find yourself opening many different lists, lists of tables, lists of classes, lists of attributes, etc. Here are some nice features you can take advantage of to make using Lists a but easier:

Customize Columns and Filters button in toolbar - add or remove displayed columns

PowerDesigner has many different ways you can filter the contents of the list. If you select the “Customize Columns and Filters” button on any list window (Figure 3) you may change what is included in the list view, as well as apply expressions to any field to narrow the list to a selected set of values.

Page 6: Power Designer Tips Tricks

Figure 3 - The Customize Columns and Filter button

Multi-select to make same change to many objects

PowerDesigner allows you to use standard Windows multi-select techniques (Shift-Click to multi-select a range, CTRL-Click to multi-select individual items one at a time until all the desired items are selected together) and make a change to all these items simultaneously. For example, you can multi-select in a list of PDM references and change the first one in the selected list from Declarative to Trigger, and all other selected references will also change with it.

Quick Navigation

PowerDesigner lists can be quickly “scrolled” by the following hot-keys:

• Ctrl-Up - First line in list

• Ctrl - Down - Last line in list

• Ctrl - Left - First column on row

• Ctrl - Right - Last column on row

Mouse-less Property Sheet Navigation

You may use the following key combinations to navigate property sheets within PowerDesigner without using a mouse. This can be a great time saver when performing multiple edits within one model, or examining the properties of many different objects in a short period of time.

Page 7: Power Designer Tips Tricks

• Ctrl - Tab - Next tab page

• Ctrl-Shift-Tab - Previous tab page

• Ctrl-PgUp - Next sub tab, Notes Description or Annotations, text area must have focus

• Ctrl-PgDn - Previous sub tab