power designer conceptual model

124
Sybase ® PowerDesigner ® Conceptual Data Model Getting Started Version 11.0 DC38085-01-1100-01 Last modified: November 2004

Upload: nicolas-nieto-alvarado

Post on 28-Mar-2015

1.328 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: POWER DESIGNER CONCEPTUAL MODEL

Sybase®

PowerDesigner®

Conceptual Data Model

Getting Started

Version 11.0DC38085-01-1100-01

Last modified: November 2004

Page 2: POWER DESIGNER CONCEPTUAL MODEL

Copyright © 1991-2004 Sybase, Inc. All rights reserved.Information in this manual may change without notice and does not represent a commitment on the part of Sybase, Inc. and itssubsidiaries.Sybase, Inc. provides the software described in this manual under a Sybase License Agreement. The software may be used only inaccordance with the terms of the agreement.No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual,optical, or otherwise, without the prior written permission of Sybase, Inc.Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013 for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies.

Sybase, SYBASE (logo), ADA Workbench, Adaptable Windowing Environment, Adaptive Component Architecture, Adaptive Server,Adaptive Server Anywhere, Adaptive Server Enterprise, Adaptive Server Enterprise Monitor, Adaptive Server Enterprise Replication,Adaptive Server Everywhere, Afaria, AppModeler, APT Workbench, APTBuild, APT-Edit, APT-Execute, APT-Translator, APT-Library, ASEP, AvantGo, AvantGo Application Alerts, AvantGo Mobile Document Viewer, AvantGo Mobile Delivery, AvantGoMobile Inspection, AvantGo Mobile Marketing Channel, AvantGo Mobile Pharma, AvantGo Mobile Sales, AvantGo Pylon, AvantGoPylon Application Server, AvantGo Pylon Conduit, AvantGo Pylon PIM Server, AvantGo Pylon Pro, Backup Server, BayCam, Bit-Wise, BizTracker, Certified PowerBuilder Developer, Certified SYBASE Professional, Certified SYBASE Professional Logo,ClearConnect, Client-Library, Client Services, CodeBank, Column Design, ComponentPack, Connection Manager, Convoy/DM,Copernicus, CSP, Data Pipeline, Data Workbench, DataArchitect, Database Analyzer, DataExpress, DataServer, DataWindow, DB-Library, dbQueue, Developers Workbench, Direct Connect Anywhere, DirectConnect, Distribution Director, Dynamic Mobility Model,e-ADK, E-Anywhere, e-Biz Integrator, E-Whatever, EC Gateway, ECMAP, ECRTP, eFulfillment Accelerator, Electronic CaseManagement, Embedded SQL, EMS, Enterprise Application Studio, Enterprise Client/Server, Enterprise Connect, Enterprise DataStudio, Enterprise Manager, Enterprise Portal (logo), Enterprise SQL Server Manager, Enterprise Work Architecture, Enterprise WorkDesigner, Enterprise Work Modeler, eProcurement Accelerator, eremote, Everything Works Better When Everything Works Together,EWA, Financial Fusion, Financial Fusion (and design), Financial Fusion Server, Formula One, Fusion Powered e-Finance, FusionPowered Financial Destinations, Fusion Powered STP, Gateway Manager, GeoPoint, GlobalFIX, iAnywhere, iAnywhere Solutions,ImpactNow, Industry Warehouse Studio, InfoMaker, Information Anywhere, Information Everywhere, InformationConnect, InstaHelp,Intelligent Self-Care, InternetBuilder, iremote, iScript, Jaguar CTS, jConnect for JDBC, KnowledgeBase, Logical Memory Manager,M-Business Channel, MBusiness Network, M-Business Server, Mail Anywhere Studio, MainframeConnect, Maintenance Express,Manage Anywhere Studio, MAP, MDI Access Server, MDI Database Gateway, media.splash, Message Anywhere Server, MetaWorks,MethodSet, ML Query, MobiCATS, My AvantGo, My AvantGo Media Channel, My AvantGo Mobile Marketing, MySupport, Net-Gateway, Net-Library, New Era of Networks, Next Generation Learning, Next Generation Learning Studio, O DEVICE, OASiS,OASiS logo, ObjectConnect, ObjectCycle, OmniConnect, OmniSQL Access Module, OmniSQL Toolkit, Open Biz, Open BusinessInterchange, Open Client, Open ClientConnect, Open Client/Server, Open Client/Server Interfaces, Open Gateway, Open Server, OpenServerConnect, Open Solutions, Optima++, Orchestration Studio, Partnerships that Work, PB-Gen, PC APT Execute, PC DB-Net, PCNet Library, PhysicalArchitect, Pocket PowerBuilder, PocketBuilder, Power++, Power Through Knowledge, power.stop, PowerAMC,PowerBuilder, PowerBuilder Foundation Class Library, PowerDesigner, PowerDimensions, PowerDynamo, Powering the NewEconomy, PowerScript, PowerSite, PowerSocket, Powersoft, PowerStage, PowerStudio, PowerTips, Powersoft Portfolio, PowersoftProfessional, PowerWare Desktop, PowerWare Enterprise, ProcessAnalyst, QAnywhere, Rapport, Relational Beans, RemoteWare,RepConnector, Report Workbench, Report-Execute, Replication Agent, Replication Driver, Replication Server, Replication ServerManager, Replication Toolkit, Resource Manager, RW-DisplayLib, RW-Library, SAFE, SAFE/PRO, SDF, Secure SQL Server, SecureSQL Toolset, Security Guardian, SKILS, smart.partners, smart.parts, smart.script, SQL Advantage, SQL Anywhere, SQL AnywhereStudio, SQL Code Checker, SQL Debug, SQL Edit, SQL Edit/TPU, SQL Everywhere, SQL Modeler, SQL Remote, SQL Server, SQLServer Manager, SQL SMART, SQL Toolset, SQL Server/CFT, SQL Server/DBM, SQL Server SNMP SubAgent, SQL Station, SQLJ,Stage III Engineering, Startup.Com, STEP, SupportNow, S.W.I.F.T. Message Format Libraries, Sybase Central, Sybase Client/ServerInterfaces, Sybase Development Framework, Sybase Financial Server, Sybase Gateways, Sybase IQ, Sybase Learning Connection,Sybase MPP, Sybase SQL Desktop, Sybase SQL Lifecycle, Sybase SQL Workgroup, Sybase Synergy Program, Sybase Virtual ServerArchitecture, Sybase User Workbench, SybaseWare, Syber Financial, SyberAssist, SybFlex, SybMD, SyBooks, System 10, System 11,System XI (logo), SystemTools, Tabular Data Stream, The Enterprise Client/Server Company, The Extensible Software Platform, TheFuture Is Wide Open, The Learning Connection, The Model For Client/Server Solutions, The Online Information Center, The Power ofOne, TotalFix, TradeForce, Transact-SQL, Translation Toolkit, Turning Imagination Into Reality, UltraLite, UltraLite.NET, UNIBOM,Unilib, Uninull, Unisep, Unistring, URK Runtime Kit for UniCode, Viewer, VisualWriter, VQL, WarehouseArchitect, WarehouseControl Center, Warehouse Studio, Warehouse WORKS, Watcom, Watcom SQL, Watcom SQL Server, Web Deployment Kit,Web.PB, Web.SQL, WebSights, WebViewer, WorkGroup SQL Server, XA-Library, XA-Server, XcelleNet, and XP Server aretrademarks of Sybase, Inc. or its subsidiaries.

All other trademarks are property of their respective owners.

Page 3: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started iii

Contents

About This Book .............................................................................................v

1 About the CDM Tutorial .....................................................1What you will do........................................................................ 2

How long it will take ............................................................ 2What you will learn ............................................................. 3

Setting up.................................................................................. 4

2 Stating the Business Problem...........................................5

3 How to Begin the CDM Tutorial.........................................7Start PowerDesigner................................................................. 8Open a new CDM ..................................................................... 9Use the tools in the tool palette............................................... 10Open the tutorial CDM ............................................................ 16Define CDM preferences and options..................................... 17Define CDM properties ........................................................... 20Save the tutorial CDM............................................................. 21

4 Defining Business Rules, Domains, and Data Items .....23Create a new business rule .................................................... 25Create a domain ..................................................................... 29Create a data item .................................................................. 34Attach a data item to a domain ............................................... 38

5 Defining Entities...............................................................41Create an entity....................................................................... 43Create an associative entity.................................................... 46Define entity attributes ............................................................ 47

Add data items to an entity............................................... 47Create an entity attribute .................................................. 50

Page 4: POWER DESIGNER CONCEPTUAL MODEL

iv PowerDesigner

Designate an identifier ............................................................ 53Attach a business rule to an entity.......................................... 57

6 Defining Relationships ....................................................59Create a relationship............................................................... 61Define roles in an optional relationship................................... 63

7 Using Packages and Shortcuts.......................................67Create a package ................................................................... 68Open a diagram for the package ............................................ 70Add objects to the package .................................................... 72Accessing a target object from a shortcut .............................. 74

8 Defining Inheritance ........................................................75Create an inheritance link ....................................................... 76Define inheritance properties.................................................. 78

9 Organizing the Display ....................................................83Add a title box ......................................................................... 84Change the color of the title box ............................................. 85Change the color of the window.............................................. 86Arrange the symbols............................................................... 87Center the model on the page ................................................ 89Print the model........................................................................ 90

10 Generating the PDM from the CDM ................................91Generate the PDM.................................................................. 93Save and close the PDM ........................................................ 96

11 Managing a Model Report ...............................................97Create a model report using a standard template .................. 98Focus the report on the package diagram............................ 102Customize the report ............................................................ 103Generate the report .............................................................. 108Exit PowerDesigner .............................................................. 110

CDM Glossary .........................................................................................111

Index .........................................................................................113

Page 5: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started v

About This Book

This book contains step-by-step tutorials for the PowerDesigner ConceptualData Model modeling environment. It shows you how to do the following:

♦ Build a Conceptual Data Model (CDM)

♦ Use business rules and other model objects

♦ Generate a Physical Data Model (PDM)

♦ Create and generate a model report

This book is for anyone who will be building data models withPowerDesigner. Some familiarity with relational databases, SQL, and designmethodology is helpful, but not required. For more information, see theBibliography section at the end of this chapter.

The PowerDesigner modeling environment supports several types of models:

♦ Conceptual Data Model (CDM) to model the overall logical structureof a database, independent from any software or data storage structureconsiderations

♦ Physical Data Model (PDM) to model the overall physical structure ofa database, taking into account DBMS software or data storage structureconsiderations

♦ Object Oriented Model (OOM) to model a software system using anobject-oriented approach for Java or other object languages

♦ Business Process Model (BPM) to model the means by which one ormore processes are accomplished in operating business practices

♦ XML Model (XSM) to model the structure of an XML file using a DTDor an XML schema

