Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Power Designer T Thc Nhu

GII THIU POWER DESIGNER :


Power Designer l 1 cng c ha ca cng ty SyBase h tr vic phn tch, thit k v xy
dng h thng thng tin. Power Designer cho php:
Trnh by cc m hnh bng cc k hiu ha ph hp vi cc phng php m hnh
ha trong thc t nh m hnh thc th v mi kt hp; m hnh quan h
T ng to h s m t cc i tng trn m hnh
T ng to m pht sinh CSDL v cc chc nng x l t m hnh xy dng.
Khi ng Power Designer:
Start\ All Programes\ SyBase\ Power Designer 15\ Power Designer

Obiect Browser Window: hin th cc m hnh v cc i tng trn m hnh theo cu


trc cy phn cp. Cho php di chuyn nhanh gia cc m hnh. Nt gc ca cy l
WordSpace c lu trn file vi phn m rng l ( SWS), cha thng tin mi trng
thit k hin hnh h tr cho vic m li cc m hnh sau ny.
Work Area: Vng thit k m hnh.
Output Window: hin th tin trnh thc hin mt tc v trn PowerDesigner, V d tin
trnh to m hnh d liu vt l (PDM) t m hnh quan nim d liu (CDM) s c hin
th trong window ny.
Result List : Hin th kt qu ca vic tm kim hoc kim tra m hnh.

1
Power Designer T Thc Nhu

XY DNG M HNH QUAN NIM D LIU


(Conceptual Data Model CDM)
I- VAI TR CA POWERDESIGN TRONG VIC THIT K M HNH QNDL:
Trnh by m hnh dng ha
Kim tra tnh hp l ca m hnh c thit k
Pht sinh m hnh d liu logic hay m hnh d liu vt l
II- LM VIC VI CDM:
1- To CDM mi:
(1) Chn File New Model

(2) Chn Conceptual Data Model, Sa tn m hnh v click OK.


M hnh mi s c thm vo trn khung Workspace.
2- Khai bo thuc tnh CDM
(1) Chn ModelModel Properties (hoc click phi vo tn m hnh khung Workspace)

(2) Nhp tn (Name), din gii(Comment).


2
Power Designer T Thc Nhu
(3) Click Ok
3- Lu m hnh CDM:
Chn File Save, Nhp tn file, phn m rng mc nh l CDM.
III- XY DNG M HNH:
1- Hng dn s dng nhng cng c trong Tool Palette:

Thc th

K tha Mi kt hp

Nhnh lin kt

Tool Name Action


Select symbol
Pointer
Select symbols in an area
Lasso
Select and move all symbols
Grabber
Increase view scale
Zoom In
Decrease view scale
Zoom Out
Display diagram for selected package
Open Package Diagram
Display property sheet for selected symbol
Properties
Delete Delete symbol

Package Insert package symbol


Entity Insert entity symbol
Insert relationship symbol
Relationship
Inheritance Insert inheritance symbol
Association Insert association symbol
Insert link symbol
Link
Note Insert note symbol
Insert link between a note symbol and another symbol
Note Link

3
Power Designer T Thc Nhu

Title Insert title symbol

Text Insert text

Line Draw a line

Arc Draw an arc

Rectangle Draw a rectangle

Ellipse Draw an ellipse

Rounded rectangle Draw a rounded rectangle

Link Symbol Inserts a link symbol between symbols

Polyline Draw a jagged line

Polygon Draw a polygo

2- To thc th (Entity)
SINHVIEN
Thuc tnh Kiu d liu Kch thc Ghi ch
MASV Character 10 Thuc tnh kha
TENSV Character 30
NGAYSINH Datetime
PHAI Boolean
DIACHI Character 50
LOPHOC
Thuc tnh Kiu d liu Kch thc Ghi ch
MALOP Character 10 Thuc tnh kha
TENLOP Character 30
SISO Integer
(1) Click chn biu tng thc th, v click vo trong lc . Click phi kt thc.
(2) Khai bo thng tin ca thc th:
Double-click vo thc th, mt ca s mi m ra cho php chng ta chnh sa thng
tin ca thc th nh: tn ca thc th, thuc tnh ca thc th, cc rule,.

