Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
36
Добавлен:
16.04.2013
Размер:
3.34 Mб
Скачать

C H A P T E R 7

0DQDJLQJ 2EMHFWV

About this chapter

Contents

This chapter explains how to manage objects in PowerDesigner.

7RSLF

3DJH

Defining objects

176

Dragging and dropping objects

198

Copying objects

200

Pasting objects

201

Creating a graphical synonym for an object

205

Moving objects from package to package

207

Finding objects

210

Analyzing object dependencies

220

Deleting objects

221

Using file objects

226

Working with extended model definitions

236

Accessing objects using VBScript

244

General Features Guide

 

'HILQLQJ REMHFWV

'HILQLQJ REMHFWV

Objects are modeling items that can be identified by their properties.

Objects can be of very heterogeneous types: tables, data items, generalizations or packages are PowerDesigner objects.

Some PowerDesigner objects have a graphical representation called V\PERO. Objects appear as nodes in the Browser tree view and their symbols can be displayed in the diagram window.

Some PowerDesigner objects are JOREDO to the model, for example organization units or resources. Therefore you cannot create internal shortcuts for these objects, only external shortcuts are allowed.

For more information on internal and external shortcuts, see chapter Managing Shortcuts.

You define an object with properties that appear in a property sheet. Most

PowerDesigner objects have the following default properties:

Name

Code

Comment

By putting significant information in the property fields, you make it possible to identify objects and their role in the model.

2EMHFW QDPHV

Names are like titles, during the design process, they clearly identify objects.

By default object names have 254 characters maximum and can include uppercase, lowercase, and mixed case strings.

You define the names of objects on property sheets and lists.

2EMHFW FRGHV

Codes are references for objects. The code appears in scripts that result from the design process and feed the physical structure of a database.

By default, all codes have 254 characters maximum and can include uppercase, lowercase, and mixed case strings.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

You define the codes of objects on property sheets and lists.

2EMHFW FRPPHQW

A comment describes an object. It provides more information than the name.

For example "Organizing projects, employees, budgets" describes the model

Project Management.

Comments are optional.

You define the comments of objects on property sheets and lists.

'LVSOD\LQJ REMHFW SURSHUWLHV

Objects have properties displayed on different tabs in their property sheets.

All objects share the following general properties:

3URSHUW\

'HVFULSWLRQ

/HQJWK

Name

The name identifies the object during the design

254

 

process

 

Code

The code is the reference names for the object

 

254

Comment

A comment is an optional label that describes an

 

object and provides more information than the name.

 

 

 

 

The property sheet displays tabs for other properties:

1RWHV are made up of 'HVFULSWLRQV to provide detailed information about the object, and $QQRWDWLRQV to contain your own notes regarding the implementation of the object

5XOHV that your business follows. A business rule could be a government-imposed law, a customer requirement, or an internal guideline

9HUVLRQ ,QIR provides details about the object owner, creation, and modification date

'HSHQGHQFLHV list all objects depending on the current object