♦ Requirements Model (RQM) to list and document the customer needsthat must be satisfied during a development process

Subject

Audience

Documentationprimer

Page 6: POWER DESIGNER CONCEPTUAL MODEL

About This Book

vi PowerDesigner

♦ Information Liquidity Model (ILM) to model the replication ofinformation from a source database to one or several remote databasesusing replication engines

♦ Free Model (FEM) to create any kind of chart diagram, in a context-free environment

This book only contains the basics of the Conceptual Data Model. Forinformation on other models or aspects of PowerDesigner, consult thefollowing books:

General Features Guide To get familiar with the PowerDesignerinterface before learning how to use any of the models.

Conceptual Data Model User’s Guide To work with the CDM.

Physical Data Model Getting Started To learn the basics of the PDM.

Physical Data Model User’s Guide To work with the PDM.

Object Oriented Model Getting Started To learn the basics of theOOM.

Object Oriented Model User's Guide To work with the OOM.

Business Process Model Getting Started To learn the basics of theBPM.

Business Process Model User's Guide To work with the BPM.

XML Model User's Guide To work with an XSM.

Information Liquidity Model User's Guide To work with an ILM.

Requirements Model User's Guide To work with an RQM.

Reports User’s Guide To create reports for any or all models.

Repository Getting Started To learn the basics of the Repository.

Repository User’s Guide To work in a multi-user environment using acentral repository.

PowerDesigner documentation uses specific typefaces to help you readilyidentify specific items:

♦ monospace text (normal and bold)

Typographicconventions

Page 7: POWER DESIGNER CONCEPTUAL MODEL

About This Book

CDM Getting Started vii

Used for: Code samples, commands, compiled functions and files,references to variables.Example: declare user_defined…, theBeforeInsertTrigger template.

♦ UPPER CASEObject codes, reversed objects, file names + extension.Example: The AUTHOR table appears in the Browser. Open the fileOOMAFTER.OOM.

♦ bold textAny new term.Example: A shortcut has a target object.

♦ SMALL CAPS

Any key name.Example: Press the ENTER key.

♦ bold italicTabs, buttons, commands.Example: Click the Selection tab. Select File→Open.

♦ Select File→OpenCommand from the menu bar.

♦ For more informationUsed to help you get more information on a topic. You are free to go andread additional information or simply skip these information and carryon with your reading.

Information engineering

James Martin, Prentice Hall, 1990, three volumes of 178, 497, and 625 pagesrespectively; clothbound, ISBN 0-13-464462-X (vol. 1), 0-13-464885-4 (vol.2), and 0-13-465501-X (vol. 3).

Data Modeling Essentials

Graeme Simsion, Van Nostrand Reinhold, 1994, 310 pages; paperbound;ISBN 1850328773

Celko95

Joe Celko, Joe Celko's SQL for Smarties (Morgan Kaufmann Publishers,Inc., 1995), 467 pages; paperbound; ISBN 1-55860-323-9.

Bibliography

Page 8: POWER DESIGNER CONCEPTUAL MODEL

About This Book

viii PowerDesigner

Page 9: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 1

C H A P T E R 1

About the CDM Tutorial

This tutorial is a series of lessons in which you learn how to usePowerDesigner to build a Conceptual Data Model (CDM).

In this tutorial, you complete the CDM delivered in the tutorial file. Thismodel is based on a real-life example of an information system. It provides acontext for the exercises. As you build onto this model, you learn how tocreate all the basic elements of a CDM. You can then apply your knowledgeto creating a CDM to suit your needs.

A CDM represents the overall structure of an information system. It describesthe conceptual relationships of different types of information rather than theirphysical structures. A CDM is independent of a particular databasemanagement system (DBMS).

In a CDM, you can put design issues first because you do not have to worryabout the details of physical implementation. You deal principally withentities and their relationships. These are easy to understand and tomanipulate.

Through a simple generation procedure, you can transfer the solid designframework of the CDM to the Physical Data Model (PDM). The PDM adaptsyour design to the specifics of a DBMS and puts you well on the way tocomplete physical implementation.

What is a CDM?

Why build a CDM?

Page 10: POWER DESIGNER CONCEPTUAL MODEL

What you will do

2 PowerDesigner

What you will doYou begin by preparing a business description and stating the businessproblems to solve. You will refer to this statement in order to decide whatbusiness rules, data items, and entities you need to create.

You will open the tutorial CDM. This CDM presents the conceptual structureof a publishing enterprise.

You will specify model preferences and properties, then save the modelunder a new name.

You will create business rules, domains, and data items to complete theCDM.

You will add entities to the tutorial model. You will define entity attributesand designate an identifier. You will also attach a business rule to an entity.

You will create relationships between entities. You will create relationshipswith different cardinalities, as well as mandatory and dependent relationships.

You will create a package in which you will add a shortcut to an entity in theglobal model

You will create an inheritance link.

You will use the display options and tools to organize the model. You willinsert a title box and change its color. You will use the alignment tools toalign symbols and straighten relationship lines.

You will generate a Physical Data Model (PDM) from the CDM. You willdefine the generation parameters, generate the PDM, then save and close thePDM.

You will create a report for your model using one of the standard templatesthat ship with PowerDesigner. You will focus your analysis on the packagediagram. You will then customize the report before generating it on a printedpaper and in RTF and HTM files. Then you will save and close the CDM,after you save your report.

How long it will take

You can do the CDM tutorial in one sitting in about 1 hour 40 mns. You canstop after any chapter and continue at another time.

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Chapter 9

Chapter 10

Chapter 11

Page 11: POWER DESIGNER CONCEPTUAL MODEL

Chapter 1 About the CDM Tutorial

CDM Getting Started 3

What you will learn

You will learn basic PowerDesigner techniques for creating a CDM,including:

♦ How to create the basic elements of a CDM: domains, data items,business rules, and entities

♦ How to create different types of relationships between entities

♦ How to create packages and add objects to a package

♦ How to create an inheritance

♦ How to use the display functions to arrange symbols and to center themodel on the page

♦ How to generate a Physical Data Model (PDM) from a CDM

♦ How to create and generate a report for a model

Page 12: POWER DESIGNER CONCEPTUAL MODEL

Setting up

4 PowerDesigner

Setting upBefore you begin, make sure that the files you need for the exercises are onyour hard disk. When you install PowerDesigner, these files are installed inthe Examples\Tutorial directory of PowerDesigner. When you have finishedwith this tutorial you can delete them if you want.

The CDM tutorial uses the following files:

File Description

CDMBEFOR.CDM Starting tutorial CDM

CDMAFTER.CDM Finished tutorial CDM

Page 13: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 5

C H A P T E R 2

Stating the Business Problem

The first step to creating a Conceptual Data Model (CDM) is to formulate astatement of the business problems that the CDM will address. To do this,you draw up a description of business activities. This helps you decide:

♦ What information you need to store

♦ What entities are involved in the business

♦ How the business operates

When the way the business operates is clear, you can begin to develop theCDM.

You will start this tutorial with a CDM that is the conceptual model of theinformation system for a publishing company.

A business description indicates that the entities involved in the businessinclude titles, authors, book stores, and discounts. It indicates the detailsrelated to each of these entities: from international standard book numbers(ISBN) for titles to store addresses.

In the course of the CDM tutorial, you will solve three business problems:

♦ Royalties for multiple authors Keep track of different royaltypercentages for authors of the same book

♦ Author pictures and biographies Identify and store author picturesand biographies for use on book covers

♦ Title categories Classify each title as a periodical or a non-periodicaland save related information

On the basis of these business problems, you will extend the tutorial model tomanage additional data. For example, you will add an entity for pictures andyou will create a data item to store information about percentages of royaltiesthat a particular author receives.

Businessdescription

Business problem

Page 14: POWER DESIGNER CONCEPTUAL MODEL

Stating the Business Problem

6 PowerDesigner

Page 15: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 7

C H A P T E R 3

How to Begin the CDM Tutorial

You will begin the tutorial by running PowerDesigner. You will learn how touse the tool palette.

You will open the tutorial file and assign it preferences, options, andproperties. Next, you will save it under a different name so that you can goback and use the original model again if you want to repeat the exercises.

In this chapter you will:

♦ Start PowerDesigner

♦ Use the tools in the tool palette

♦ Open the tutorial CDM

♦ Define CDM preferences and options

♦ Define CDM properties

♦ Save the tutorial CDM

How long will it take?About 10 minutes.

What you will do

Page 16: POWER DESIGNER CONCEPTUAL MODEL

Start PowerDesigner

8 PowerDesigner

Start PowerDesigner♦ Click the PowerDesigner program icon.

The PowerDesigner main window appears. It contains an object browserwindow docked to the left, and an output window docked to the bottomof the main window.

The object browser window shows the contents of the workspace in atree view. You can use the object browser to organize the objects in eachof your models.

The workspace is the name for the current PowerDesigner session.Workspace is the default node in the object browser tree view. The newCDM that you will open will be created and saved in a workspace.

The output window shows the progression of any process that you runfrom PowerDesigner, for example the process of generating a PDM froma CDM is shown in this window.

Page 17: POWER DESIGNER CONCEPTUAL MODEL

Chapter 3 How to Begin the CDM Tutorial

CDM Getting Started 9

Open a new CDM1 Select File→New from the menu bar.

The New dialog box appears. It lists the types of models that you cancreate in PowerDesigner.

2 Select Conceptual Data Model in the Model type list.

3 Select the New Model radio button in the upper right part of the dialogbox.

4 Click OK.

A CDM model window appears. It contains a diagram window (as yetempty), a palette, and the Browser and Output windows are docked tothe left and bottom of the screen respectively.

Page 18: POWER DESIGNER CONCEPTUAL MODEL

Use the tools in the tool palette

10 PowerDesigner

Use the tools in the tool paletteThe buttons in the CDM tool palette enact all major functions needed to buildand modify a CDM.

The following table indicates the names and functions of each tool in thepalette:

Tool Name Action

Pointer Selects symbol

Grabber Selects, moves and resizes all symbols

Zoom In Increases view scale

Zoom Out Decreases view scale

Open Package Diagram Display diagram for selected package

Properties Display property sheet for selected symbol

Delete Delete symbol

Package Insert package symbol

Entity Insert entity symbol

Relationship Insert relationship symbol

Inheritance Insert inheritance symbol

Page 19: POWER DESIGNER CONCEPTUAL MODEL

Chapter 3 How to Begin the CDM Tutorial

CDM Getting Started 11

Tool Name Action

Association Insert association symbol

Association Link Insert association link symbol

File Insert a file symbol

Note Insert note symbol

Link/ExtendedDependency

Draws a graphical link between symbols inthe diagram

Draws a note link between a Note and anobject

Draws an extended dependency between twoobjects that support extended dependencies