4
Power Designer T Thc Nhu

Th General:
Name Tn thc th. Tn ny hin th trn m hnh
Code Tn tt ca thc th. Tn ny c dng khi chuyn sang CSDL vt l
Comment Din gii v thc th
Number S mu tin s lu tr trong thc th
Generate table c chn nu entity s c chuyn thnh table trong PDM
Th trang Attributes : Khai bo thuc tnh ca thc th

Name: Tn thuc tnh c hin th trn s


Code: Tn tt thuc tnh
5
Power Designer T Thc Nhu
Data Type: Kiu d liu, nh numeric, alphanumeric, boolean,
Domain: Tn ca associated domain
M (Mandatory): Not Null hay khng
P(Primary Indentifier): Kha chnh hay khng?
D(Displayed): Hin th thuc tnh trong s hay khng?
Ch :
Nu khng chn mc Unique Code trong hp thoi Model Options th bn c th t trng
M cho cc mc d liu khc nhau. (Tools Model Options)
Nu bn chn Allow Reuse th s dng mt Data Item lm thuc tnh cho nhiu thc th. Tuy
nhin, thuc tnh khng th dng lm thuc tnh kha ca Thc th.
Nu bn chn c hai mc trn th khi bn g tn ca mc d liu c th s t ng dng li
mc d liu .

3- To mi kt hp gia cc thc th:


Gi s ta c mi kt hp gia hai thc th sau:

(1) Click chn biu tng Association, v click vo trong lc . Click phi kt thc.
(2) Khai bo thng tin ca mi kt hp: ging nh khai bo thng tin ca thc th.
(3) V nhnh lin kt gia thc th v mi kt hp: Click chn biu tng Link, ko th t
thc th n mi kt hp. Click phi kt thc.
(4) Khai bo bn s (Cardinality) mi nhnh ca mi kt hp: Double click vo ng Link.
Chn hay nhp bn s trong mc Cardinality.
Role :Nhn din gii
vai tr ca link
Identifier: c
chn nu thc th
c kt ni l thc
th ph thuc bi
mt thc th khc
Cardinality: Bn s
mi nhnh ca mi
kt hp.

6
Power Designer T Thc Nhu
4- Khai bo mi kt hp qui:
V d: Khai bo MKH th hin quy tc mi mn hc c th c mt hay nhiu mn hc tin
quyt cn hc trc:

Kt qu ca m hnh trn khi chuyn qua m hnh PDM.

5- Khai bo thc th ph thuc :


V d: Thc th KQHTMOINAM (kt qu hc tp mi nm) l thc th ph thuc ca thc th
SINHVIEN c kha l {MASV, NAM}
(1) To m hnh sau:

(2) Double click ng Link bn nhnh ca thc th KQHTMOINAM v chn mc Identifier.

Bn s ca nhnh c bao trong ngoc

Khi chuyn sang PDM ta c kt qu sau:

7
Power Designer T Thc Nhu

6- Khai bo mi kt hp cp 2:
V d bn cn biu din mi kt hp cp 2 KETQUAHOCTAP lin kt gia thc th
SINHVIEN, LANTHI, v mi kt hp CHUONGTRINHHOC nh m hnh v tay nh sau:

Cc bc thc hin:
(1) To cc thc th v mi kt hp nh s sau:

(2) Click phi vo mi kt hp CHUONGTRINHHOC v chn mc Change to Entity


(3) To Link gia thc th CHUONGTRINHHOC v mi kt hp KETQUAHOCTAP

8
Power Designer T Thc Nhu

Ch : Khi bn chuyn i m hnh ny sang PDM s xut hin 1 li (Error) do thc th


CHUONGTRINHHOC khng c thuc tnh v mt cnh bo (Warning) do thc th
CHUONGTRINHHOC ny khng c thuc tnh kha:

Bn ch cn chn Tools Check Model v b chn khng cho kim tra 2 c trng ny.

9
Power Designer T Thc Nhu

7- Khai Bo MKH k tha (Inheritance)

