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

&KDSWHU 'HILQLQJ (QWLWLHV

&UHDWH DQ HQWLW\

You will create an entity that contains information related to pictures, an entity that associates titles to authors, and two entities that differentiate title categories: periodicals and non-periodicals.

1Click the (QWLW\ tool in the tool palette.

2Click an empty space in the diagram.

An entity symbol appears at the click position.

At creation, an entity has a default name including a number, this number is assigned to the entity in the order of creation.

3Click the 3RLQWHU tool in the tool palette.

4Double-click the symbol of the HQWLW\ you just created. The entity property sheet appears.

5Type 3LFWXUH in the 1DPH box.

This is the name of the entity. The equivalent code is entered in the Code column automatically.

CDM Getting Started

 

&UHDWH DQ HQWLW\

6Click 2..

The entity displays the name Picture.

You created this entity by first creating its symbol, then identifying it from a property sheet. You can also create entities from the list of entities.

7Select 0RGHO(QWLWLHV.

The List of Entities dialog box displays existing entities.

8Click the $GG D 5RZ tool.

An arrow appears at the start of the first blank line and a default name and code are entered.

9Type 3HULRGLFDO in the 1DPH column.

The code is automatically set equal to the name.

10Click $SSO\.

The creation of the entity is committed.

1DPHV VRUWHG DOSKDEHWLFDOO\

When you click $SSO\ or 2., all names in the list are sorted alphabetically. The order of appearance of the names in the list will therefore change.

11Click the $GG D 5RZ tool.

An arrow appears at the start of the first blank line and a default name and code are entered.

12Type 1RQSHULRGLFDO in the 1DPH column.

13Click $SSO\.

The creation of the entity is committed.

 

PowerDesigner

&KDSWHU 'HILQLQJ (QWLWLHV

The new entities appear in the list.

14Click 2..

The new entities appear in the CDM.

0RYLQJ HQWLW\ V\PEROV

When you create entities from the list, they will not be arranged as shown above. You do not control the insert position of the symbols. You can move an entity symbol by selecting it and dragging it to a new position.

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

Use the statement of the business problem to decide what entities you need to create

Create an entity by inserting an entity symbol and assigning a name and code from its property sheet

Create an entity in the list of entities

CDM Getting Started

 

&UHDWH DQ DVVRFLDWLYH HQWLW\

&UHDWH DQ DVVRFLDWLYH HQWLW\

You will replace the existing relationship between AUTHOR and TITLE with an associative entity. This associative entity will have a unique occurrence for each title-author combination so that you can attach a royalty percentage to each unique case.

1Right-click the UHODWLRQVKLS that links Author and Title entities. A relationship contextual menu appears.

2Select &KDQJH WR (QWLW\6WDQGDUG from the contextual menu. An entity is inserted between Author and Title entities.

 

PowerDesigner

&KDSWHU 'HILQLQJ (QWLWLHV

'HILQH HQWLW\ DWWULEXWHV

You will define entity attributes for the entities TITLEAUTHOR, PICTURE, PERIODICAL, and NONPERIODICAL by attaching one or more data items to each entity.

You will create entity attributes by:

Adding data items to an entity

Creating an entity attribute

$GG GDWD LWHPV WR DQ HQWLW\

You will attach existing data items to the entities TITLEAUTHOR,

PICTURE, PERIODICAL, and NONPERIODICAL.

1Double-click the 7LWOH$XWKRU entity. The Entity property sheet appears.

2 Click the $WWULEXWHV tab.

CDM Getting Started

 

'HILQH HQWLW\ DWWULEXWHV

The Attributes page appears. It lists the attributes associated with the entity. The list is empty because the entity does not have any associated attributes.

Click the Add Data Item tool.

A selection box appears. It lists all the data items available in the model.

3Click the &RGH column heading.

This sorts the list of code items alphabetically.

 

PowerDesigner

&KDSWHU 'HILQLQJ (QWLWLHV

4Select the 7LWOH$XWKRU 2UGHU checkbox. Select the 7LWOH$XWKRU 3HUFHQW checkbox

5Click 2..

The data items appear in the list of attributes for the TitleAuthor entity.

6 Click 2..

CDM Getting Started

 

'HILQH HQWLW\ DWWULEXWHV

In the CDM diagram, the TITLEAUTHOR entity displays its attributes.

7Repeat steps 1-6 for entities PICTURE (Picture and Picture ID data items), PERIODICAL (Periodical Format and Periodical Pub Frequency data items), and NONPERIODICAL (Book Collection data item).

The CDM displays these entities with their attributes.

&UHDWH DQ HQWLW\ DWWULEXWH

You will create a new Biography attribute for the text of the author’s biography.

1Double-click the $87+25 entity symbol. The Entity property sheet appears.

2Click the $WWULEXWHV tab.

The Attributes page appears. It lists the attributes belonging to the Author entity.

3Select the $XWKRU $GYDQFH attribute.

4Click the ,QVHUW D 5RZ tool.

 

PowerDesigner

&KDSWHU 'HILQLQJ (QWLWLHV

A blank line is inserted above the Author Advance line. A default name is entered.

5Type $XWKRU %LRJUDSK\ in the Name column.

This is the name of the attribute. The equivalent code appears in the Code column automatically.

6Scroll to the right and click the Domain column. Select /21*B127(6 from the Domain dropdown list.

CDM Getting Started

 

'HILQH HQWLW\ DWWULEXWHV

The text data type (TXT) appears in the Data Type column.

7Click 2..

The Author entity displays its new attribute.

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

Add existing data items to an entity to create entity attributes

Create an entity attribute

Identify an entity attribute by a name, a code, and a data type

 

PowerDesigner

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