Title Insert title symbol

Text Insert text

Line Draw a line

Arc Draw an arc

Rectangle Draw a rectangle

Ellipse Draw an ellipse

Polyline Draw a jagged line

Polygon Draw a polygon

So that you know how to use these tools before you begin creating the CDM,you will create a few objects using the tool palette.

1 Click the Entity tool in the tool palette.

The cursor takes the form of an entity when it is moved into the diagram.

2 Click anywhere in the CDM diagram.

Page 20: POWER DESIGNER CONCEPTUAL MODEL

Use the tools in the tool palette

12 PowerDesigner

An entity symbol appears at the click position. The entity has the nameEntity_n, where n is a number assigned to the entity in the order ofcreation of objects.

3 The Entity tool is still active, so click again in the CDM diagram tocreate another entity.

There are now two entities in the CDM diagram.

4 Click the Relationship tool in the tool palette.

The Entity tool is now released and the Relationship tool is active.

5 Click inside the first entity and while continuing to hold down the mousebutton, drag the cursor to the second entity. Release the mouse buttoninside the second entity.

This creates a relationship.

6 Click the right mouse button.

You release the relationship tool and activate the Pointer tool.

To release a toolA tool remains active until you release it. You can release a tool, byselecting another tool or by clicking the right mouse button. Bydefault, when you click the right mouse button, the Pointer tool isactivated.

7 Click the cursor above a corner of the first entity and while continuing tohold down the mouse button, drag the cursor so that you draw arectangle around the two entities.Release the mouse button.

The entities and the relationship are selected. Handles appear around theselection to show that they are selected.

Page 21: POWER DESIGNER CONCEPTUAL MODEL

Chapter 3 How to Begin the CDM Tutorial

CDM Getting Started 13

8 Drag the entities to a new position.

The relationship moves with the entities.

9 Click the Text tool in the palette.

The Text tool is now active.

10 Click the cursor under the relationship.

Some text appears in the area indicated by the rectangle.

11 Click the right mouse button.

You release the Text tool.

12 Double-click the text.

A text box appears.

13 Type a short text into the text box.

14 Click OK.

The text appears in the diagram. Handles appear around the text.

15 Click a handle at the right edge of the text and while continuing to holdthe mouse button, drag the cursor to the right until all the text appears.Release the mouse button.Click on the diagram background.

The handles around the text disappear.

16 Click the Pointer tool in the palette.

You will use this tool to select and delete one of the symbols.

17 Click on one of the entity symbols.

This selects the object you want to delete.

18 Press the DEL key.

Page 22: POWER DESIGNER CONCEPTUAL MODEL

Use the tools in the tool palette

14 PowerDesigner

The Confirm Deletion message box appears, asking you how you want todelete the selection.

Deleting objectsIf you select Delete object, you erase the graphic symbol and deletethe object from the model. If you select Delete Symbols Only, youerase the graphic symbol, but keep the object in the model.

Confirm deletion box is not visibleIf that box does not appear when you want to delete an object, selectTools→General Options from the menu bar then select the ConfirmObject Deletion check box.

19 Click OK.

The entity and associated relationship are removed from the diagram.The objects are also deleted from the model.

20 Click in the remaining entity.Press SHIFT while you click the text.

The two objects are selected.

21 Press the DEL key, and click OK when the deletion message appears.

The remaining entity and text are erased.

Page 23: POWER DESIGNER CONCEPTUAL MODEL

Chapter 3 How to Begin the CDM Tutorial

CDM Getting Started 15

In this section, you learned how to use some of the tools in the tool palette.You now know how to:

♦ Select a tool

♦ Release the active tool either by selecting another tool or by clicking theright mouse button

♦ Select all objects of a particular type

♦ Move graphic objects

♦ Create text to document the CDM

♦ Delete objects

What you learned

Page 24: POWER DESIGNER CONCEPTUAL MODEL

Open the tutorial CDM

16 PowerDesigner

Open the tutorial CDMTo perform the rest of the tutorial, you must open the tutorial file. Thetutorial file is installed in the directory PowerDesigner 11\Examples\Tutorial.

1 Select File→Open.

A file selection window appears.

2 Select or browse to the TUTORIAL directory.Select the CDMBEFOR.CDM file.Click OK.

PowerDesigner displays the model in the CDM diagram.

3 Press the F8 key to display the whole model in the CDM diagram, ifnecessary. The model may not look exactly like the one shown below:

Adjust display scaleYou can choose the display scale most comfortable for your eyes, byselecting View→Scale and choosing a scale.

Page 25: POWER DESIGNER CONCEPTUAL MODEL

Chapter 3 How to Begin the CDM Tutorial

CDM Getting Started 17

Define CDM preferences and optionsBefore you begin working, you will define some display preferences andmodel options for the CDM.

For a complete description of all CDM preferences and options, see theappropriate PowerDesigner user's guide.

1 Select Tools→Display Preferences from the menu bar.

The Display Preferences dialog box opens to the General page.

2 Select the Entity node, under the Object View node, in the Category treeview.

The Entity page appears.

3 Select or clear the following options:

Groupbox Selected item

Entity Attributes

All attributes

Entity attributes Identifier indicators

For each entity symbol, these preferences display all entity attributes,and identify all attributes that are defined in entity identifiers.

4 Click the Set As Default button.

Set As DefaultWhen you click the Set As Default button, you apply the displaypreferences to the current conceptual diagram in the model, and toany diagram of the same type you will create afterwards.

5 Select the Relationship node, under the Object View node, in the Categorytree view.

The Relationship page appears.

6 Select or clear the following options:

Groupbox Selected item

Relationship Role

Page 26: POWER DESIGNER CONCEPTUAL MODEL

Define CDM preferences and options

18 PowerDesigner

For each entity symbol, these preference displays the role of eachrelationship in the diagram.

7 Click the Set As Default button.

8 Click the Format node.

The Format page appears.

9 Click the Modify button at the bottom right of the page.

The Symbol Format page appears.

10 Verify that the Auto-adjust to Text check box is selected (this is thedefault selection).

11 Click OK in each of the dialog boxes.

You return to the PowerDesigner main window.

12 Select Tools→Model Options from the menu bar.

The Model Options dialog box appears. The Model Settings node isselected by default in the Category tree view.

13 Select or clear the following options:

Groupbox Selected item

Notation Mixed

Data Item Unique code

Allow reuse

Page 27: POWER DESIGNER CONCEPTUAL MODEL

Chapter 3 How to Begin the CDM Tutorial

CDM Getting Started 19

Groupbox Selected item

Relationship Unique code

Domain/Attribute Data type

Default data type <UNDEF>

Domain divergenceSelecting the Data type check box, without selecting the Enforcecheck box, allows divergence between a domain definition and thedata items attached to it. However, when there is divergence,PowerDesigner will propose to update the data type in all data itemsusing the domain

14 Select the Naming Convention node.

The Naming Convention page appears.

15 Select the Name radio button in the Display groupbox.

Object names are displayed in the object symbols in the CDM diagram.

16 Click OK.

Page 28: POWER DESIGNER CONCEPTUAL MODEL

Define CDM properties

20 PowerDesigner

Define CDM properties1 Select Model→Model Properties from the menu bar.

The Model property sheet appears.

2 Type Tutorial in the Name box.

This is the name of the CDM. The code Tutorial appears automatically inthe Code box:

3 Click Apply.

Name to code mirroringWhen you type a name in an object property sheet, you may have totype a code also because the name to code mirroring mode may notbe selected in the General Options dialog box. To do so, selectTools→General Options→Dialog.

4 Click OK.

Page 29: POWER DESIGNER CONCEPTUAL MODEL

Chapter 3 How to Begin the CDM Tutorial

CDM Getting Started 21

Save the tutorial CDMYou will save the tutorial CDM in another file. This leaves the originaltutorial CDM intact so you can use it again if you want to redo the exercises.

1 Select File→Save As.

The File Save As dialog box appears.

2 Type TUTORIAL.CDM in the File Name box.

This is the name of the file in which you will work and save yourmodifications.

3 Click Save.

This saves your model in the TUTORIAL.CDM file.

Save your workSave your work periodically while doing these exercises by selectingFile→Save.

Page 30: POWER DESIGNER CONCEPTUAL MODEL

Save the tutorial CDM

22 PowerDesigner

Page 31: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 23

C H A P T E R 4

Defining Business Rules, Domains, andData Items

A business rule is a written expression of the way a business operates. Whenyou create a business rule, you refer to the ideas set out in the businessdescription.

There are six types of business rules: facts, definitions, formulas, validations,requirements and constraints:

Type ofbusiness rule Example

Fact A publisher may publish one or more titles

Definition An author is identified by a name and an address

Formula The amount of royalties is a percentage of the sales whichincreases according to the amount of sales

Validation The percentage of royalties paid to all authors of a book mustadd up to 100% of the royalties

Requirement The model is designed so that total amount of royalties donot exceed 10% of total sales

Constraint The sales start date should be inferior to the end date of thepublishing process

When you use business rules to document the CDM, they are not translatedinto executable code. Business rules can be implemented as constraints in thePDM.

A data item is an elementary piece of information. For example, this CDMcontains data items for author last name and for book titles.

A domain defines a standard data structure that you can apply to multipledata items. When you modify a domain you globally update the data itemsassociated with the domain. This makes it easier to standardize datacharacteristics and modify your model consistently when you need to makechanges.

About businessrules

About data items

About domains

Page 32: POWER DESIGNER CONCEPTUAL MODEL

Create a new business rule

24 PowerDesigner

Check parameters specify more precisely what values to allow for a domainor a data item. In a CDM, check parameters define standard parameters, suchas minimum, maximum, or accepted values.

In this chapter you will:

♦ Create a new business rule

♦ Create a domain

♦ Create a data item

♦ Attach a data item to a domain

How long will it take?About 20 minutes.

About checkparameters

What you will do

Page 33: POWER DESIGNER CONCEPTUAL MODEL

Chapter 4 Defining Business Rules, Domains, and Data Items

CDM Getting Started 25

Create a new business ruleYou will create a business rule that states how to attribute royalties toauthors.

1 Select Model→Business Rules.

The List of Business Rules dialog box displays existing business rules.

2 Click the Add a Row tool.

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

A default name and code appearWhen you create a new list item, a default name and codeautomatically appear for the new item. If the default name is selectedit disappears when you start to type the item name. If the default nameis not selected, select it and either type the new item name, or deletethe default name before typing the new item name.

3 Type Author Percent in the Name column.

This is the name of the business rule. The equivalent code is entered inthe Code column automatically.

Page 34: POWER DESIGNER CONCEPTUAL MODEL

Create a new business rule

26 PowerDesigner

4 Select Validation from the dropdown list in the Rule Type column.