(1) Click cng c Inheritance link trong thanh Palette


(2) Drag and drop t thc th con n thc th cha. S sinh ra MKH k tha c tn l Inhr_n.
(3) Nu mun khai bo thm thc th con th drag and drop t k hiu hnh bn nguyt ti
thc th con c thm.
Nu mun thay i tn v khai bo cc c tnh ca n th bm p vo hnh bn nguyt, s
xut hin hp thoi inheritance properties.
Th trang General:

10
Power Designer T Thc Nhu

Property Description
Name Tn gi ca MKH inheritance
Code M ca MKH inheritance
Parent Tn ca loi thc th cha
Mutually Ch nh mt thc th cha ch tng ng vi mt thc th con.
exclusive V d: Loi thc th Person c 2 loi thc th con l Male v Female, mi thc th
children Person hoc l Male hoc l Female.
Chn la ny ch th hin trn h s thit k ch khng th hin khi chuyn sang PDM.

Complete Ch nh mi thc th cha phi thuc v mt thc th con.

Trang Generation :
Ch nh cch thc chuyn i cu trc k tha sang m hnh PDM

11
Power Designer T Thc Nhu

Trng hp ch chn Generate Parent m khng chn Generate Children:


Th s to mt Table tng ng vi thc th cha v cha thm cc thuc tnh ca thc th con.
Cc MKH trn cc thc th con s c th hin trn Table .
Trong trng hp ny bn c th khai bo thm cc thuc tnh c bit cho table cha c
to.
V d : thuc tnh nhn dng loi nhn vin l nhn vin hnh chnh hay cng nhn sn xut.

Trng hp ch chn Generate Children m khng chn Generate Parent:


Khi bn cn ch nh thuc tnh bng cha ghi trn bng con:
Inherit all attributes: cha thm cc thuc tnh ca thc th cha
Inherit only primary attributes: Ch cha thm nhng thuc tnh nhn dng ca thc
th cha
Khi chuyn sang PDM, Power Designer s to cc table tng ng vi cc thc th con. Cc
MKH vi thc th cha s th hin trn table con.

12
Power Designer T Thc Nhu

Trng hp bn chn c 2:
Khi chuyn sang PDM, Kha chnh ca bng con c kt hp (concatenation) bi thuc tnh
nhn dng ca thc th cha v ca thc th con.

13
Power Designer T Thc Nhu
IV- KIM TRA M HNH:
(1) Chn Tools Check
Model (F4).
Xut hin hp Check
Conceptual Data Model

(2) Chn hay b chn


nhng i tng cn
kim tra li v ch

(3) Click OK. Kt qu kim tra s hin


trong khung Output. i tng v
thuc tnh b li s hin trong khung
Result List.

14
Power Designer T Thc Nhu
Trng hp m hnh c li, bn c th xem chi tit thng bo li hoc chuyn nhanh n i
tng b li bng cch: click phi vo dng thng bo trong hp thoi Result List v chn:
(1) Detail xem chi tit li
(2) Correct m ca s thuc tnh ca i tng b li chnh sa.
(3) Recheck kim tra li m hnh sau khi hiu chnh
V- NH DNG M HNH:
Mc ch thay i hnh thc hin th ca cc i tng bn trong m hnh
Chn ToolsDisplay Preferences
Trong mc Content: Ch nh cc thng tin thuc tnh cn hin th trn mi loi i tng.

Trong mc Format: chn loi i tng, click nt Modify nh dng mu sc, Font ch
cho mi loi i tng.

15
Power Designer T Thc Nhu

VI- CHUYN I M HNH CDM SANG M HNH VT L PHYSICAL DATA


MODEL(PDM)
(1) Chn Tools Generate
Physical Data Model hoc
s dng phm tt
Ctrl+Shift+P.
(2) Trang General, Chn H
qun tr (DBMS) dng
lu tr database sau ny
Mc Generate new PDM:
dng to m hnh PDM
mi
Mc Update existing PDM:
dng cp nht PDM to.
Nu chn mc Preserve
modifications th PDM
mi c trn vi PDM c,
nu khng chn th PDM
mi s thay th PDM ang
tn ti