([WHQGHG GHSHQGHQFLHV list all influent objects which collaborate with the current object

General Features Guide

 

'HILQLQJ REMHFWV

2EMHFWV DQG 6\PEROV

Objects appear in the Browser tree view. What you can see in the diagram windows are instances of objects called V\PEROV.

ϖ7R GLVSOD\ WKH REMHFW SURSHUWLHV

1Double-click the object symbol in the diagram window.

RU

Right-click the object symbol in the diagram window.

RU

Right-click the object node in the Browser tree view.

2Select Properties from the contextual menu. The object property sheet appears.

,GHQWLI\LQJ REMHFWV

In PowerDesigner, objects have identifying properties. Identifying properties are used to control object uniqueness in the model or package namespace.

The namespace defines an area in which the name and the code of an object of a given type must be unique.

For more information on the management of namespace, see section Managing the namespace in models in chapter Managing Models.

In PowerDesigner, each package is by default a namespace. It is however possible to expand the namespace to the parent of a given package. You can cascade the expansion until you reach the level of the model itself.

Objects that appear in the Browser tree view, obey to the general rules that follow:

,Q %URZVHU WUHH YLHZ

1DPHVSDFH

8QLTXHQHVV UXOH

Objects directly under a

Model

Unique name and code

package or a model node

 

in model

(table, process, class)

 

 

 

Package

Unique name and code

 

 

 

in package

Objects under parent

Not applicable

Unique name and code

object (column, attribute)

 

in parent

 

 

 

 

PowerDesigner

 

 

 

 

&KDSWHU 0DQDJLQJ 2EMHFWV

 

 

 

 

 

 

 

 

,Q %URZVHU WUHH YLHZ

 

1DPHVSDFH

 

8QLTXHQHVV UXOH

 

 

 

 

 

Linking objects

 

Not applicable

 

Unique name and code

 

(reference, relationship)

 

 

 

between same end

 

 

 

 

 

objects (i.e., parallel

 

 

 

 

 

links with same name

 

 

 

 

 

and code are not

 

 

 

 

 

allowed between same

 

 

 

 

 

end objects)

 

 

 

 

 

 

 

However, you may encounter some exceptions to those rules. For example only the code of a reference allows to identify the object in the entire model, when the "Unique code" option is selected in the Model Options dialog box. PowerDesigner warns you when a general rule is not respected.

For more information on the Unique code option, see the corresponding section in the appropriate User’s Guide.

&UHDWLQJ DQ REMHFW

You can create objects in a model or in a package in three different ways:

Graphically, in the diagram window

From the Browser tree view

From an object list

&UHDWLQJ DQ REMHFW JUDSKLFDOO\

You can create objects from the diagram window using the tools available in the Palette.

ϖ7R FUHDWH DQ REMHFW JUDSKLFDOO\

1 Click an object creation tool in the Palette.

2 Click an empty space in the diagram.

The symbol of the newly created object appears in the diagram window.

The corresponding node also appears in the Browser tree view.

3Right-click the mouse button in order to release the tool.

4Double-click the symbol of the newly created object in the diagram window to display the object property sheet.

5Type an object name and an object code.

General Features Guide

 

'HILQLQJ REMHFWV

6 Click OK.

&UHDWLQJ D OLQN REMHFW JUDSKLFDOO\

You can create link objects from the diagram window using the tools available in the Palette. When you create link objects from the diagram window, you drag the link object from its source object to its destination object.

ϖ7R FUHDWH D OLQN REMHFW JUDSKLFDOO\

1 Click a link object creation tool in the Palette.

2 Click inside the source object and while continuing to hold down the mouse button, drag the cursor to the destination objects. Release the mouse button.

A link object symbol appears between the two source and destination objects.

3Double-click the new link object symbol in the diagram to display the link object property sheet. It displays the definition of the selected link object.

4Type a link object name and code.

5Click OK.

&UHDWLQJ DQ REMHFW IURP WKH %URZVHU WUHH YLHZ

You can create objects from the Browser tree view. Link objects can be created from the Browser only if you have previously defined source and destination objects in your diagram.

ϖ7R FUHDWH DQ REMHFW IURP WKH %URZVHU WUHH YLHZ

1Right-click a model, package or an object category in the Browser tree view.

2Select NewREMHFW W\SH from the contextual menu. The object property sheet appears.

3Type an object name and an object code.

4(For link objects only), select a source and a destination object.

5Click OK.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

The object node appears under its corresponding category in the Browser tree view.

$VVRFLDWHG V\PERO LQ GLDJUDP

By default, when you create an object from the Browser, it does not have a symbol. You can create a symbol for the newly created object by pressing the SHIFT key and dragging and dropping the node into the diagram window.

&UHDWLQJ DQ REMHFW LQ DQ REMHFW OLVW

You can create an object in a list of objects. Link objects can be created in a list of objects only if you have previously defined source and destination objects in your diagram. In PowerDesigner, the lists show objects of the same type belonging to the current package or model.

ϖ7R FUHDWH DQ REMHFW LQ D OLVW RI REMHFWV

1 Select ModelREMHFW OLVW to open the corresponding list.

2Click the Add a Row tool.

RU

Click the Insert a row tool, if the list is ordered.

A new item is added at the end of the list or before the selected row in the list, with a default name you can modify.

3Type an object name and an object code.

4(For link objects only), select a source and a destination object.

5Click OK.

$VVRFLDWHG V\PERO LQ GLDJUDP

By default, when you create an object in a list of objects, the symbol of the newly created object appears in the current diagram.

For more details about the lists in PowerDesigner, see section Using Lists in chapter Using the PowerDesigner Interface.

$WWDFKLQJ QRWHV WR DQ REMHFW

In object modeling, it can be very useful to document objects, especially when you share information.

General Features Guide

 

'HILQLQJ REMHFWV

The Notes tab is composed of the Description page and the Annotation page.

Both open in an RTF editor, which retains full original format.

From the Notes tab of the object property sheet, you can:

Attach a description or an annotation to an object

Define font, paragraph and tab spacing format for notes

Edit notes with an external editor

Insert the content of a text or RTF file in the RTF editor to use it as a standard

You can use the following tools and accelerators from the RTF editor toolbar:

 

7RRO

'HVFULSWLRQ

$FFHOHUDWRU

 

 

 

Open Editor Contextual Menu

SHIFT + F11

 

 

Edit With. Opens the default editor you

CTRL + E

 

 

 

 

previously defined or allows you to select

 

 

 

 

another editor if you click the down arrow

 

 

 

 

beside this tool

 

 

Description

 

 

 

Descriptions provide detailed information about an object.

 

In general, the description includes important information that does not fit

 

into the general page of the property sheet. For example, a description of the

 

Employee entity might read: 7KLV HQWLW\ KDV RQH RFFXUUHQFH IRU HDFK

 

HPSOR\HH LQ RXU ZRUOGZLGH RSHUDWLRQV 7KLV EDVH VKRXOG JURZ E\ SHUFHQW

 

LQ

 

 

 

 

The description is a free-text field that can be several lines long.

Annotation

The annotation contains your own notes regarding the implementation of a

 

model or the objects it contains. For example, an annotation of the Employee

 

entity might read: 9HULI\ OLVW RI DWWULEXWHV ZLWK 'LUHFWRU RI +XPDQ 5HVRXUFHV

The annotation is a free-text field that can be several lines long.

$WWDFKLQJ D GHVFULSWLRQ RU DQ DQQRWDWLRQ WR DQ REMHFW

You can attach a description or an annotation to an object from the Notes tab in the object property sheet.

 

PowerDesigner

&KDSWHU 0DQDJLQJ 2EMHFWV

ϖ7R DWWDFK D GHVFULSWLRQ RU DQ DQQRWDWLRQ WR DQ REMHFW

1Double-click an object in the diagram to display the object property sheet.

2Click the Notes tab.

The Description page is displayed by default.

3Type a description.

RU

Click the Annotation tab to display the corresponding page. Type an annotation.

4Click OK.

1DYLJDWLQJ EHWZHHQ SDJHV

Use CTRL + PAGE DOWN or CTRL + PAGE UP to move to the next or to the previous tab and display the corresponding object type page.

2EMHFW LV DQQRWDWHG

You can see if an object in the diagram has notes by opening the object list to which it belongs and customize the display of the list so the N column (N stands for Notes) appears. If the check box corresponding to the object is selected in the N column, the object in the diagram is annotated.

For more information on customizing the display of a list, see section Applying the customization parameters to a list in chapter Using the PowerDesigner Interface.

'HILQLQJ D IRQW IRUPDW IRU QRWHV

The following font formatting is available:

Font

Font style

Size

Strikeout

Underline

Text color

Background

General Features Guide

 

'HILQLQJ REMHFWV

ϖ7R GHILQH D IRQW IRUPDW IRU QRWHV

1Double-click an object in the diagram to display the object property sheet.

2Click the Notes tab.

3Click the tab (Description or Annotation) that contains the text you want to edit.

The corresponding page appears.

4Click the Format tool.

The Text Format dialog box opens to the Font page.

5Select font format options.

6 Click OK.

)RUPDWWLQJ D SDUDJUDSK IRU QRWHV

The following paragraph formatting is available:

Indentation (left, right, first line)

Spacing (before, after, line spacing)

Justification (alignment)

Bullet

 

PowerDesigner

Тут вы можете оставить комментарий к выбранному абзацу или сообщить об ошибке.

Оставленные комментарии видны всем.

Соседние файлы в папке PowerDesigner 9