Rule type column is not visibleIf the rule type column is not visible, click the Customize Columnsand Filter tool from the toolbar. A selection box appears listing all thecolumns displayed in the list. Select the appropriate checkbox for thecolumn that is not displayed, then click OK. The column appears inthe list.

This defines the business rule as a validation rule.

5 Click Apply.

The creation of the new business rule is committed.

Names sorted alphabeticallyWhen you click Apply or OK, all names in the list are sortedalphabetically. The order of appearance of the names in the list willtherefore change.

6 Click the new business rule line.

An arrow appears at the beginning of the line.

7 Click the Properties tool.

orDouble click the arrow at the beginning of the line.

Page 35: POWER DESIGNER CONCEPTUAL MODEL

Chapter 4 Defining Business Rules, Domains, and Data Items

CDM Getting Started 27

The property sheet for the new business rule appears.

8 Click the Notes tab.

The Notes page appears opened to the Description box.

9 In the Description box, type The percentage of royalties paid to allauthors of a book adds up to 100% of the total royalties.

This text explains the meaning of the business rule.

Page 36: POWER DESIGNER CONCEPTUAL MODEL

Create a new business rule

28 PowerDesigner

10 Click OK in each of the dialog boxes.

This validates the creation of the business rule.

In this section, you learned how to:

♦ Use the statement of the business problem to create the description of thebusiness rule

♦ Create a business rule

♦ Identify a business rule by a name, a code, and a type

What you learned

Page 37: POWER DESIGNER CONCEPTUAL MODEL

Chapter 4 Defining Business Rules, Domains, and Data Items

CDM Getting Started 29

Create a domainYou will create two domains that will define a standardized data type formoney amounts and for percentages in the model.

1 Select Model→Domains from the menu bar.

The List of Domains dialog box displays the existing domains.

2 Click the Add a Row tool.

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

3 Type Amount in the Name column.

This is the name of the domain. The equivalent code is entered in theCode column automatically.

4 Click Apply.

The creation of the domain is committed.

Names sorted alphabeticallyWhen you click Apply or OK, all names in the list are sortedalphabetically. The order of appearance of the names in the list willtherefore change with either of these operations.

Page 38: POWER DESIGNER CONCEPTUAL MODEL

Create a domain

30 PowerDesigner

5 Click the domain line.

An arrow appears at the beginning of the line.

6 Click the Properties tool.

orDouble click the arrow at the beginning of the line.

The property sheet for the domain appears.

7 Click the Question Mark button next to the Data Type dropdown listbox.

The Standard Data Types dialog box appears. You use this dialog box tospecify the form of the data affected by the domain.

8 Click the Money radio button.

The domain now has a money data type. A money data type storesnumbers with a fixed decimal point. Later, when you apply this domainto the data items that are used to store amounts of money, you will seethat they inherit this data type.

Data type codesAll data types have a one, two, or three letter code. When you selectthe Money radio button, MN appears in the Code box. This is thecode for a money data type.

Page 39: POWER DESIGNER CONCEPTUAL MODEL

Chapter 4 Defining Business Rules, Domains, and Data Items

CDM Getting Started 31

9 Type 8 in the Length box.

The maximum number of figures in a data item attached to this domainwill be 8.

10 Type 2 in the Precision box.

A data item attached to this domain can take two positions after thedecimal point.

11 Click OK.

Page 40: POWER DESIGNER CONCEPTUAL MODEL

Create a domain

32 PowerDesigner

You return to the domain property sheet. The value MN8,2 appears in theData Type dropdown listbox. MN is the code for a money data type.Eight indicates that an amount of money can have 8 figures. Twoindicates that the amount has a decimal precision of 2.

12 Click OK.

You return to the List of Domains.

13 Click the Add a Row tool.

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

14 Type Percent in the Name column.

This is the name of the domain. The equivalent code is entered in theCode column automatically.

15 Click Apply.

The creation of the domain is committed.

16 Click the domain line.

An arrow appears at the beginning of the line.

Page 41: POWER DESIGNER CONCEPTUAL MODEL

Chapter 4 Defining Business Rules, Domains, and Data Items

CDM Getting Started 33

17 Click the Properties tool.

orDouble click the arrow at the beginning of the line.

The property sheet for the domain appears.

18 Click the Question Mark button next to the Data Type dropdown listbox.

The Standard Data Types dialog box appears. You use this dialog box tospecify the form of the data affected by the domain.

19 Click the Short integer radio button.

The code SI indicates that the Percent domain has a short integer datatype. The Length and Precision boxes are not available because you donot need to specify a length and precision for the short integer data type.

20 Click OK in each of the dialog boxes.

Default data typeWhen you do not define a data type for a domain, it receives thedefault data type. You can designate a default data type by selectingTools→Model Options.

In this section, you learned how to:

♦ Look for data items storing similar types of data, and create a domain tostandardize the data characteristics of these data items

♦ Identify a domain by a name and a code

♦ Specify the data type, length, and precision of the domain

What you learned

Page 42: POWER DESIGNER CONCEPTUAL MODEL

Create a data item

34 PowerDesigner

Create a data itemTo manage books with multiple authors, you will create data items for thepercentage of royalties for each author and for the order of an author's namein the list of authors.

1 Select Model→Data Items from the menu bar.

The List of Data Items displays existing data items.

2 Click the Add a Row tool.

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

3 Type TitleAuthor Percent in the Name column.

This is the name of the data item. The equivalent code is entered in theCode column automatically.

4 Click Apply.

The creation of the data item is committed.

Names sorted alphabeticallyWhen you click Apply or OK, all names in the list are sortedalphabetically. The order of appearance of the names in the list willtherefore.

Page 43: POWER DESIGNER CONCEPTUAL MODEL

Chapter 4 Defining Business Rules, Domains, and Data Items

CDM Getting Started 35

5 Click the data item line.

An arrow appears at the beginning of the line.

6 Click the Properties tool.

orDouble click the arrow at the beginning of the line.

The property sheet for the data item appears.

7 Select Percent from the Domain dropdown listbox in the bottom part ofthe dialog box.

This applies the data type of the Percent domain to the data item. In theData Type column, SI indicates a short integer.

8 Click OK.

You return to the List of Data Items.

9 Click the Add a Row tool.

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

10 Type TitleAuthor Order in the Name column.

Page 44: POWER DESIGNER CONCEPTUAL MODEL

Create a data item

36 PowerDesigner

This is the name of the data item. The equivalent code is entered in theCode column automatically.

11 Click Apply.

The creation of the data item is committed.

12 Click the data item line.

An arrow appears at the beginning of the line.

13 Click the Properties tool.

orDouble click the arrow at the beginning of the line.

The property sheet for the data item appears.

14 Click the Question Mark button next to the Data Type dropdown listbox.

The Standard Data Types dialog box appears.

15 Click the Integer radio button.

Page 45: POWER DESIGNER CONCEPTUAL MODEL

Chapter 4 Defining Business Rules, Domains, and Data Items

CDM Getting Started 37

This gives the TitleAuthor Order data item an Integer data type.

16 Click OK in each of the dialog boxes.

You return to the model window.

In this section, you learned how to:

♦ Refer to the statement of the business problem to decide what additionalinformation you need to be able to manage

♦ Create data items to reflect these needs

♦ Identify a data item by a name, a code, and a data type

♦ Select a data type by attaching a data item to a domain

♦ Select a data type for a specific data item

What you learned

Page 46: POWER DESIGNER CONCEPTUAL MODEL

Attach a data item to a domain

38 PowerDesigner

Attach a data item to a domainYou will attach the AMOUNT domain to all data items that store amounts ofmoney and the PERCENT domain to all data items that store percentages.

1 Select Model→Data Items from the menu bar.

The List of Data Items dialog box appears.

2 Click the number of the data item Author Advance.Press CTRL while you click the number of the data item Royalty Amount.Press CTRL while you click the number of the data item Sale Amount.Press CTRL while you click the number of the data item Title Price.

These data items are selected.

3 Scroll to the right until the Domain column appears.

List column is not visibleIf a list column is not visible, click the Customize Columns and Filtertool from the toolbar. A selection box appears listing all the columnsdisplayed in the list. Select the appropriate checkbox for the columnthat is not displayed, then click OK. The column appears in the list.

4 Click in the Domain column for the line Author Advance.

A down arrowhead appears at the end of the line. This indicates that adropdown list is available for the Domain column. The list contains allthe domains available in the model.

Page 47: POWER DESIGNER CONCEPTUAL MODEL

Chapter 4 Defining Business Rules, Domains, and Data Items

CDM Getting Started 39

5 Click the down arrowhead and select Amount.

Amount automatically appears in the Domain column for each of theother selected data items. When you assign a property to a selected itemin a list, all other selected list items are automatically assigned the sameproperty.

The data items inherit the data type of the domain. MN8,2 appears in theData Type column. This code indicates a money data type with a lengthof 8 and a precision of 2.

Page 48: POWER DESIGNER CONCEPTUAL MODEL

Attach a data item to a domain

40 PowerDesigner

The data items Author Advance, Royalty Amount, Sales Amount, andTitle Price which before had different data types, now inherit astandardized data type from the Amount domain.

6 Click the number of the data item Discount Percent and select PERCENTfrom the dropdown listbox in the Domain column.

7 Click OK.

In this section, you learned how to ensure data consistency by attaching dataitems to domains.

It is good practice to attach data items to domains. By doing so, when youmodify a domain you can globally update the characteristics of the attacheddata items.

What you learned

Page 49: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 41

C H A P T E R 5

Defining Entities

An entity is an object about which you want to store information. Forexample, in the tutorial model the AUTHOR entity groups information likeauthor name and address.

The business problem indicates which entities you need to create. Forexample, to identify and store pictures of authors, you will create aPICTURE entity that contains all information related to pictures.

To respond to another business problem, you need to keep track of thepercentage of royalties received by each author of each title.

One title may be written by many authors, and one author may have manytitles to his or her credit. This is called a many-to-many relationship.

Because each author must be unique in the Author entity, and each Title mustbe unique in the Title entity, you will create an associative entity that has aunique occurrence for each title-author combination. You will then be able toattach a percentage to each unique case.

An entity attribute is an elementary piece of information (data item) whichyou attach to an entity. For example, Last Name is an attribute of theAUTHOR entity because it provides information about an author. You willadd a biography attribute to the AUTHOR entity.

An entity identifier is made up of one or more attributes unique to the entity,such that each value of the identifier corresponds to one, and only one,occurrence of the entity. For example, ISBN is the identifier of the TITLEentity because an ISBN uniquely identifies a title. You will assign a pictureidentification number as the identifier of the PICTURE entity.

You attach a business rule to an entity as a reminder of the conditionsattached to the entity. You will attach the business rule you created in thepreceding lesson to one of the entities.

About entities

Why create anentity

Why create anassociative entity

About entityattributes

About entityidentifiers