16
Power Designer T Thc Nhu
(3) Trang Detail, ch nh cch
t tn Table, cc rng
buc kha chnh, kha ph,
kha ngoi

(4) Trang Selection, chn cc


i tng cn chuyn i
sang PDM.

(5) Click OK thc hin

17
Power Designer T Thc Nhu
VII- TO REPORT:
1- To bo co cc thnh phn ca m hnh bng Report wizard:
(1) M m hnh cn to bo co
(2) Chn Report Report Wizard (CtrlF12). Ln lc khai bo theo tng hp thoi
Hp thoi 1:
t tn report
Chn ngn ng

Hp thoi 2:
Chn nh
dng cho bo
co, file RTF
hoc HTML.
Chn mu
trnh by bo
co

18
Power Designer T Thc Nhu
Hp thoi 3:
Chn thng tin
cn bo co.

Hp thoi 4:
Chn cc i
tng m hnh cn
bo co

19
Power Designer T Thc Nhu
Hp thoi 5:
Preview :
xem trc ni
dung bo co
M mn hnh
thit k bo
co
To file cha
bo co

2- M Report:
Click phi vo tn Report v chn hnh thc :
- Open Diagram: M mn hnh chn la cc i tng cn hin trn bo co. Trn khung
Available Items, Click phi vo i tng cn thm vo Report v chn ADD.
- Generate (HTML hay RTF) dng to file cha bo co.

VIII- CCH CHUYN I M HNH PDM SANG DATABASE CA MICROSOFT


SQL SERVER
Bc 1: To CSDL mi trong SQL Server
(1) Connect v login vo SQL Server.
(2) To CSDL mi cha cc i tng c to t m hnh PDM
Bc 2: To kt ni t Power Designer n CSDL trn SQL Server. T m hnh vt l:

20
Power Designer T Thc Nhu

(1) Chn Database


Connect. Mt ca s
connect xut hin nh
sau:
(2) To kt ni qua mt
ODBC:
Chn mc ODBC
machine data source
v click nt
Configure
lc mt mn hnh
ODBC Data Source
Administrator xut hin
nh sau:

(3) Nhn nt
Add Data
Source, ca
s Create
Data Source
xut hin.

21
Power Designer T Thc Nhu
(4) Chn kiu
data source

(5) Chn trong


listbox SQL
Native
Client

22
Power Designer T Thc Nhu
(6) Nhn nt
Finish, xut
hin ca s
Create a
new data
source to
SQL Server

- Name: Nhp
tn Data
Source
- Description
khng cn
phi in,
- Server: chn
tn server

(7) Nhn nt
Next, sang
ca s chn
kiu kt ni
n SQL
Server:

23
Power Designer T Thc Nhu
(8) Nhn nt
Next, sang
mn hnh
cho php ch
nh CSDL
cn kt ni:

(9) Ch nh
CSDL cn
kt ni v
nhn tip nt
Next

24
Power Designer T Thc Nhu
(10) mc
nh cc gi
tr ta tip
tc.
Nhn
Finish, th
ca s
ODBC
Microsoft
SQL Server
Setup xut
hin nh
sau:

(11) Nhn vo Test Data Source,


mt mn hnh thng bo kt
qu connect c thnh cng hay
khng? Sau y l mn hnh
thng bo connect thnh
cng

25
Power Designer T Thc Nhu
(12) Sau ta nhn nt OK lin
tip nhau quay v mn hnh
Connect ban u.

(13) Click nt
Ok

(14) mn hnh connect ban u


chng ta chn li kt ni ODBC
to l QLSV.
Nu kt ni vi giy php ca
SQL Server th trong phn Login
ta g User ID v Password
login vo SQL.

Sau ta nhn vo nt Connect.

Bc 3:
Chn DatabaseGenerate Database (Ctrl + G), ca s Database Generation xut hin, ca
s ny cho php chng ta la chn mt s tham s cn thit trc khi to database:

26
Power Designer T Thc Nhu
Chn kiu to : To file script cha cc lnh to cc i tng trong CSDL hoc to trc tip
CSDL

