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

&KDSWHU 'HILQLQJ 5HODWLRQVKLSV

'HILQH UROHV LQ DQ RSWLRQDO UHODWLRQVKLS

You will define an optional relationship between AUTHOR to PICTURE. An author does not have to have a picture. A picture does not have to be of an author.

1Click the 3RLQWHU tool in the tool palette.

2Double-click the UHODWLRQVKLS line between AUTHOR and PICTURE. The relationship property sheet appears:

3Type $XWKRU 3LFWXUH in the 1DPH box.

This is the name of the relationship. The code is automatically set equal to the name.

4Click the 'HWDLO tab.

CDM Getting Started

 

'HILQH UROHV LQ DQ RSWLRQDO UHODWLRQVKLS

The Detail page appears.

5Type LV VKRZQ LQ in the Role box in the "Author" to "Picture" groupbox. This label indicates that an author LV VKRZQ LQ a picture.

6Type VKRZV in the Role box in the "Picture" to "Author" groupbox.

 

PowerDesigner

&KDSWHU 'HILQLQJ 5HODWLRQVKLSV

This label indicates that a picture VKRZV an author.

7Click 2..

The relationship appears in the model.

CDM Getting Started

 

'HILQH UROHV LQ DQ RSWLRQDO UHODWLRQVKLS

'LVSOD\ UHODWLRQVKLS UROHV

You can display roles by selecting ToolsDisplay Preferences and selecting the Role checkbox in the Relationship category.

What you learned In this chapter you learned how to:

Create a one-to-many relationship

Define roles in an optional relationship

 

PowerDesigner

C H A P T E R 7

8VLQJ 3DFNDJHV DQG 6KRUWFXWV

 

A SDFNDJH is a defined section of a model. A package can contain the same

 

types of objects that are available in a model. Using packages can help you

 

manage large models. For example, portions of a model representing

 

different tasks and subject areas, can be divided up into packages which can

 

be used by different development teams working on the same project.

 

You can create new objects in a package or use objects that exist in the

 

global model. When you use existing objects, you create a shortcut in the

 

package which references the actual object in the global model. A VKRUWFXW is

 

a symbol that represents and references an object in another model or

 

package. The referenced object is called the target object.

 

You can access the properties of a target object from its shortcut. This allows

 

you to modify the target object in the same way that you would in the global

 

model.

 

For more information on packages and shortcuts, see chapters

 

Managing Models and Managing Shortcuts in the *HQHUDO )HDWXUHV *XLGH.

 

You will create a package containing shortcuts to the entities TITLE,

 

PERIODICAL, and NONPERIODICAL.

What you will do

In this chapter you will:

 

Create a package

 

Add objects to the package

 

 

 

+RZ ORQJ ZLOO LW WDNH"

 

About 5 minutes.

 

 

CDM Getting Started

 

&UHDWH D SDFNDJH

&UHDWH D SDFNDJH

You will start by creating a package.

1Click the 3DFNDJH symbol in the Palette.

2Click an empty space in the diagram.

The Package symbol appears in the diagram.

3Right-click the PRXVH EXWWRQ to release the 3DFNDJH WRRO.

4Double-click the new package symbol.

The package property sheet appears. A default name and code are entered.

$ GHIDXOW QDPH DQG FRGH DSSHDU

When you create a new object, a default name and code are automatically entered in the property sheet . If the default name is selected it disappears when you start to type the object name. If the default name is not selected, select it and either type the new object name, or delete the default name before typing the new object name.

 

PowerDesigner

&KDSWHU 8VLQJ 3DFNDJHV DQG 6KRUWFXWV

5 Type 7LWOH &DWHJRULHV in the 1DPH box.

6Click 2..

You return to the diagram. The new name for the package appears in the symbol.

CDM Getting Started

 

2SHQ D GLDJUDP IRU WKH SDFNDJH

2SHQ D GLDJUDP IRU WKH SDFNDJH

At creation a package is simply a named object in the model. To be useful you need to open a diagram in the package. In the diagram you can create and use existing objects in the same way that they are used in the global diagram.

You will open a new diagram for the package and arrange the two diagram windows horizontally in the main window.

1Right-click the 3DFNDJH V\PERO

A contextual menu appears.

2Select 2SHQ 'LDJUDP from the contextual menu. A new diagram appears in the Main window.

3Select :LQGRZ7LOH +RUL]RQWDOO\ from the menu bar.

The diagram for the Tutorial diagram (global model diagram) and the new empty package diagram are arranged horizontally. Everything that is created or added to the Tutorial Package diagram is contained within the package.

 

PowerDesigner

&KDSWHU 8VLQJ 3DFNDJHV DQG 6KRUWFXWV

8VLQJ WKH REMHFW EURZVHU

All the objects that are contained in the current workspace are represented in the Browser tree view. For this tutorial you are working with the graphical tools and the diagram windows. However, you can also use the Browser to create, delete, and manipulate model

objects. For more information on using the Browser, see chapter Using the Browser in the *HQHUDO )HDWXUHV JXLGH.

What you learned In this section, you learned how to:

Create a package starting with one of the objects in the global model

Identify a package by a name and a code

Open a new diagram for the package

Arrange the global model diagram and the package diagram windows horizontally to make it easier to work with the two diagrams

CDM Getting Started

 

$GG REMHFWV WR WKH SDFNDJH

$GG REMHFWV WR WKH SDFNDJH

You will add shortcuts for the TITLE, PERIODICAL and

NONPERIODICAL entities to the package.

1Click in the Tutorial diagram (the global model diagram). This makes the Tutorial diagram active.

2Use the VFUROO EDUV to position the Tutorial diagram so that the TITLE, PERIODICAL and NONPERIODICAL entities are visible.

3Click the 7,7/( 3(5,2',&$/ and 1213(5,2',&$/ entities while holding down the SHIFT key.

Handles appear around the three entities.

4Select (GLW&RS\ from the menu bar.

5Click in the 7LWOH &DWHJRULHV diagram.

This makes the package diagram the active diagram.

6Select (GLW3DVWH DV 6KRUWFXW from the menu bar.

 

PowerDesigner

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