PL/SQL Developer 7.1 User`s Guide

Add to My manuals
222 Pages

advertisement

PL/SQL Developer 7.1 User`s Guide | Manualzz

PL/SQL Developer 7.1 User’s Guide 69

9. Diagrams

The Diagram Window allows you to create a graphical representation of a selection of objects. This way you can easily visualize (a part of) the database objects of your application or project and their relations:

You can add all relevant object types to a diagram, and include the relations between them. Foreign key relations between tables are automatically included. For large diagrams you can add additional structure by including object groups.

A diagram can be used for documentation purposes, but can also serve as a workspace. Right-clicking on an object provides access to all object functions, and double-clicking on an object will invoke the default action for the object type.

9.1 Creating a diagram

To create a new diagram, select the Diagram Window from the New submenu in the File menu. An empty Diagram Window will appear. To add a database object to the diagram, drag it from the Object

Browser into the Diagram Window. You can drag & drop multiple objects at once.

To move a diagram object, click on the title bar and drag it to the new location. To resize a diagram object you can drag an edge or a corner. To delete an object from the diagram, press on the X at the upper-right of the object. This will only affect the diagram, and the database object will not be dropped.

Showing and hiding items

To show or hide a specific item of a diagram object, right-click on it and go to the Items submenu. Here you will see a submenu with all items that are applicable for the selected object. For a table you can select which items of a column, key or index you want to show. You can also hide the complete key or index section.

By default all items will be displayed, but if you right-click on an object and select Set as default, the visible items will apply to all objects added to a diagram in the future. You can do this for all object types.

70 PL/SQL Developer 7.1 User’s Guide

Adding relations

To add a relation between 2 objects, click on the icon of an element of the source object, and drag it to the element of the target object. A line will be drawn between the 2 elements of the objects. You can move the line to another element by selecting the line and moving the selection point up or down. To remove a line, select it and press the Delete key.

If you add a table to a diagram, foreign key relations with other tables on the diagram will automatically be included. These relations can be deleted if necessary.

By default relations will be drawn as straight lines. You can add additional bends by right-clicking on a line and selecting Insert bend from the popup menu. You can also hold down the Ctrl key while clicking on a line to insert a bend. A new selection point is added to the line as a result.

To create a one-to-many relation, right-click on the end of the line and select Change line end from the popup menu.

Adding groups

To add additional structure to a large diagram, you can create object groups. Groups can have distinctive colors, and can have a title at the upper or lower left or right:

To add a group, right click at an empty position on the diagram and select Add group from the popup menu. A new group will appear at this location, which you can resize to appropriate dimensions. All objects that are completely covered by the group will implicitly be part of that group, and moving the group will also move these enclosed objects. If you hold down the Ctrl key while moving a group, the enclosed objects will not be moved.

PL/SQL Developer 7.1 User’s Guide

To change the appearance of a group, right-click on it and select the Properties item from the popup menu. You can also double-click on the group. The following screen will appear:

71

You can change the font, fill color, line color and line size of the group, and make the group transparent.

You can optionally enter the title of the group, and specify the location of the title.

To create a default group appearance, right-click on it and select Set as default. This will apply to all groups added to a diagram in the future.

To delete a group from the diagram, select it and press the Delete key. This will only delete the group, and not the enclosed objects.

9.2 Saving and opening a diagram file

To save a diagram to a file, select the Save item from the File menu. A diagram will be saved in a file with a .pdd extension, which can be reopened later. To define a standard location for diagram files, go to the Directories preference page and set the corresponding option.

9.3 Updating a diagram

A diagram is a static representation of the database. If database objects change over time, you will need to update the diagram to reflect these changes. To do so, right-click on a diagram object and select

Update from DB from the popup menu. To update all objects on the diagram, right-click on it and select

Update All from DB.

If an object is dropped from the database, you will also need to delete it from the diagram. If an object is renamed in the database, you will need to delete the diagram object and add it with the new name.

advertisement

Related manuals

advertisement

Table of contents