Sau khi la chn tham s xong, ta nhn vo nt OK.

27
Power Designer T Thc Nhu
CC I TNG TRONG M HNH QNDL:
Bao gm cc i tng sau:
Object Description
Domain Min gi tr ca mt mc d liu
Data item n v c bn ca thng tin
Entity Person, place, thing, or concept that has characteristics of interest to the
enterprise and about which you want to store information
Entity attribute Elementary piece of information attached to an entity
Relationship Named connection or association between entities
Inheritance link Special relationship that defines an entity as a special case of a more
general entity

28
Power Designer T Thc Nhu

29
Power Designer T Thc Nhu
Ph lc 1: CC KIU D LIU CHUN (Standard Data Types):
1- Numeric data types
Conceptual Code in What it stores Translation example
data type DEF file for SQL Anywhere
Integer I 32-bit integer integer
Short Integer SI 16-bit integer smallint
Long Integer LI 32-bit integer integer
Byte BT 256 values smallint
Number N Numbers with a fixed decimal point numeric
Decimal DC Numbers with a fixed decimal point decimal
Float F 32-bit floating decimal numbers float
Short Float SF Less than 32-bit floating decimal number real
Long Float LF 64-bit floating decimal numbers double
Money MN Numbers with a fixed decimal point numeric
Serial NO Automatically incremented numbers numeric
Boolean BL Two opposing values (true/false; yes/no; 1/0) numeric(1)
2- Character data types
Conceptual data type Code in What it stores Translation example
DEF file for SQL Anywhere
Characters A Character strings char
Variable Characters VA Character strings varchar
Long Characters LA Character strings varchar
Long Var Characters LVA Character strings long varchar
Text TXT Character strings long varchar
Multibyte MB Multibyte character strings char
Variable Multibyte VMB Multibyte character strings varchar
3- Time data types
Conceptual data Code in What it stores Translation example for
type DEF file SQL Anywhere
Date D Day, month, year date
Time T Hour, minute, and second time
Date & Time DT Date and time timestamp
Timestamp TS System date and time timestamp
4- Other data types
Conceptual Code in What it stores Translation example
data type DEF file for SQL Anywhere
Binary BIN Binary strings binary
Long Binary LBIN Binary strings long binary
Image PIC Images long binary
Bitmap BMP Images in bitmap format (BMP) long binary
OLE OLE OLE links long binary
Other * User-defined data type char(10)
Undefined <UNDEF> Not yet defined data type <undefined>

30
Power Designer T Thc Nhu

31
Power Designer T Thc Nhu

XY DNG M HNH VT L D LIU


I- M Hnh Vt L D Liu: (PDM)
PDM l cng c thit k database, khai bo cu trc vt l
1- Cc i tng trong MH Vt L D Liu:
A PDM graphically represents the interaction of the following objects:
Object Description
Table Bng hay lc quan h
Column thuc tnh i tng
Key Column or columns whose values uniquely identify each row in a table. A key can
be designated as a primary or alternate key
Primary key Kha chnh
Alternate key Column or columns whose values uniquely identify each row in a table, and which
is not a primary key
Foreign key Kha ngoi
Index Ch mc
Reference Mi lin kt gia kha chnh v kha ngoi ca hai bng
View Cu trc d liu c to bi truy vn SQL
Procedure Precompiled collection of SQL statements stored under a name in the database and
processed as a unit
Web service Collection of SQL statements stored in a database to retrieve relational data in
HTML, XML, WSDL or plain text format, through HTTP or SOAP requests
Web operation Sub-object of a Web service containing a SQL statement and displaying Web
parameters and result columns

1- Hiu chnh m hnh PDM:


3.1 Thay i h QTCSDL ch cho m hnh PDM:
When you create a PDM, you select a target database. If you change the target database, the
PDM is altered to become compatible with the new database.
(1) Chn Database Change Target Database.
S hin thng bo xc nhn
(2) Click Yes.
(3) Chn tn h QT mi
(4) Click OK.