Attaching businessrules to entities

Page 50: POWER DESIGNER CONCEPTUAL MODEL

Create an entity

42 PowerDesigner

In this chapter you will:

♦ Create an entity

♦ Create an associative entity

♦ Define entity attributes

♦ Designate an identifier

♦ Attach a business rule to an entity

How long will it take?About 15 minutes

What you will do

Page 51: POWER DESIGNER CONCEPTUAL MODEL

Chapter 5 Defining Entities

CDM Getting Started 43

Create an entityYou will create an entity that contains information related to pictures, anentity that associates titles to authors, and two entities that differentiate titlecategories: periodicals and non-periodicals.

1 Click the Entity tool in the tool palette.

2 Click 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 numberis assigned to the entity in the order of creation.

3 Click the Pointer tool in the tool palette.

4 Double-click the symbol of the entity you just created.

The entity property sheet appears.

5 Type Picture in the Name box.

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

Page 52: POWER DESIGNER CONCEPTUAL MODEL

Create an entity

44 PowerDesigner

6 Click OK.

The entity displays the name Picture.

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

7 Select Model→Entities.

The List of Entities dialog box displays existing entities.

8 Click the Add a Row tool.

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

9 Type Periodical in the Name column.

The code is automatically set equal to the name.

10 Click Apply.

The creation of the entity is committed.

Names sorted alphabeticallyWhen you click Apply or OK, all names in the list are sortedalphabetically. The order of appearance of the names in the list willtherefore change.

11 Click the Add a Row tool.

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

12 Type Nonperiodical in the Name column.

13 Click Apply.

The creation of the entity is committed.

Page 53: POWER DESIGNER CONCEPTUAL MODEL

Chapter 5 Defining Entities

CDM Getting Started 45

The new entities appear in the list.

14 Click OK.

The new entities appear in the CDM.

Moving entity symbolsWhen you create entities from the list, they will not be arranged asshown above. You do not control the insert position of the symbols.You can move an entity symbol by selecting it and dragging it to anew position.

In this section, you learned how to:

♦ Use the statement of the business problem to decide what entities youneed to create

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

♦ Create an entity in the list of entities

What you learned

Page 54: POWER DESIGNER CONCEPTUAL MODEL

Create an associative entity

46 PowerDesigner

Create an associative entityYou will replace the existing relationship between AUTHOR and TITLEwith an associative entity. This associative entity will have a uniqueoccurrence for each title-author combination so that you can attach a royaltypercentage to each unique case.

1 Right-click the relationship that links Author and Title entities.

A relationship contextual menu appears.

2 Select Change to Entity→Standard from the contextual menu.

An entity is inserted between Author and Title entities.

Page 55: POWER DESIGNER CONCEPTUAL MODEL

Chapter 5 Defining Entities

CDM Getting Started 47

Define entity attributesYou will define entity attributes for the entities TITLEAUTHOR, PICTURE,PERIODICAL, and NONPERIODICAL by attaching one or more data itemsto each entity.

You will create entity attributes by:

♦ Adding data items to an entity

♦ Creating an entity attribute

Add data items to an entity

You will attach existing data items to the entities TITLEAUTHOR,PICTURE, PERIODICAL, and NONPERIODICAL.

1 Double-click the TitleAuthor entity.

The Entity property sheet appears.

2 Click the Attributes tab.

Page 56: POWER DESIGNER CONCEPTUAL MODEL

Define entity attributes

48 PowerDesigner

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

3 Click the Add Data Item tool.

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

4 Click the Code column heading.

This sorts the list of code items alphabetically.

Page 57: POWER DESIGNER CONCEPTUAL MODEL

Chapter 5 Defining Entities

CDM Getting Started 49

5 Select the checkbox beside the TitleAuthor Order data item.Select the checkbox beside the TitleAuthor Percent data item.

MultiselectionYou can also press the CTRL key, select different data items and thenpress the SPACE bar to automatically select the check boxescorresponding to the selected items in the list

6 Click OK.

Page 58: POWER DESIGNER CONCEPTUAL MODEL

Define entity attributes

50 PowerDesigner

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

7 Click OK.

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

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

The CDM displays these entities with their attributes.

Create an entity attribute

You will create a new Biography attribute for the text of the author'sbiography.

1 Double-click the AUTHOR entity symbol.

The Entity property sheet appears.

Page 59: POWER DESIGNER CONCEPTUAL MODEL

Chapter 5 Defining Entities

CDM Getting Started 51

2 Click the Attributes tab.

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

3 Select the Author Advance attribute.

4 Click the Insert a Row tool.

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

5 Type Author Biography in the Name column.

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

6 Scroll to the right and click the Domain column.Select LONG_NOTES from the Domain dropdown list.

Page 60: POWER DESIGNER CONCEPTUAL MODEL

Define entity attributes

52 PowerDesigner

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

7 Click OK.

The Author entity displays its new attribute.

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

What you learned

Page 61: POWER DESIGNER CONCEPTUAL MODEL

Chapter 5 Defining Entities

CDM Getting Started 53

Designate an identifierAn identifier is an entity attribute that uniquely identifies each occurrence ofthe entity.

You will designate Picture ID as the identifier of the PICTURE entity.

1 Double-click the PICTURE entity symbol.

The Entity property sheet appears.

2 Click the Attributes tab.

The Attributes page appears.

3 Click the Picture ID attribute.

An arrow appears at the beginning of the line.

4 Click the Properties tool.

orDouble click the arrow at the beginning of the line.

The Picture ID property sheet appears.

Page 62: POWER DESIGNER CONCEPTUAL MODEL

Designate an identifier

54 PowerDesigner

5 Select the Primary Identifier checkbox in the bottom part of the dialogbox.

6 Click OK.

You return to the Attributes page.

7 Scroll to the right until the M (mandatory) and P (primary identifier)columns are visible.

List column is not visibleIf a list column is not visible, click the Customize Columns and Filtertool from the toolbar. A selection box appears listing the all thecolumns that be displayed in the list. Select the appropriate checkboxfor the column that is not displayed, then click OK. The columnappears in the list.

Page 63: POWER DESIGNER CONCEPTUAL MODEL

Chapter 5 Defining Entities

CDM Getting Started 55

In the Picture ID line, checks in the P column and the M column indicatethat this attribute is a primary identifier and a mandatory attribute,respectively.

8 Scroll back to the Name column.

9 Click the Picture attribute.

An arrow appears at the beginning of the line.

10 Click the Properties tool.

orDouble click the arrow at the beginning of the line.

The Picture property sheet appears.

11 Select the Mandatory checkbox in the bottom part of the dialog box.

12 Click OK.

You return to the Attributes page.

13 Scroll to the right until the M column is visible.

A check appears in the M column of the Picture attribute. This means theattribute is mandatory. In other words, each occurrence of the Pictureentity must include a picture.

14 Click OK.

Page 64: POWER DESIGNER CONCEPTUAL MODEL

Designate an identifier

56 PowerDesigner

The Picture ID attribute is underlined in the PICTURE entity symbol toindicate that it is the identifier.

In this section, you learned how to:

♦ Designate an entity attribute as an identifier

♦ Make an entity attribute mandatory

What you learned

Page 65: POWER DESIGNER CONCEPTUAL MODEL

Chapter 5 Defining Entities

CDM Getting Started 57

Attach a business rule to an entityYou will attach the Author Percent business rule to the TITLEAUTHORentity to remind you of the role of this entity in the calculation of authorroyalties.

1 Click the Properties tool in the tool palette.Click the TitleAuthor entity symbol.

The Entity property sheet appears.

2 Click the Rules tab.

The Rules page appears. It lists the business rules associated with theentity. The list is empty.

3 Click the Add Rules tool.

A selection box appears. This lists all the available business rules.

4 Select the Author Percent checkbox.

5 Click OK.

Page 66: POWER DESIGNER CONCEPTUAL MODEL

Attach a business rule to an entity

58 PowerDesigner

You return to the Rules page. Author Percent appears in the list.

6 Click OK.

The business rule is attached to the entity. You return to the modelwindow.

In this section, you learned how to:

♦ Attach a business rule to a particular entity in the CDM

♦ Use a business rule as a reminder of the role of an object in solving abusiness problem

What you learned

Page 67: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 59

C H A P T E R 6

Defining Relationships

A relationship is a named association between entities. It expresses the factthat two entities are somehow related. For example, in the tutorial model, arelationship links the entities PUBLISHER and TITLE because publisherspublish books. An entity can have a relationship with itself, called a reflexiverelationship.

Cardinality indicates the maximum number of instances (one or many) ofone entity in relation to another. To determine the cardinality of arelationship, ask the following question about each entity in the relationship,"Can more than one occurrence of this entity exist for one occurrence of theother entity?"

For example, in a relationship of author-to-picture, the cardinality can be setto many because one author can be shown in several pictures. In thedirection picture-to-author, the cardinality can be set to one because a picturecan only show one author. This type of relationship is called a one-to-manyrelationship. The steps to establishing these relationships are in the Create arelationship section of this chapter.

You can define a relationship as mandatory from the point of view of one orboth of its entities. To determine if a relationship is mandatory, ask thefollowing question about each entity in the relationship, "Does an occurrenceof this entity require an occurrence of the other entity?"

For example, the relationship for DISCOUNT to STORE is mandatorybecause all discounts must be associated with a specific store. On the otherhand, the relationship from AUTHOR to PICTURE will be optional becausean author may not have any pictures on file.

In a dependent relationship one entity depends on another to uniquelyidentify it. For example, there are dependent relationships fromTITLEAUTHOR to TITLE and to AUTHOR because a unique occurrence ofTITLEAUTHOR is formed by the combination of one author and one title.

About relationships

About cardinality

About mandatoryrelationships

About dependentrelationships

Page 68: POWER DESIGNER CONCEPTUAL MODEL

Create a relationship

60 PowerDesigner

In this chapter you will:

♦ Create a one-to-many relationship

♦ Define roles in an optional relationship

How long will it take?About 10 minutes.

What you will do

Page 69: POWER DESIGNER CONCEPTUAL MODEL

Chapter 6 Defining Relationships

CDM Getting Started 61

Create a relationshipYou will create a relationship between AUTHOR and PICTURE entities.

1 Click the Pointer tool in the tool palette.

2 Drag the Picture entity symbol below the AUTHOR entity symbol.

3 Click the Relationship tool in the tool palette.

4 Click inside the AUTHOR entity and while continuing to hold down themouse button, drag the cursor to the PICTURE entity. Release the mousebutton inside the PICTURE entity.

This creates a relationship between the two entities.

The contact points of the relationship indicate that the cardinality of therelationship from AUTHOR to PICTURE is one-to-many, as follows:

♦ A single contact point on AUTHOR indicates that there is only oneauthor for each picture

Page 70: POWER DESIGNER CONCEPTUAL MODEL

