Professional Documents
Culture Documents
PowerDesigner®
Conceptual Data Model
Getting Started
Version 11.0
DC38085-01-1100-01
Last modified: November 2004
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 its
subsidiaries.
Sybase, Inc. provides the software described in this manual under a Sybase License Agreement. The software may be used only in
accordance 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, AvantGo
Mobile Inspection, AvantGo Mobile Marketing Channel, AvantGo Mobile Pharma, AvantGo Mobile Sales, AvantGo Pylon, AvantGo
Pylon 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 Case
Management, Embedded SQL, EMS, Enterprise Application Studio, Enterprise Client/Server, Enterprise Connect, Enterprise Data
Studio, Enterprise Manager, Enterprise Portal (logo), Enterprise SQL Server Manager, Enterprise Work Architecture, Enterprise Work
Designer, 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, Fusion
Powered 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 Business
Interchange, Open Client, Open ClientConnect, Open Client/Server, Open Client/Server Interfaces, Open Gateway, Open Server, Open
ServerConnect, Open Solutions, Optima++, Orchestration Studio, Partnerships that Work, PB-Gen, PC APT Execute, PC DB-Net, PC
Net Library, PhysicalArchitect, Pocket PowerBuilder, PocketBuilder, Power++, Power Through Knowledge, power.stop, PowerAMC,
PowerBuilder, PowerBuilder Foundation Class Library, PowerDesigner, PowerDimensions, PowerDynamo, Powering the New
Economy, PowerScript, PowerSite, PowerSocket, Powersoft, PowerStage, PowerStudio, PowerTips, Powersoft Portfolio, Powersoft
Professional, PowerWare Desktop, PowerWare Enterprise, ProcessAnalyst, QAnywhere, Rapport, Relational Beans, RemoteWare,
RepConnector, Report Workbench, Report-Execute, Replication Agent, Replication Driver, Replication Server, Replication Server
Manager, Replication Toolkit, Resource Manager, RW-DisplayLib, RW-Library, SAFE, SAFE/PRO, SDF, Secure SQL Server, Secure
SQL Toolset, Security Guardian, SKILS, smart.partners, smart.parts, smart.script, SQL Advantage, SQL Anywhere, SQL Anywhere
Studio, SQL Code Checker, SQL Debug, SQL Edit, SQL Edit/TPU, SQL Everywhere, SQL Modeler, SQL Remote, SQL Server, SQL
Server 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/Server
Interfaces, 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 Server
Architecture, 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, The
Future Is Wide Open, The Learning Connection, The Model For Client/Server Solutions, The Online Information Center, The Power of
One, 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, Warehouse
Control 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 are
trademarks of Sybase, Inc. or its subsidiaries.
All other trademarks are property of their respective owners.
Contents
5 Defining Entities...............................................................41
Create an entity....................................................................... 43
Create an associative entity.................................................... 46
Define entity attributes ............................................................ 47
Add data items to an entity............................................... 47
Create an entity attribute .................................................. 50
iv PowerDesigner
About This Book
Subject This book contains step-by-step tutorials for the PowerDesigner Conceptual
Data 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
Audience This book is for anyone who will be building data models with
PowerDesigner. Some familiarity with relational databases, SQL, and design
methodology is helpful, but not required. For more information, see the
Bibliography section at the end of this chapter.
This book only contains the basics of the Conceptual Data Model. For
information on other models or aspects of PowerDesigner, consult the
following books:
Physical Data Model Getting Started To learn the basics of the PDM.
vi PowerDesigner
About This Book
Celko95
Joe Celko, Joe Celko's SQL for Smarties (Morgan Kaufmann Publishers,
Inc., 1995), 467 pages; paperbound; ISBN 1-55860-323-9.
viii PowerDesigner
C H A P T E R 1
2 PowerDesigner
Chapter 1 About the CDM Tutorial
Setting up
Before you begin, make sure that the files you need for the exercises are on
your hard disk. When you install PowerDesigner, these files are installed in
the Examples\Tutorial directory of PowerDesigner. When you have finished
with 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
4 PowerDesigner
C H A P T E R 2
6 PowerDesigner
C H A P T E R 3
You will begin the tutorial by running PowerDesigner. You will learn how to
use the tool palette.
You will open the tutorial file and assign it preferences, options, and
properties. Next, you will save it under a different name so that you can go
back and use the original model again if you want to repeat the exercises.
What you will do 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
Start PowerDesigner
♦ Click the PowerDesigner program icon.
The PowerDesigner main window appears. It contains an object browser
window docked to the left, and an output window docked to the bottom
of the main window.
8 PowerDesigner
Chapter 3 How to Begin the CDM Tutorial
The following table indicates the names and functions of each tool in the
palette:
10 PowerDesigner
Chapter 3 How to Begin the CDM Tutorial
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.
An entity symbol appears at the click position. The entity has the name
Entity_n, where n is a number assigned to the entity in the order of
creation of objects.
3 The Entity tool is still active, so click again in the CDM diagram to
create another entity.
There are now two entities in the CDM diagram.
To release a tool
A tool remains active until you release it. You can release a tool, by
selecting another tool or by clicking the right mouse button. By
default, when you click the right mouse button, the Pointer tool is
activated.
7 Click the cursor above a corner of the first entity and while continuing to
hold down the mouse button, drag the cursor so that you draw a
rectangle around the two entities.
Release the mouse button.
The entities and the relationship are selected. Handles appear around the
selection to show that they are selected.
12 PowerDesigner
Chapter 3 How to Begin the CDM Tutorial
15 Click a handle at the right edge of the text and while continuing to hold
the 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.
The Confirm Deletion message box appears, asking you how you want to
delete the selection.
Deleting objects
If you select Delete object, you erase the graphic symbol and delete
the object from the model. If you select Delete Symbols Only, you
erase the graphic symbol, but keep the object in the model.
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.
14 PowerDesigner
Chapter 3 How to Begin the CDM Tutorial
What you learned 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 the
right mouse button
♦ Select all objects of a particular type
♦ Move graphic objects
♦ Create text to document the CDM
♦ Delete objects
16 PowerDesigner
Chapter 3 How to Begin the CDM Tutorial
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 Default
When you click the Set As Default button, you apply the display
preferences to the current conceptual diagram in the model, and to
any diagram of the same type you will create afterwards.
5 Select the Relationship node, under the Object View node, in the Category
tree view.
The Relationship page appears.
6 Select or clear the following options:
For each entity symbol, these preference displays the role of each
relationship 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 the
default selection).
18 PowerDesigner
Chapter 3 How to Begin the CDM Tutorial
Domain divergence
Selecting the Data type check box, without selecting the Enforce
check box, allows divergence between a domain definition and the
data items attached to it. However, when there is divergence,
PowerDesigner will propose to update the data type in all data items
using the domain
3 Click Apply.
4 Click OK.
20 PowerDesigner
Chapter 3 How to Begin the CDM Tutorial
22 PowerDesigner
C H A P T E R 4
About business A business rule is a written expression of the way a business operates. When
rules you create a business rule, you refer to the ideas set out in the business
description.
There are six types of business rules: facts, definitions, formulas, validations,
requirements and constraints:
Type of
business 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 which
increases according to the amount of sales
Validation The percentage of royalties paid to all authors of a book must
add up to 100% of the royalties
Requirement The model is designed so that total amount of royalties do
not exceed 10% of total sales
Constraint The sales start date should be inferior to the end date of the
publishing process
When you use business rules to document the CDM, they are not translated
into executable code. Business rules can be implemented as constraints in the
PDM.
About data items A data item is an elementary piece of information. For example, this CDM
contains data items for author last name and for book titles.
About domains A domain defines a standard data structure that you can apply to multiple
data items. When you modify a domain you globally update the data items
associated with the domain. This makes it easier to standardize data
characteristics and modify your model consistently when you need to make
changes.
About check Check parameters specify more precisely what values to allow for a domain
parameters or a data item. In a CDM, check parameters define standard parameters, such
as minimum, maximum, or accepted values.
What you will do In this chapter you will:
♦ Create a new business rule
♦ Create a domain
♦ Create a data item
♦ Attach a data item to a domain
24 PowerDesigner
Chapter 4 Defining Business Rules, Domains, and Data Items
An arrow appears at the start of the first blank line and a default name
and code are entered.
4 Select Validation from the dropdown list in the Rule Type column.
or
Double click the arrow at the beginning of the line.
26 PowerDesigner
Chapter 4 Defining Business Rules, Domains, and Data Items
28 PowerDesigner
Chapter 4 Defining Business Rules, Domains, and Data Items
Create a domain
You will create two domains that will define a standardized data type for
money 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 name
and code are entered.
or
Double 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 to
specify 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 stores
numbers with a fixed decimal point. Later, when you apply this domain
to the data items that are used to store amounts of money, you will see
that they inherit this data type.
30 PowerDesigner
Chapter 4 Defining Business Rules, Domains, and Data Items
11 Click OK.
You return to the domain property sheet. The value MN8,2 appears in the
Data Type dropdown listbox. MN is the code for a money data type.
Eight indicates that an amount of money can have 8 figures. Two
indicates 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 name
and code are entered.
14 Type Percent in the Name column.
This is the name of the domain. The equivalent code is entered in the
Code 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.
32 PowerDesigner
Chapter 4 Defining Business Rules, Domains, and Data Items
or
Double 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 to
specify 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 data
type. The Length and Precision boxes are not available because you do
not need to specify a length and precision for the short integer data type.
20 Click OK in each of the dialog boxes.
An arrow appears at the start of the first blank line and a default name
and code are entered.
34 PowerDesigner
Chapter 4 Defining Business Rules, Domains, and Data Items
or
Double 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 of
the dialog box.
This applies the data type of the Percent domain to the data item. In the
Data 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 name
and code are entered.
10 Type TitleAuthor Order in the Name column.
This is the name of the data item. The equivalent code is entered in the
Code 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.
or
Double 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.
36 PowerDesigner
Chapter 4 Defining Business Rules, Domains, and Data Items
This gives the TitleAuthor Order data item an Integer data type.
38 PowerDesigner
Chapter 4 Defining Business Rules, Domains, and Data Items
The data items Author Advance, Royalty Amount, Sales Amount, and
Title Price which before had different data types, now inherit a
standardized data type from the Amount domain.
6 Click the number of the data item Discount Percent and select PERCENT
from the dropdown listbox in the Domain column.
7 Click OK.
What you learned In this section, you learned how to ensure data consistency by attaching data
items to domains.
It is good practice to attach data items to domains. By doing so, when you
modify a domain you can globally update the characteristics of the attached
data items.
40 PowerDesigner
C H A P T E R 5
Defining Entities
About entities An entity is an object about which you want to store information. For
example, in the tutorial model the AUTHOR entity groups information like
author name and address.
Why create an The business problem indicates which entities you need to create. For
entity example, to identify and store pictures of authors, you will create a
PICTURE entity that contains all information related to pictures.
Why create an To respond to another business problem, you need to keep track of the
associative entity percentage of royalties received by each author of each title.
One title may be written by many authors, and one author may have many
titles 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 must
be unique in the Title entity, you will create an associative entity that has a
unique occurrence for each title-author combination. You will then be able to
attach a percentage to each unique case.
About entity An entity attribute is an elementary piece of information (data item) which
attributes you attach to an entity. For example, Last Name is an attribute of the
AUTHOR entity because it provides information about an author. You will
add a biography attribute to the AUTHOR entity.
About entity An entity identifier is made up of one or more attributes unique to the entity,
identifiers 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 TITLE
entity because an ISBN uniquely identifies a title. You will assign a picture
identification number as the identifier of the PICTURE entity.
Attaching business You attach a business rule to an entity as a reminder of the conditions
rules to entities attached to the entity. You will attach the business rule you created in the
preceding lesson to one of the entities.
42 PowerDesigner
Chapter 5 Defining Entities
Create an entity
You will create an entity that contains information related to pictures, an
entity that associates titles to authors, and two entities that differentiate title
categories: periodicals and non-periodicals.
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.
6 Click OK.
The entity displays the name Picture.
You created this entity by first creating its symbol, then identifying it
from a property sheet. You can also create entities from the list of
entities.
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 name
and 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.
An arrow appears at the start of the first blank line and a default name
and code are entered.
12 Type Nonperiodical in the Name column.
13 Click Apply.
The creation of the entity is committed.
44 PowerDesigner
Chapter 5 Defining Entities
14 Click OK.
The new entities appear in the CDM.
46 PowerDesigner
Chapter 5 Defining Entities
The Attributes page appears. It lists the attributes associated with the
entity. The list is empty because the entity does not have any associated
attributes.
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.
48 PowerDesigner
Chapter 5 Defining Entities
Multiselection
You can also press the CTRL key, select different data items and then
press the SPACE bar to automatically select the check boxes
corresponding to the selected items in the list
6 Click OK.
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 data
items), PERIODICAL (Periodical Format and Periodical Pub Frequency
data items), and NONPERIODICAL (Book Collection data item).
The CDM displays these entities with their attributes.
50 PowerDesigner
Chapter 5 Defining Entities
A blank line is inserted above the Author Advance line. A default name
is entered.
The text data type (TXT) appears in the Data Type column.
7 Click OK.
The Author entity displays its new attribute.
52 PowerDesigner
Chapter 5 Defining Entities
Designate an identifier
An identifier is an entity attribute that uniquely identifies each occurrence of
the 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.
or
Double click the arrow at the beginning of the line.
The Picture ID property sheet appears.
5 Select the Primary Identifier checkbox in the bottom part of the dialog
box.
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.
54 PowerDesigner
Chapter 5 Defining Entities
In the Picture ID line, checks in the P column and the M column indicate
that this attribute is a primary identifier and a mandatory attribute,
respectively.
or
Double 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 the
attribute is mandatory. In other words, each occurrence of the Picture
entity must include a picture.
14 Click OK.
56 PowerDesigner
Chapter 5 Defining Entities
A selection box appears. This lists all the available business rules.
4 Select the Author Percent checkbox.
5 Click OK.
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 model
window.
What you learned 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 a
business problem
58 PowerDesigner
C H A P T E R 6
Defining Relationships
About relationships A relationship is a named association between entities. It expresses the fact
that two entities are somehow related. For example, in the tutorial model, a
relationship links the entities PUBLISHER and TITLE because publishers
publish books. An entity can have a relationship with itself, called a reflexive
relationship.
About cardinality Cardinality indicates the maximum number of instances (one or many) of
one entity in relation to another. To determine the cardinality of a
relationship, ask the following question about each entity in the relationship,
"Can more than one occurrence of this entity exist for one occurrence of the
other entity?"
For example, in a relationship of author-to-picture, the cardinality can be set
to many because one author can be shown in several pictures. In the
direction picture-to-author, the cardinality can be set to one because a picture
can only show one author. This type of relationship is called a one-to-many
relationship. The steps to establishing these relationships are in the Create a
relationship section of this chapter.
About mandatory You can define a relationship as mandatory from the point of view of one or
relationships both of its entities. To determine if a relationship is mandatory, ask the
following question about each entity in the relationship, "Does an occurrence
of this entity require an occurrence of the other entity?"
For example, the relationship for DISCOUNT to STORE is mandatory
because all discounts must be associated with a specific store. On the other
hand, the relationship from AUTHOR to PICTURE will be optional because
an author may not have any pictures on file.
About dependent In a dependent relationship one entity depends on another to uniquely
relationships identify it. For example, there are dependent relationships from
TITLEAUTHOR to TITLE and to AUTHOR because a unique occurrence of
TITLEAUTHOR is formed by the combination of one author and one title.
60 PowerDesigner
Chapter 6 Defining Relationships
Create a relationship
You 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.
The contact points of the relationship indicate that the cardinality of the
relationship from AUTHOR to PICTURE is one-to-many, as follows:
♦ A single contact point on AUTHOR indicates that there is only one
author for each picture
Relationship properties
Relationships that you create using the relationship tool are one-to-
many and optional. You can change these and other properties from
the relationship property sheet.
62 PowerDesigner
Chapter 6 Defining Relationships
64 PowerDesigner
Chapter 6 Defining Relationships
7 Click OK.
The relationship appears in the model.
66 PowerDesigner
C H A P T E R 7
Create a package
You will start by creating a package.
1 Click the Package symbol in the Palette.
68 PowerDesigner
Chapter 7 Using Packages and Shortcuts
6 Click OK.
You return to the diagram. The new name for the package appears in the
symbol.
70 PowerDesigner
Chapter 7 Using Packages and Shortcuts
72 PowerDesigner
Chapter 7 Using Packages and Shortcuts
7 Arrange the shortcut symbols. The arrow at the bottom left corner
indicates that the symbol is a shortcut.
74 PowerDesigner
C H A P T E R 8
Defining Inheritance
3 Click the semicircle and while continuing to hold down the mouse
button, drag the cursor to the PERIODICAL entity. Release the mouse
button inside the PERIODICAL entity.
The inheritance symbol changes accordingly.
76 PowerDesigner
Chapter 8 Defining Inheritance
78 PowerDesigner
Chapter 8 Defining Inheritance
Selecting only Generate Parent means only one table will be generated
for all titles. In this case, you will need a specifying attribute to
differentiate occurrences of each child.
7 Type Periodical in the Name column in the Specifying Attributes
groupbox.
Periodical is the name of the specifying attribute. This specifying
attribute will generate a column named Periodical in the TITLE table
that will result from generation. This column will indicate whether a title
is a periodical or not.
You define a Boolean (BL) data type for the specifying attribute because
there 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 when
the 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 is
mutually exclusive.
80 PowerDesigner
Chapter 8 Defining Inheritance
82 PowerDesigner
C H A P T E R 9
When you finish creating the CDM, you can organize the model using the
graphic display options.
What you will do 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
84 PowerDesigner
Chapter 9 Organizing the Display
2 Click the down arrowhead at the end of the Window Color dropdown
listbox.
A dropdown color palette appears.
3 Select a color from the palette.
4 Click OK.
The model background changes to the selected color.
86 PowerDesigner
Chapter 9 Organizing the Display
88 PowerDesigner
Chapter 9 Organizing the Display
2 Click OK.
90 PowerDesigner
C H A P T E R 1 0
In this lesson you will generate a Physical Data Model (PDM) from a
Conceptual Data Model (CDM).
What happens You generate a PDM for a particular Database Management System
when you generate (DBMS). Before you generate the PDM, you must select the DBMS referred
a PDM to as the target database. PowerDesigner translates the data types specified in
the CDM into the physical data types which the target database supports.
The correspondence between conceptual and physical data types is defined in
a DBMS definition file. There is a DBMS definition file for each type of
target database.
Shared DBMS You will use a DBMS definition file that is shared with a master DBMS file
in .XML format stored in the DBMS library. This file can be used by any
number of models. Any modifications to the master DBMS definition file are
available to all models using the DBMS in share mode.
Copy DBMS A copy of the master DBMS definition file is saved with the model. Any
definition modifications made to the DBMS are only available to the current model.
PDM translation When you generate a PDM, PowerDesigner also translates the following
conceptual objects into the following physical objects:
92 PowerDesigner
Chapter 10 Generating the PDM from the CDM
The model will be verified by the Check Model before generation. The
Save Generation Dependencies option determines that PowerDesigner
saves the object identification tag for each object in the model. This
option is mainly useful when merging two PDM generated from the same
CDM.
6 Select the Selection tab.
The Selection page appears. It lists all the objects in the CDM. By
default, 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 the
CDM reuses certain data items for more than one entity. These warnings
are informational and do not prevent PowerDesigner from generating the
PDM.
9 Close the Result window when the generation process has finished.
94 PowerDesigner
Chapter 10 Generating the PDM from the CDM
Crowded PDM
If your PDM is difficult to read because tables display too much
information, you can reduce the amount of information displayed by
selecting Tools→Display Preferences and clearing checkboxes for the
appropriate object.
96 PowerDesigner
C H A P T E R 1 1
In this lesson, you are going to create a report for your model using one of
the standard templates that ship with PowerDesigner. The report will allow
you to document your model and analyze its contents.
You will focus your analysis on the Title Categories package using the Report
Object Selection dialog box.
You will then customize the report before generating it on a printed paper
and in RTF and HTM files. Then you will exit PowerDesigner, after you save
your report.
What you will do 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
98 PowerDesigner
Chapter 11 Managing a Model Report
5 Click OK.
Language in a template
English is the default language in which the report is printed. When
you select in the Language box a template created in a language
different from the one you select to create your report, only user-
defined items such as Title or Text paragraph will keep the language
of the template. Other items will be displayed in the report language.
For more information on languages in reports, see section Using the
Report Language Editor in chapter Using the Report Editors in the
Reports User's Guide.
The Report Editor window appears. It contains two panes: the Available
Items pane, from which you can select items to include in the report, and
the Report Items pane, in which you add the items that compose your
report. The Report Items pane is filled with the items of the template you
have selected. It contains the table of contents and all main model items.
Simultaneously, the CDM report node appears under the Reports category
in the Browser.
100 PowerDesigner
Chapter 11 Managing a Model Report
6 Expand the Model information node and the Entities node in the Report
Items pane to visualize their contents.
102 PowerDesigner
Chapter 11 Managing a Model Report
9 Double-click the Title item in the Report Items pane to display the Editor
dialog box.
10 Type Confidential data in the edit box and click OK.
104 PowerDesigner
Chapter 11 Managing a Model Report
The item becomes a node in the Reports Items pane as it can contain
other nodes or items and looks as follows:
11 Click the Text paragraph item in the Available Items pane, and drag it
over the Confidential data node in the Report Items pane.
The Text paragraph item is positioned under the Confidential data node.
You can double-click the Text paragraph item to open an edit box and
type text.
12 Right-click the Text paragraph item in the Report Items pane and select
Quick View in the contextual menu that appears.
A print preview window appears to allows you to visualize what the Text
paragraph item will look like when printed:
13 Press Esc to close the print preview window and return to the Report
Editor.
106 PowerDesigner
Chapter 11 Managing a Model Report
14 Click the Print Preview tool in the Report Editor window to open the print
preview window and see what the report will look like when printed.
15 Press Esc to close the print preview window and return to the Report
Editor.
108 PowerDesigner
Chapter 11 Managing a Model Report
10 Click Save.
A confirmation box indicates that the report has been successfully
generated and asks you if you want to open it with your default Web
browser.
11 Click Yes to open the report.
The report appears as follows in your default Web browser.
Exit PowerDesigner
You are going to save and close the CDM, then exit PowerDesigner. When
you 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 the
CDM tutorial.
110 PowerDesigner
CDM Glossary
business rule Written statement specifying what the information system must do or how it
must be structured to support business needs
column Data structure that contains an individual data item within a row in a PDM
Entity-relationship diagram that models the information system without
Conceptual Data considering the details of physical implementation
Model (CDM)
Named check that enforces data requirements, default values, or referential
constraint integrity on an entity or a entity attribute
Elementary piece of information
data item
Set of values for which a data item is valid
domain
Person, place, thing, or concept that has characteristics of interest to the
entity enterprise and about which you want to store information
Elementary piece of information attached to an entity
entity attribute
Column or columns in a PDM whose values depend on and migrate from a
foreign key primary key, or an alternate key, in another table
Entity attribute, or a combination of entity attributes, whose values uniquely
Identifier identify each occurrence of the entity
Special relationship that defines an entity as a special case of a more general
Inheritance entity
Table-reference diagram that models the information system including the
Physical Data details of physical implementation
Model (PDM)
Column or columns whose values uniquely identify a row in a table in PDM
primary key
Window that displays the properties of an object
property sheet
Link between a parent table and a child table in a PDM. A reference can link
reference tables by shared keys or by specified columns
CDM Getting Started 111
Glossary
112 PowerDesigner
Index
CDM (continued)
manage report 97
open 16
A option 17
add preferences 17
data item to entity 47 properties 20
object to package 72 save 21, 110
title box 84 center
adjust display 16 model 89
align symbol 87 symbol 77
arrange symbol 87 check parameter 24
attach close
business rule to entity 41, 57 CDM 110
data item to domain 38 PDM 96
attribute code for data type 30
create 50 color
define 47 title box 85
entity 41 window 86
create
business rule 25
data item 34
B domain 29
bibliography vii entity 43, 46
business rule 23 entity attribute 50
attach to entity 41, 57 inheritance 76
create 25 package 68
define 23 relationship 61
fact 23
formula 23
sort 26
validate 23 D
data item 23
add to entity 47
attach to domain 38
C create 34
cardinality 59 define 23
one to many 59 diverge 19
relationship 59 sort 35
CDM data type
check parameter 24 code 30
close 110 default 33
define 1, 17 default data type 33
display 83
install 4
P
package 67
H add object 72
HTML report 108 create 68
open diagram 70
palette 10
114 PowerDesigner
PDM 1 select tool 12
close 96 sort
generate 93 business rule 26
generate from CDM 91 data item 35
save 96 entity 44
PowerDesigner application 8 symbol
preference align 87
CDM 17 arrange 87
define 17 center 77
display 17 delete 14
print detach 14
graphic 90 move 45
model 90
preview 103
report 108
property T
CDM 20 title box
define 20 add 84
relationship 62 color 85
include title page in a report 103
tool
palette 10
R release 12
relationship select 12
cardinality 59 typographic conventions vi
create 61
define 59, 63
dependent 59
display 66 W
name 63 window color 86
one-to-many 61
optional 62, 63
property 62
report
create for a model 98
customize 103
generate 108
include title page 103
modify selection 102
print 108
save 110
RTF report 108
S
save
CDM 21, 110
PDM 96
report 110