32
Power Designer T Thc Nhu
Tn h QT xut hin thanh trng thi
II- 3.2 Khai bo cc c trng ca Table:
Bm p vo k hiu Table hin Table Properties.

ngha:
Property Description
Model Tn m hnh
Origin Tn thc th tng ng trong m hnh CDM
Name Tn Table
Code Tn tham chiu cho table
Label Nhn m t table
Number S dng c th c trong Table. Dng tnh ton kch thc CSDL
Primary key Tn rng buc kha chnh
constraint name
User-defined Biu th tn rng buc l do User t t
Generate table Ch nh to Table trong CSDL
3.3 Thay i danh sch thuc tnh trong table:
Click chn nt Columns

33
Power Designer T Thc Nhu

3.4 Khai bo cc c trng ca mt Tham chiu :


Bm p vo k hiu ca tham chiu.

34
Power Designer T Thc Nhu

Name Name of the reference


Code Reference name of the reference link
Constraint name Tn ca referential integrity constraint
User-defined Ch nh tn user-defined constraint
Minimum S nh nht cc th hin ca bng con ng vi 1 th hin ca bng
cha
Maximum S ln nht
Update constraint Rng buc khi sa kha chnh
Delete constraint Rng buc xa 1 dng trn bng cha
Mandatory parent Mi gi tr kha ngoi trn bng con phi tn ti trn bng cha
Change parent Gi tr foreign key trn bng con c th thay i bng mt gi tr
allowed kha chnh khc trn bng cha
Update and delete constraints
None Khng thay i bng con khi cp nht hay xa trn bng cha
Restrict Khng th cp nht hay xa gi tr trn bng cha nu gi tr kha ang c
trn bng con
Cascade Cp nht hay xa gi tr trn bng cha th s nh hng n bng con
Set null Khi Cp nht hay xa gi tr trn bng cha th s t gi tr tng ng trn
bng con l NULL
Set default Khi Cp nht hay xa gi tr trn bng cha th s t gi tr tng ng trn
bng con bng gi tr mc nh
2- Pht sinh mt Database t PDM:
(1) Chn DatabaseGenerate Database.
Hin hp Generation Parameters Schema page.
35
Power Designer T Thc Nhu
(2) G tn File script trong File Name box.
(3) G tn th mc cha File script trong hp Directory.
(4) Chn tham s to tables, indexes, views, and columns.
(5) Click th Database. Chn tham s to database.
(6) Click th Options. Ch nh script options and tnh ton vn tham chiu (referential integrity)

(7) Click nt Create Database.


A dialog box asks you to
identify a data source and connection
parameters.
(8) Chn h qun tr CSDL t combo
Data Source Name.
(9) G tn ngi dng v Password
(10) Click Connect
Nu h QTCSDL c yu cu
th tr li cc yu cu .
V d: Vi Access s yu cu
cho bit tn File MDB c ghi
d liu c pht sinh.
Mt ca s Message hin th cc thng tin trong qu trnh pht sinh Database.
(11) Click OK.

36
Power Designer T Thc Nhu
Creation parameters indicate what to generate from the database structure defined by the PDM.

The availability of these parameters depends on the target database. Unavailable parameters display
in gray and you cannot select them.

Table creation parameters

Parameter Result of selection

All tables Apply creation parameters to all tables

List Apply creation parameters to selected tables only

Create table Create table

Primary key Generate primary key for table

Foreign key Generate foreign key for table

Declarative integrity Generate declarative referential integrity for table

Alternate key Generate alternate key for table

Check Generate check parameters and validation rules for table

Physical options Generate physical options for table

Begin script Insert customized script before table creation

End script Insert customized script after table creation

Comment Generate comment containing table label or name

Drop table If table exists, drop table before creating new table

Index creation parameters

Parameter Result of selection

Create index Create index

Primary key Generate primary key index

Foreign key Generate foreign key index

37
Power Designer T Thc Nhu
Alternate key Generate alternate key index

Other indexes Generate indexes for all key columns with a defined index

Physical options Generate physical options for index

Drop index If index exists, drop index before creating new index

View creation parameters

Parameter Result of selection

All views Apply creation parameters to all views