Create a relationship

62 PowerDesigner

♦ Three contact points (a crow's foot) on PICTURE indicates that thesame author can have more than one picture

The circles before both termination points indicate that both sides of therelationship are optional.

You define the cardinality of a relationship in the Detail page of therelationship property sheet.

Relationship propertiesRelationships that you create using the relationship tool are one-to-many and optional. You can change these and other properties fromthe relationship property sheet.

In this section, you learned how to:

♦ Translate the links between objects in the information system intorelationships between entities

♦ Ask appropriate questions to help you decide the cardinality of arelationship

What you learned

Page 71: POWER DESIGNER CONCEPTUAL MODEL

Chapter 6 Defining Relationships

CDM Getting Started 63

Define roles in an optional relationshipYou will define an optional relationship between AUTHOR to PICTURE. Anauthor does not have to have a picture. A picture does not have to be of anauthor.

1 Click the Pointer tool in the tool palette.

2 Double-click the relationship line between AUTHOR and PICTURE.

The relationship property sheet appears:

3 Type Author Picture in the Name box.

This is the name of the relationship. The code is automatically set equalto the name.

4 Click the Detail tab.

Page 72: POWER DESIGNER CONCEPTUAL MODEL

Define roles in an optional relationship

64 PowerDesigner

The Detail page appears.

5 Type is shown in in the Role box in the "Author" to "Picture" groupbox.

This label indicates that an author is shown in a picture.

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

Page 73: POWER DESIGNER CONCEPTUAL MODEL

Chapter 6 Defining Relationships

CDM Getting Started 65

This label indicates that a picture shows an author.

7 Click OK.

The relationship appears in the model.

Page 74: POWER DESIGNER CONCEPTUAL MODEL

Define roles in an optional relationship

66 PowerDesigner

Display relationship rolesYou can display roles by selecting Tools→Display Preferences andselecting the Role checkbox in the Relationship category.

In this chapter you learned how to:

♦ Create a one-to-many relationship

♦ Define roles in an optional relationship

What you learned

Page 75: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 67

C H A P T E R 7

Using Packages and Shortcuts

A package is a defined section of a model. A package can contain the sametypes of objects that are available in a model. Using packages can help youmanage large models. For example, portions of a model representingdifferent tasks and subject areas, can be divided up into packages which canbe used by different development teams working on the same project.

You can create new objects in a package or use objects that exist in theglobal model. When you use existing objects, you create a shortcut in thepackage which references the actual object in the global model. A shortcut isa symbol that represents and references an object in another model orpackage. The referenced object is called the target object.

You can access the properties of a target object from its shortcut. This allowsyou to modify the target object in the same way that you would in the globalmodel.

For more information on packages and shortcuts, see chaptersManaging Models and Managing Shortcuts in the General Features Guide.

You will create a package containing shortcuts to the entities TITLE,PERIODICAL, and NONPERIODICAL.

In this chapter you will:

♦ Create a package

♦ Add objects to the package

How long will it take?About 5 minutes.

What you will do

Page 76: POWER DESIGNER CONCEPTUAL MODEL

Create a package

68 PowerDesigner

Create a packageYou will start by creating a package.

1 Click the Package symbol in the Palette.

2 Click an empty space in the diagram.

The Package symbol appears in the diagram.

3 Right-click the mouse button to release the Package tool.

4 Double-click the new package symbol.

The package property sheet appears. A default name and code areentered.

A default name and code appearWhen you create a new object, a default name and code areautomatically entered in the property sheet . If the default name isselected it disappears when you start to type the object name. If thedefault name is not selected, select it and either type the new objectname, or delete the default name before typing the new object name.

Page 77: POWER DESIGNER CONCEPTUAL MODEL

Chapter 7 Using Packages and Shortcuts

CDM Getting Started 69

5 Type Title Categories in the Name box.

6 Click OK.

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

Page 78: POWER DESIGNER CONCEPTUAL MODEL

Open a diagram for the package

70 PowerDesigner

Open a diagram for the packageAt creation a package is simply a named object in the model. To be usefulyou need to open a diagram in the package. In the diagram you can create anduse 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 diagramwindows horizontally in the main window.

1 Right-click the Package symbol.

A contextual menu appears.

2 Select Open Diagram from the contextual menu.

A new diagram appears in the Main window.

3 Select Window→Tile Horizontally from the menu bar.

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

Page 79: POWER DESIGNER CONCEPTUAL MODEL

Chapter 7 Using Packages and Shortcuts

CDM Getting Started 71

Using the object browserAll the objects that are contained in the current workspace arerepresented in the Browser tree view. For this tutorial you areworking with the graphical tools and the diagram windows. However,you can also use the Browser to create, delete, and manipulate modelobjects. For more information on using the Browser, see chapterUsing the Browser in the General Features guide.

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 windowshorizontally to make it easier to work with the two diagrams

What you learned

Page 80: POWER DESIGNER CONCEPTUAL MODEL

Add objects to the package

72 PowerDesigner

Add objects to the packageYou will add shortcuts for the TITLE, PERIODICAL andNONPERIODICAL entities to the package.

1 Click in the Tutorial diagram (the global model diagram).

This makes the Tutorial diagram active.

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

3 Click the TITLE, PERIODICAL and NONPERIODICAL entities whileholding down the SHIFT key.

Handles appear around the three entities.

4 Select Edit→Copy from the menu bar.

5 Click in the Title Categories diagram.

This makes the package diagram the active diagram.

6 Select Edit→Paste as Shortcut from the menu bar.

Page 81: POWER DESIGNER CONCEPTUAL MODEL

Chapter 7 Using Packages and Shortcuts

CDM Getting Started 73

The TITLE, PERIODICAL and NONPERIODICAL shortcut symbolsappear in the Title Categories diagram.

7 Arrange the shortcut symbols. The arrow at the bottom left cornerindicates that the symbol is a shortcut.

In this section, you learned how to:

♦ Select the objects you want to include in a package

♦ Add the objects to the package

What you learned

Page 82: POWER DESIGNER CONCEPTUAL MODEL

Accessing a target object from a shortcut

74 PowerDesigner

Accessing a target object from a shortcutYou can access the property sheet of a target object from its shortcut. Thisallows you to modify the target object from within a package.

1 Double-click the shortcut symbol for the TITLE entity.

The shortcut property sheet appears.

2 Click the Property button next to the Name box.

The property sheet for the TITLE table appears.

3 Click Cancel.

You return to the shortcut property sheet.

4 Click Close.

You return to the package diagram.

Select Window→CDM TUTORIAL DIAGRAM 1 to return to the Tutorialdiagram.orMinimize the package diagram windowSelect the tutorial diagram window to make it the active window.Maximize the tutorial diagram window.

Page 83: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 75

C H A P T E R 8

Defining Inheritance

Inheritance allows you to define an entity as a special case of a more generalentity. For example, you will define periodicals and non-periodicals asspecial cases of titles.

The general entity is known as the parent (or supertype) entity, and containsall of the common characteristics. In this tutorial, you will use TITLE as theparent entity.

The special case entity is known as the child (or subtype) entity, and containsall of the particular characteristics. In this tutorial, you will create two childentities, PERIODICAL and NONPERIODICAL, because they are specialcases of titles with specific attributes.

You can make an inheritance mutually exclusive. When an inheritance ismutually exclusive it means that there cannot be an occurrence of both childentities at the same time.

For example, a title can be a periodical or a non-periodical. Because it cannotbe both, it is a mutually exclusive inheritance.

In this chapter you will:

♦ Create an inheritance link

♦ Define inheritance properties

How long will it take?About 10 minutes.

About parententities

About child entities

Making childrenmutually exclusive

What you will do

Page 84: POWER DESIGNER CONCEPTUAL MODEL

Create an inheritance link

76 PowerDesigner

Create an inheritance linkYou create an inheritance link from the child entity to the parent entity. Youwill define an inheritance from the PERIODICAL and NONPERIODICALentities to the TITLE entity.

1 Select the Inheritance tool in the tool palette.

2 Click inside the NONPERIODICAL entity and while continuing to holddown the mouse button, drag the cursor to the TITLE entity. Release themouse button inside the TITLE entity.

An inheritance link appears between these entities. The link has asemicircle in the middle, and an arrow that points to TITLE, which is theparent entity. NONPERIODICAL is the child entity. The child entityinherits from its parent.

3 Click the semicircle and while continuing to hold down the mousebutton, drag the cursor to the PERIODICAL entity. Release the mousebutton inside the PERIODICAL entity.

The inheritance symbol changes accordingly.

Page 85: POWER DESIGNER CONCEPTUAL MODEL

Chapter 8 Defining Inheritance

CDM Getting Started 77

Position inheritance symbolTo arrange the position of the inheritance symbol, select thesemicircle then select Symbol→Disposition→Arrange Symbols. Theinheritance symbol moves to the center of gravity of the symbols itconnects.

In this section, you learned how to:

♦ Identify entities which are special cases of other entities

♦ Create an inheritance link between entities

What you learned

Page 86: POWER DESIGNER CONCEPTUAL MODEL

Define inheritance properties

78 PowerDesigner

Define inheritance propertiesYou will assign a name to the inheritance, make it mutually exclusive, anddefine its generation mode.

1 Click the Pointer tool in the tool palette.

2 Double-click the semicircle in the middle of the inheritance link.

The Inheritance property sheet appears.

3 Type Title inheritance in the Name box.

This is the name of the inheritance.

4 Select the Mutually Exclusive Children checkbox.

This indicates that the inheritance is mutually exclusive because a title iseither a periodical or a non-periodical, never both.

5 Click the Generation tab.

The Generation page appears.

6 Make sure the Generate Children checkbox is deselected in theGeneration Mode groupbox.

The choices you make in the Generation Mode groupbox indicate howthe inheritance will be generated in the Physical Data Model (PDM).

Page 87: POWER DESIGNER CONCEPTUAL MODEL

Chapter 8 Defining Inheritance

CDM Getting Started 79

Selecting only Generate Parent means only one table will be generatedfor all titles. In this case, you will need a specifying attribute todifferentiate occurrences of each child.

7 Type Periodical in the Name column in the Specifying Attributesgroupbox.

Periodical is the name of the specifying attribute. This specifyingattribute will generate a column named Periodical in the TITLE tablethat will result from generation. This column will indicate whether a titleis a periodical or not.

8 Click in the Data Type column.

A dropdown list arrow appears.

9 Click the dropdown list arrow.

A dropdown listbox appears.

Page 88: POWER DESIGNER CONCEPTUAL MODEL

Define inheritance properties

80 PowerDesigner

10 Select BL from the dropdown listbox.

You define a Boolean (BL) data type for the specifying attribute becausethere are only two possible choices: periodical or not.

11 Scroll to the right until the M checkbox appears.

This is the Mandatory checkbox. When selected it indicates that whenthe column Periodical is generated it can not contain NULL values.

12 Select the M checkbox.

13 Click OK.

A cross appears in the semicircle to indicate that the inheritance ismutually exclusive.

Page 89: POWER DESIGNER CONCEPTUAL MODEL

Chapter 8 Defining Inheritance

CDM Getting Started 81

In this section, you learned how to:

♦ Identify an inheritance by a name

♦ Express the fact that only one child entity can exist at a time by makingthe inheritance mutually exclusive

♦ Select a generation mode to indicate what tables to generate for theinheritance

♦ Define a specifying attribute to identify subtypes in the same table

What you learned

Page 90: POWER DESIGNER CONCEPTUAL MODEL

Define inheritance properties

82 PowerDesigner

Page 91: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 83

C H A P T E R 9

Organizing the Display

When you finish creating the CDM, you can organize the model using thegraphic display options.

In this chapter you will:

♦ Add a title box

♦ Change the color of the title box

♦ Change the color of the window

♦ Arrange the symbols

♦ Center the model on the page

♦ Print the model

How long will it take?About 15 minutes.

What you will do

Page 92: POWER DESIGNER CONCEPTUAL MODEL

Add a title box

84 PowerDesigner

Add a title boxYou will add a title box to the model. The title box contains the essentialinformation about the model.

1 Click the Title tool from the Palette.

2 Click an empty space in the diagram.

A title box appears in the diagram.

3 Drag the title box to the top of the model.

4 Right-click the title box.

5 Select Shadow from the contextual menu.

A shadow appears behind the title box. You can apply shadow to anysymbol in the model.

In this section, you learned how to:

♦ Display the model properties in a title box

♦ Apply shadow to a title box

What you learned

Page 93: POWER DESIGNER CONCEPTUAL MODEL

Chapter 9 Organizing the Display

CDM Getting Started 85

Change the color of the title box1 Right-click the title box.

2 Select Format from the contextual menu.

The Symbol Format dialog box appears.

3 Click the Fill tab.

The Fill page appears.

4 Select a color in the palette.

5 Click OK.

The title box background changes to the selected color.

For information on setting default colors for symbols in the diagram,see the General Features Guide.

Page 94: POWER DESIGNER CONCEPTUAL MODEL

Change the color of the window

86 PowerDesigner

Change the color of the windowBy changing the window color, you can change the background color of themodel.

1 Select Tools→Display Preferences.

The Display Preferences dialog box opens to the General page.

2 Click the down arrowhead at the end of the Window Color dropdownlistbox.

A dropdown color palette appears.

3 Select a color from the palette.

4 Click OK.

The model background changes to the selected color.

Page 95: POWER DESIGNER CONCEPTUAL MODEL

Chapter 9 Organizing the Display

CDM Getting Started 87

Arrange the symbolsYou will align the entity symbols on the left of the model.

1 Using the Pointer tool, draw a rectangle encompassing theTITLEAUTHOR, AUTHOR and PICTURE entity symbols.

Selecting several symbols at onceYou can also select more than one symbol at a time by pressing theSHIFT key while you click each symbol in turn.

2 Select Symbol→Align→Center on Vertical Axis from the menu bar.

This aligns the selected symbols along a central vertical axis.

3 Use the Align menu to align the other symbols.

Page 96: POWER DESIGNER CONCEPTUAL MODEL

Arrange the symbols

88 PowerDesigner

You can align your model as follows:

Page 97: POWER DESIGNER CONCEPTUAL MODEL

Chapter 9 Organizing the Display

CDM Getting Started 89

Center the model on the page1 Select View→Page View→Current Page.

This displays the entire current page in the work area. Your model maybe spread over two pages, or may be off-center.

2 Click the Grabber tool in the tool palette.

3 Click the diagram.

This selects the whole model.

4 Drag the model to the center of the page.

Page 98: POWER DESIGNER CONCEPTUAL MODEL

Print the model

90 PowerDesigner

Print the modelYou can now print the finished model.

1 Select File→Print.

The Print Graphics dialog box appears. One page is selected for printing.

2 Click OK.

Select pages to printWhen a model is spread over several pages you can select anddeselect pages for printing by clicking them. Selected pages display aturned down corner.

Page 99: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 91

C H A P T E R 1 0

Generating the PDM from the CDM

In this lesson you will generate a Physical Data Model (PDM) from aConceptual Data Model (CDM).

You generate a PDM for a particular Database Management System(DBMS). Before you generate the PDM, you must select the DBMS referredto as the target database. PowerDesigner translates the data types specified inthe CDM into the physical data types which the target database supports.

The correspondence between conceptual and physical data types is defined ina DBMS definition file. There is a DBMS definition file for each type oftarget database.

You will use a DBMS definition file that is shared with a master DBMS filein .XML format stored in the DBMS library. This file can be used by anynumber of models. Any modifications to the master DBMS definition file areavailable to all models using the DBMS in share mode.

A copy of the master DBMS definition file is saved with the model. Anymodifications made to the DBMS are only available to the current model.

When you generate a PDM, PowerDesigner also translates the followingconceptual objects into the following physical objects:

Conceptual object Physical object

Entity Table

Entity attribute Table column

Primary identifier Primary key

Relationship Reference

Identifier Alternate key

What happenswhen you generatea PDM

Shared DBMS

Copy DBMSdefinition

PDM translation

Page 100: POWER DESIGNER CONCEPTUAL MODEL

Generate the PDM

92 PowerDesigner

In this lesson you will:

♦ Generate the PDM

♦ Save and close the PDM

How long will it take?About 5 minutes.

What you will do

Page 101: POWER DESIGNER CONCEPTUAL MODEL

Chapter 10 Generating the PDM from the CDM

CDM Getting Started 93

Generate the PDM1 Select Tools→Generate Physical Data Model.

The PDM Generation Options dialog box appears.

2 Select Sybase AS Anywhere 8 from the DBMS dropdown listbox.

The dialog box proposes TUTORIAL as the default name for the PDMfile. It is the same as the CDM file name but with the extension .PDM.

3 Select the Share radio button.

You indicate to use the DBMS definition file stored in the DBMSlibrary.

4 Click the Detail tab.

The Detail page appears.

5 Select or clear the following options:

Group box Selected Item

Options Check model

Save generation dependencies

Page 102: POWER DESIGNER CONCEPTUAL MODEL

Generate the PDM

94 PowerDesigner

The model will be verified by the Check Model before generation. TheSave Generation Dependencies option determines that PowerDesignersaves the object identification tag for each object in the model. Thisoption is mainly useful when merging two PDM generated from the sameCDM.

6 Select the Selection tab.

The Selection page appears. It lists all the objects in the CDM. Bydefault, all object checkboxes are selected.

7 If all the object checkboxes are not selected, click the Select All tool.

8 Click OK.

A Result List window displays warning messages indicating that theCDM reuses certain data items for more than one entity. These warningsare informational and do not prevent PowerDesigner from generating thePDM.

9 Close the Result window when the generation process has finished.

Page 103: POWER DESIGNER CONCEPTUAL MODEL

Chapter 10 Generating the PDM from the CDM

CDM Getting Started 95

The PDM appears in the model window.

Crowded PDMIf your PDM is difficult to read because tables display too muchinformation, you can reduce the amount of information displayed byselecting Tools→Display Preferences and clearing checkboxes for theappropriate object.

Three inheritance entities resulted in one tableIn the CDM, you defined the inheritance Title Inherit to generate theparent only. In the PDM, the resulting table, Title, includes a column,Periodical, that indicates if a title is a periodical or not. It alsoincludes columns related to periodicals or non periodicals.

In this section, you learned how to:

♦ Define generation parameters according to how you want to generateobjects in the PDM

♦ Generate a PDM from a CDM

What you learned

Page 104: POWER DESIGNER CONCEPTUAL MODEL

Save and close the PDM

96 PowerDesigner

Save and close the PDMYou will save the generated PDM.

1 Select File→Save As from the menu bar.

The File Save As dialog box appears.

2 Type GENTUTOR.PDM in the File Name box.

This is the new name for the generated PDM file.

3 Click OK.

This saves your model in the GENTUTOR.PDM file.

4 Select File→Close from the menu bar.

This closes the PDM window and returns you to the CDM window.

Page 105: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 97

C H A P T E R 1 1

Managing a Model Report

In this lesson, you are going to create a report for your model using one ofthe standard templates that ship with PowerDesigner. The report will allowyou to document your model and analyze its contents.

You will focus your analysis on the Title Categories package using the ReportObject Selection dialog box.

You will then customize the report before generating it on a printed paperand in RTF and HTM files. Then you will exit PowerDesigner, after you saveyour report.

In this lesson you will:

♦ Create a model report using a standard template

♦ Focus your model analysis on the package diagram

♦ Customize the report

♦ Generate the report

♦ Save the CDM and exit PowerDesigner

How long will it take?About 10 minutes.

What you will do

Page 106: POWER DESIGNER CONCEPTUAL MODEL

Create a model report using a standard template

98 PowerDesigner

Create a model report using a standard templateYou are going to create a report for your model using the Full ConceptualReport template that ships with PowerDesigner. A report template is a filethat you can use to quickly generate a report. Several templates are deliveredwith the PowerDesigner application: Full, Standard, List depending on theinformation you want to include in your report.

For more information on templates, see section Standard reporttemplates in chapter Using the Report Editors.

1 Select Model→Reports from the model diagram window.

The List of Reports appears. It displays the alphabetical list of all reportssaved in the model. As there are no existing reports for you model, allthe tools in the List of Reports dialog box are grayed, except for the NewReport tool.

2 Select the New Report tool.

The New Report dialog box appears. It displays a default report name.

3 Type CDM report in the Report Name box.

Page 107: POWER DESIGNER CONCEPTUAL MODEL

Chapter 11 Managing a Model Report

CDM Getting Started 99

4 Select Full Conceptual Report from the Report Template dropdownlistbox.

5 Click OK.

Language in a templateEnglish is the default language in which the report is printed. Whenyou select in the Language box a template created in a languagedifferent from the one you select to create your report, only user-defined items such as Title or Text paragraph will keep the languageof the template. Other items will be displayed in the report language.For more information on languages in reports, see section Using theReport Language Editor in chapter Using the Report Editors in theReports User's Guide.

Page 108: POWER DESIGNER CONCEPTUAL MODEL

Create a model report using a standard template

100 PowerDesigner

The Report Editor window appears. It contains two panes: the AvailableItems pane, from which you can select items to include in the report, andthe Report Items pane, in which you add the items that compose yourreport. The Report Items pane is filled with the items of the template youhave selected. It contains the table of contents and all main model items.Simultaneously, the CDM report node appears under the Reports categoryin the Browser.

The table of contents is an independent item that does not containinformation about specific models or objects, its is generated when yougenerate the report. Other nodes display as books and can containmodel-dependent items (information about a model or a package, such ascard, annotation, object list, etc.) and object-dependent items(information about a specific type of object in the model).

For more information on model-dependent items and object-dependent items, see sections Model-dependent items and Object-dependent items in chapter Building Reports.

Page 109: POWER DESIGNER CONCEPTUAL MODEL

Chapter 11 Managing a Model Report

CDM Getting Started 101

6 Expand the Model information node and the Entities node in the ReportItems pane to visualize their contents.

Page 110: POWER DESIGNER CONCEPTUAL MODEL

Focus the report on the package diagram

102 PowerDesigner

Focus the report on the package diagramYou are going to modify the report object selection to focus the modelanalysis on the package diagram using the Report Object Selection dialogbox. It displays all model objects.

1 Select Report→Select Objects to open the Report Object Selection dialogbox.

2 Select Title Categories from the Select Location dropdown listbox toonly display objects of the package diagram.

All the objects are selected by default in the different tabbed pages,except for object shortcuts.

3 Click the Include Shortcuts tool to include the entity shortcuts of thepackage diagram in the report.

4 Click OK to close the dialog box.

As you selected a particular diagram, a confirmation box asks you if youwant to include non visible selected objects in the current selection.

5 Click No.

When you will generate the report, objects selection will be onlycomposed of the objects selected in the current list. Other non visibleselected objects will be ignored and deselected.

Page 111: POWER DESIGNER CONCEPTUAL MODEL

Chapter 11 Managing a Model Report

CDM Getting Started 103

Customize the reportYou are going to customize your report before you generate it.

You are going to include a title page for the entire report. The title pageprints as the first page in a report. Then you will manipulate some reportitems before you display a print preview of your report.

1 Select Report→Title Page to display the corresponding dialog box.

2 Type Report – Package Diagram in the Title box.

3 Type 1.0 in the Version box.

4 Click OK to close the dialog box.

5 Right-click the Model annotation item under the Model information nodein the Report Items pane and select Delete from the contextual menu thatappears.

The Model annotation item is no longer part of your report.

6 Repeat step 5 to delete the Entity annotation item under the Entities nodeand remove it from your report.

7 Click the Files node in the Report Items pane.

8 Double-click the Title item in the Available Items pane to add it at the lastposition under the Files node tree view in the Report Items pane.

When you add an item to the Report Items pane, the item remains in theAvailable Items pane as you can insert the same item several times in thesame report contents.

Page 112: POWER DESIGNER CONCEPTUAL MODEL

Customize the report

104 PowerDesigner

9 Double-click the Title item in the Report Items pane to display the Editordialog box.

10 Type Confidential data in the edit box and click OK.

Page 113: POWER DESIGNER CONCEPTUAL MODEL

Chapter 11 Managing a Model Report

CDM Getting Started 105

The item becomes a node in the Reports Items pane as it can containother nodes or items and looks as follows:

11 Click the Text paragraph item in the Available Items pane, and drag itover the Confidential data node in the Report Items pane.

Page 114: POWER DESIGNER CONCEPTUAL MODEL

Customize the report

106 PowerDesigner

The Text paragraph item is positioned under the Confidential data node.You can double-click the Text paragraph item to open an edit box andtype text.

12 Right-click the Text paragraph item in the Report Items pane and selectQuick View in the contextual menu that appears.

A print preview window appears to allows you to visualize what the Textparagraph item will look like when printed:

13 Press Esc to close the print preview window and return to the ReportEditor.

Page 115: POWER DESIGNER CONCEPTUAL MODEL

Chapter 11 Managing a Model Report

CDM Getting Started 107

14 Click the Print Preview tool in the Report Editor window to open the printpreview window and see what the report will look like when printed.

15 Press Esc to close the print preview window and return to the ReportEditor.

Page 116: POWER DESIGNER CONCEPTUAL MODEL

Generate the report

108 PowerDesigner

Generate the reportYou can now generate the report. You are going to generate the report on thethree possible outputs : printed paper, RTF file, HTML file.

1 Click the Print tool in the Report toolbar to generate the report on printedpaper.

The Print dialog box appears.

2 Click OK.

3 Click the Generate RTF tool in the Report toolbar to generate the report inRTF file.

A Save As dialog box appears.

4 Type Package Diagram Report in the File Name box.

5 Click Save.

A confirmation box indicates that the report has been successfullygenerated and asks you if you want to open it with your default RTFeditor.

6 Click Yes to open the report.

The report appears as follows in your default RTF editor.

7 Close the RTF editor and return to the PowerDesigner application.

8 Click the Generate HTML tool to generate the report in HTML file.

A Save As dialog box appears.

9 Type Package Diagram Report in the File Name box.

Page 117: POWER DESIGNER CONCEPTUAL MODEL

Chapter 11 Managing a Model Report

CDM Getting Started 109

10 Click Save.

A confirmation box indicates that the report has been successfullygenerated and asks you if you want to open it with your default Webbrowser.

11 Click Yes to open the report.

The report appears as follows in your default Web browser.

HTML report looks differentThe HTML report may look different in your Web navigatordepending on the CSS files that are used. These files are style sheetsthat allow you to customize HTML reports from the HTML Formatpage of the report property sheet. PowerDesigner ships with a set ofpredefined style sheets that are stored in the Resource Files\HTMLReport Style Sheets folder.For more information on CSS files, see section Customizing anHTML report in chapter Building Reports in manual Reports User'sGuide.

12 Close the Web browser and return to the PowerDesigner application.

Page 118: POWER DESIGNER CONCEPTUAL MODEL

Exit PowerDesigner

110 PowerDesigner

Exit PowerDesignerYou are going to save and close the CDM, then exit PowerDesigner. Whenyou save the model, you also save the reports it contains.

1 Select File→Save to save the BPM and the report it contains.

2 Select File→Close to close the report.

3 Select File→Close to close the model.

4 Select File→Exit.

A confirmation box asks you if you want to save the Workspace.

5 Click the No button.

You exit the PowerDesigner application. You have now completed theCDM tutorial.

In this lesson, you learned how to:

♦ Create a model report using a standard template

♦ Focus your model analysis on the package diagram

♦ Customize the report

♦ Generate the report

♦ Save the CDM and exit PowerDesigner

What you learned

Page 119: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 111

CDM Glossary

In the Merise modeling methodology an association is a connection betweenentities

Written statement specifying what the information system must do or how itmust be structured to support business needs

Data structure that contains an individual data item within a row in a PDM

Entity-relationship diagram that models the information system withoutconsidering the details of physical implementation

Named check that enforces data requirements, default values, or referentialintegrity on an entity or a entity attribute

Elementary piece of information

Set of values for which a data item is valid

Person, place, thing, or concept that has characteristics of interest to theenterprise and about which you want to store information

Elementary piece of information attached to an entity

Column or columns in a PDM whose values depend on and migrate from aprimary key, or an alternate key, in another table

Entity attribute, or a combination of entity attributes, whose values uniquelyidentify each occurrence of the entity

Special relationship that defines an entity as a special case of a more generalentity

Table-reference diagram that models the information system including thedetails of physical implementation

Column or columns whose values uniquely identify a row in a table in PDM

Window that displays the properties of an object

Link between a parent table and a child table in a PDM. A reference can linktables by shared keys or by specified columns

association

business rule

column

Conceptual DataModel (CDM)

constraint

data item

domain

entity

entity attribute

foreign key

Identifier

Inheritance

Physical DataModel (PDM)

primary key

property sheet

reference

Page 120: POWER DESIGNER CONCEPTUAL MODEL

Glossary

112 PowerDesigner

Rules governing data consistency, specifically the relationships amongprimary keys and foreign keys of different tables in a PDM

Named connection or association between entities

Sub-classification used to extend the semantics of an object without changingits structure; it can be predefined or user-defined

Collection of rows (records) in a PDM that have associated columns (fields)

referential integrity

relationship

stereotype

table

Page 121: POWER DESIGNER CONCEPTUAL MODEL

Index

CDM Getting Started 113

Aadd

data item to entity 47object to package 72title box 84

adjust display 16align symbol 87arrange symbol 87attach

business rule to entity 41, 57data item to domain 38

attributecreate 50define 47entity 41

Bbibliography viibusiness rule 23

attach to entity 41, 57create 25define 23fact 23formula 23sort 26validate 23

Ccardinality 59

one to many 59relationship 59

CDMcheck parameter 24close 110define 1, 17display 83install 4

CDM (continued)manage report 97open 16option 17preferences 17properties 20save 21, 110

centermodel 89symbol 77

check parameter 24close

CDM 110PDM 96

code for data type 30color

title box 85window 86

createbusiness rule 25data item 34domain 29entity 43, 46entity attribute 50inheritance 76package 68relationship 61

Ddata item 23

add to entity 47attach to domain 38create 34define 23diverge 19sort 35

data typecode 30default 33

default data type 33

Page 122: POWER DESIGNER CONCEPTUAL MODEL

114 PowerDesigner

defineentity 41inheritance 75, 78relationship 59, 63

deleteobject 14symbol 14

designate identifier 53detach symbol 14diagram for package 70display

adjust 16CDM 83organize 83preferences 17relationship 66

diverge domain 19domain 23

create 29data item 38define 23diverge 19enforce 19

Eenforce domain 19entity

add 47child 75create 43, 46define 41identifier 41parent 75sort 44

Ggenerate PDM 93global model 67graphic to print 90

HHTML report 108

Iidentifier 53inheritance

child 76create 76define 75, 78mutually exclusive 75parent 76property 78

install CDM 4

Mmodel

center 89create report 98print 90

move symbol 45

Nname

identifier 53relationship 63

Oobject

add to package 72delete 14

openCDM 16diagram 70

optionCDM 17define 17relationship 63

organize display 83

Ppackage 67

add object 72create 68open diagram 70

palette 10

Page 123: POWER DESIGNER CONCEPTUAL MODEL

CDM Getting Started 115

PDM 1close 96generate 93generate from CDM 91save 96

PowerDesigner application 8preference

CDM 17define 17display 17

printgraphic 90model 90preview 103report 108

propertyCDM 20define 20relationship 62

Rrelationship

cardinality 59create 61define 59, 63dependent 59display 66name 63one-to-many 61optional 62, 63property 62

reportcreate for a model 98customize 103generate 108include title page 103modify selection 102print 108save 110

RTF report 108

Ssave

CDM 21, 110PDM 96report 110

select tool 12sort

business rule 26data item 35entity 44

symbolalign 87arrange 87center 77delete 14detach 14move 45

Ttitle box

add 84color 85

include title page in a report 103tool

palette 10release 12select 12

typographic conventions vi

Wwindow color 86

Page 124: POWER DESIGNER CONCEPTUAL MODEL

116 PowerDesigner