List Apply creation parameters to selected views only

Create view Create view

Comment Generate comment containing view label or name

Drop view If view exists, drop view before creating new view

Column creation parameters

Parameter Result of selection

User-defined type Generate user-defined data types

Default value Assign default value to column at creation

Check Generate check parameters and validation rules for column

Comment Generate comment indicating column label or name

Creation parameters indicate what to generate from the database structure defined by the PDM.

The availability of these parameters depends on the target database. Unavailable parameters display
in gray and you cannot select them.

Database parameters

38
Power Designer T Thc Nhu

Parameter Result of selection

Create database Create database

Physical options Generate physical options for database

Begin script Insert customized script before database creation

End script Insert customized script after database creation

Open database Open database

Close database Close database

Drop database If database exists, drop database before creating new database

Tablespace and storage parameters

Parameter Result of selection

Create tablespace Create tablespace

Drop tablespace If tablespace exists, drop tablespace database before creating new tablespace

Create storage Create storage

Drop storage If storage exists, drop storage before creating new storage

User-defined data type parameters

Parameter Result of selection

Create data type Create user-defined data type

Check Generate check parameters and validation rules for user-define data type

Drop data type If data type exists, drop data type before creating new data type

39
Power Designer T Thc Nhu
S dng cc bng thuc tnh
Bng thuc tnh biu din cc c trng ca cc Object trong PowerDesign
Tiu ca property sheet ghi nh danh ca i tng hin th.
V d: Model Properties hay Table Properties.
Hu ht cc Property sheet u nhm cc properties trn trang:
Definition, Description, Annotation
hin Property sheet ca mt i tng:
- Double click k hiu object trong model hoc
- Click nt Property v click vo k hiu ca object .
cng nhn nhng thay i trn Property sheet th Click nt Apply / Ok. Ngc li click
nt Cancel.

Qun l m hnh: (Managing Model)


To open an existing model:
(1) Chn File Open hoc click nt Open
(2) Chn 1 file vi kiu PDM Model (*.PDM)
(3) Click OK.
Creating a model requires that you:
M file mi

nh danh n
t tn v m cho model.

After you create a model, you can enrich its definition by entering properties and associating objects.

To create a model:

(1) Select FileNew hoc click nt New


(2) Select DictionaryModel Properties. S hin Property sheet
(3) Nu l n mi (New Project) nhp tn n mi . Sau ny bn c th p dng tn ny cho
nhng model khc ca cng mt n.
(4) Nu bn gn m hnh ny cho mt n ang c th g tn n. Tn ny nh danh PDM v
cc SubModel lm vic trong cng mt Project.
(5) G m project tng ng.
(6) G tn model v m model (hoc g tn v click nt trong ct code hoc g m v click nt
trong ct tn.
(7) Click OK.

Modifying model properties:


Select DictionaryModel Properties
hoc:
- Double click k hiu object trong model hoc
- Click nt Property v click vo k hiu ca object .
cng nhn nhng thay i trn Property sheet th Click nt Apply / Ok. Ngc li click
nt Cancel.
40
Power Designer T Thc Nhu
To save the current model:
Select FileSave. (hoc click nt Save)
Nu lu ln u th s hin hp Save As yu cu khai bo tn v path cho m hnh mi (Phn
m rng mc nh l PDM). cc ln sau, version trc ca c lu vi phn m rng l PDB.
To close the current model:
Select FileClose.
Xa M hnh: (To delete a model)
When you delete a model, you delete all its submodels. When you delete a submodel, the
global model remains unchanged.
(1) Select FileUtilitiesDelete.
(2) Select a model file (PDM file).
(3) Click OK. A confirmation box appears.
(4) Click OK.
Gi Model qua mt ng dng truyn thng (A Messaging Application)
PowerDesigner s dng giao din chng trnh ng dng truyn thng ( messaging
application programming interface _ MAPI) gi model files bng electronic mail.
Qua giao din ny, bn s dng h thng thng ip ni gi model files directly to other
team members.
This feature is not available in the Windows 3.11 environment.
To send a model using a messaging system:
(1) Select FileSend.
(2) Select a file.
(3) Click OK.
The file transfers to your internal messaging system, which may ask you for additional
information, such as a destination.

To consolidate a model:
To save a model in a dictionary, you consolidate it.
1 Select FileConsolidate.
The Metaworks window opens and a Connect dialog box appears.
2 Type connection parameters.
3 Click OK.
A Consolidation dialog box appears.
4 Verify model information.
If necessary, type changes to model information.
5 Click OK.

When a dictionary stores a model, you open it by extracting it from the dictionary.

To extract a model:
1 Select FileExtract.
2 Type connection parameters.
3 Click OK.
An Extraction dialog box appears.
4 Select a project from the Project Name list.
Select PDM from the Model Type list.

41
Power Designer T Thc Nhu
Select a model name from the Model Name list.
Type a destination file name for the model.
Type a destination directory for the model.
5 Click OK.
The model window displays the selected model.

The Metaworks window opens and a Connect dialog box appears.

2- Creating a Model

A model is the basic work unit in PowerDesigner. Every model is contained within a workspace, and
contains at least one diagram and any number of other objects. Though a model may be split into
packages for organizational reasons or may contain several diagrams, it remains the fundamental
basis for your modeling work.

Creating a project

A project can provide a convenient environment for working with multiple interconnected models
and other files. For detailed information about working with projects, see the Projects and
Framework Matrices chapter.

Creating a model

To create a model

1. Select File > New to open the New dialog box.


2. Select the appropriate model for your needs by clicking on it. Note that the tabs on the right of
the dialog box change depending on the model currently selected.
3. Type a name in the Model name box. The code of the model, which may be used for script or
code generation, is derived from this name according to the model naming conventions. You
can modify the name and/or code at any time from the model property sheet by right-clicking
the model entry in the Browser and selecting Properties from the contextual menu.
4. Choose any appropriate options in the right hand tabs (for example, if you are creating a
PDM, you will specify a particular DBMS to model or, for an OOM, you will specify an
object language).
5. For model types with multiple kinds of diagrams, you can also specify the type of diagram
you want to start with (you can add additional diagrams to your model later by right-clicking
on the model in the Browser and selecting New > Diagram_Type).
6. Click OK. The new model will be created in your workspace in the Browser, and its default
diagram will be opened in the canvas.

The following table lists the PowerDesigner models that you see in the Model type pane:

42
Power Designer T Thc Nhu
File Backup
Icon Model definition
ext ext
Requirements Model. An RQM is a textual model, which can be used to list
and explain all the customer needs that must be satisfied during a development .rqm .rqb
process
Enterprise Architecture Model. An EAM analyzes high level functions,
.eam .eab
processes, and flows for your organization
Business Process Model. A BPM allows you to identify processes and atomic
.bpm .bpb
tasks and organize them in a hierarchy that you can then implement
Conceptual Data Model. A CDM represents the overall structure of a database,
.cdm .cdb
which is independent of any software or data storage structure
Logical Data Model. An LDM provides a DBMS-neutral picture of a database. .ldm .ldb
Physical Data Model. A PDM specifies the physical implementation of the
.pdm .pdb
database
Information Liquidity Model. An ILM is a design tool to make replication
.ilm .ilb
engine design and configuration easier to use
Object Oriented Model. An OOM uses UML diagrams to let you design a
static conceptual model of a software system using an object-oriented .oom .oob
approach for Java or other object languages
XML Model. An XSM is a graphic representation of an XML file that
.xsm .xsb
provides a global and schematic view of all its elements
Free Model. A FEM allows you to create any kind of chart or diagram, in a
.fem .feb
context-free environment
Multi-Model Report. Not a model, but an automated report that covers more
.mmr .bmr
than one model

Saving a model

Each model is saved in a separate file, with an extension specific to its model type. When you save a
model, PowerDesigner also automatically creates a backup copy.

To save and close a model

1. Select File > Save.

or

Click the Save tool in the PowerDesigner toolbar.

or

Right-click the model in the Browser and select Save.

43
Power Designer T Thc Nhu
2. Right-click the model and select Close.

44

You might also like