Manual ERwin Data Modeler PDF
Manual ERwin Data Modeler PDF
http://www.ca.com/files/Demos/data-modeler-demo.swf
Getting Started
This documentation and related computer software program (hereinafter referred to as the
Documentation) is for the end users informational purposes only and is subject to change or
withdrawal by Computer Associates International, Inc. (CA) at any time.
This documentation may not be copied, transferred, reproduced, disclosed or duplicated, in whole
or in part, without the prior written consent of CA. This documentation is proprietary information
of CA and protected by the copyright laws of the United States and international treaties.
Notwithstanding the foregoing, licensed users may print a reasonable number of copies of this
documentation for their own internal use, provided that all CA copyright notices and legends are
affixed to each reproduced copy. Only authorized employees, consultants, or agents of the user
who are bound by the confidentiality provisions of the license for the software are permitted to
have access to such copies.
This right to print copies is limited to the period during which the license for the product remains
in full force and effect. Should the license terminate for any reason, it shall be the users
responsibility to return to CA the reproduced copies or to certify to CA that same have been
destroyed.
To the extent permitted by applicable law, CA provides this documentation as is without
warranty of any kind, including without limitation, any implied warranties of merchantability,
fitness for a particular purpose or noninfringement. In no event will CA be liable to the end user or
any third party for any loss or damage, direct or indirect, from the use of this documentation,
including without limitation, lost profits, business interruption, goodwill, or lost data, even if CA is
expressly advised of such loss or damage.
The use of any product referenced in this documentation and this documentation is governed by
the end users applicable license agreement.
The manufacturer of this documentation is Computer Associates International, Inc.
Provided with Restricted Rights as set forth in 48 C.F.R. Section 12.212, 48 C.F.R. Sections 52.22719(c)(1) and (2) or DFARS Section 252.227-7013(c)(1)(ii) or applicable successor provisions.
2002 Computer Associates International, Inc. (CA)
All trademarks, trade names, service marks, and logos referenced herein belong to their respective
companies.
Contents
Chapter 1: ERwin: The Information Management Solution!
Database Design Made Easy 11
Implement Enterprise-wide Design Standards 12
ERwins Benefits 12
The AllFusion Modeling Suite Manages Application Development
13
For More Information 14
iii
iv
vi
1
ERwin: The Information Management Solution!
Chapter
11
ERwins Benefits
Easy-to-use Design Functionality: Database design is made simple through pointand-click creation of a graphical entity-relationship (ER) model of your data
requirements and data usage rules. Drag-and-drop functionality allows you to
quickly create entities and attributes, tables, and columns, and other model
objects. Additionally, ERwins on-diagram editing facilitates quick and easy design
changes.
12
Create independent logical and physical models with unique notation and
display options.
Split models of older ERwin versions into separate logical and physical
models, derive new models from existing models, and link a model to its
source so that changes can be synchronized.
13
14
Most Help topics have links to related topics. You can usually find more
information by clicking the links below the topic heading or on the buttons on the
help topic menu bar.
15
Technical Support
If you need technical support, visit us on the web at esupport.ca.com. When you
contact Computer Associates Technical Support, please have the following
information ready for the support analyst:
The version number and the build number of the product (available from the
About menu option on the ERwin Help menu).
The operating system or platform (for example, Windows NT 4.0), as well as
any service pack applied.
A description of the problem, the steps that led to the problem, and any error
messages.
To obtain more detailed information about ERwin from educational courses, go
to this website: www.ca.com/education
In addition, ERwin provides comprehensive training in its advanced features,
along with offering the Best Practices Course for in-depth hands-on ERwin material.
16
2
The Premier Model Solution At Your Fingertips!
Chapter
21
22
RAM
Microsoft Windows XP
Microsoft Windows NT 4.0 (Service Pack 5 or 6)
Microsoft Windows 2000
Microsoft Windows Millennium Edition
Microsoft Windows 98 (1st and 2nd editions)
64 Mb (128MB recommended for large models)
85 Mb
Operating System
SQL Databases
AS/400
DB2 390
DB2 UDB
HiRDB
INFORMIX
Ingres II
InterBase
Clipper
DBASE IV
FoxPro
Paradox
ODBC Generic
OpenIngres
Oracle
PROGRESS
Rdb
Red Brick Warehouse
SAS
SQL Anywhere
SQLBase
SQL Server
Sybase
Teradata
WATCOM/SQL Anywhere
23
2.
3.
A License Agreement appears for you to review. If you accept the terms
as described in the License Agreement, select Yes. If not, select No and
exit the installation process.
4.
Buddy TipThe installation program notifies you when ERwin is installed successfully.
To register ERwin:
1. Go to the Windows Start menu and click on Programs. Then click CA
Registration and choose RegisterIT from the menu.
2.
3.
24
Whats Next?
Now that you have installed ERwin, the road to database design and application
development is just beginning . . . this book will guide you through ERwin's improved
basic functions and new features.
The following chapters highlight ERwin's components and provide you with a
clear idea of how to use them. You will soon see how the wide scope of ERwin's
features combines with its ease of use to make ERwin an indispensable part of your
organization.
25
3
ERwin's New And Advanced Features!
Chapter
hen database designers and information managers are asked for a wish list
regarding requirements for their data modeling solution, in short what they
ask for is a tool that supports the complete application development cycle.
Typically, the cycle begins with the gathering of business rules and creating logical
constructs and continues to the physical design phase followed by the implementation
of a database that supports one or more applications. Clearly this is an iterative
process.
For this reason, they want a tool that is flexible and easy to use. A tool that
supports multiple platforms, reuse of objects, and the ability to synchronize changes
between data models across their enterprise. ERwin delivers the usability and flexibility
to support the application development process in new and dynamic ways.
31
The Model Explorer Provides a hierarchical text-based view of the data model
that is displayed in the Diagram Window. By clicking on a Model Explorer tab,
you can see different views of the model.
Stored Display Tab By default, every ERwin data model has one Stored Display,
which is named Display 1. You can rename Display 1 and create other Stored
Displays to customize the view of your data model.
NOTE:
32
The Model Type Indicator can be switched between Logical and Physical only for
a logical/physical model. For a logical-only or physical-only model, the model type
appears dimmed in the Model Type Indicator list and cannot be switched.
33
NOTE: To help you find the new location of menu options, go to the
Help menu and choose Whats New. From the Whats New list,
click on Menu Structure Redesign.
34
Drag certain objects from the Model Explorer to create them in the Diagram
Window
35
Go To to go to the object
in the Diagram Window
Model Pane
The Model pane of the Model Explorer lists all of the object types that appear in the
current data model based on the model type and the target server. For example, if the
model type is Logical, the Model Explorer does not include physical objects such as
triggers, stored procedures, and database views.
Logical Objects
36
Physical Objects
37
NOTE: Keep in mind, that subject area members just reference the
objects in the Main Subject Area, so changes automatically apply
to an object in every subject area in which it is a member.
38
Domains Pane
In ERwin, a domain is an object that helps to speed the creation of attributes and
columns. A domain is similar to a template because it defines all of the properties that
will be inherited by any attribute or column created from the domain. ERwin includes
a set of default domains, which you can customize. You can also add new domains for
your modeling purposes.
The Domains pane lists all of the Domains for the current model, which includes
all of the default domains as well as any that you created. You can drag a domain from
the Model Explorer right onto an entity to add an attribute or a column.
39
Dockable Toolbars
All of the toolbars in ERwin are dockable. That means that you can drag them to any
location in the workspace and they will dock along the edge of the window. Or, if you
prefer you can let them float freely in the window.
NOTE: For more information about all toolbars, go to the Help menu
and choose Help Topics. Then search for Toolbar, overview.
310
ERwin Toolbox
The ERwin toolbox is the primary set of tools for drawing and editing a data model.
The toolbox changes based on the model type (logical or physical) and the
notation (IDEF1X, IE, or DM) as shown below.
NOTE: For more information about the IDEF1X, IE, and DM notation,
from the Help menu, choose Help Topics, and search for
Notation. To choose the notation for a data model, from the
Model menu, choose Model Properties and click the Notation tab.
311
312
You can select multiple diagram objects, and space them to your preference.
Similarly, the Group tool lets you group multiple diagram objects for easy
manipulation.
313
Drawing Tools
The Drawing Objects toolbar includes a set of drawing tools that you can use to add
text and objects to enhance the meaning of your data model. The tools work like many
other popular point-and-click drawing applications. Just click on a tool, click in the
diagram window and drag the mouse until the object is the right size.
After you add a drawing object, you can use the font and color toolbar to add
color to the objects.
Buddy TipYou can assign default font and color settings for drawing objects. From the
Format menu, choose Default Fonts and Colors. Click the Drawing Objects tab on the Default
Fonts and Colors editor to select the default setting for drawing objects.
314
Whats Next?
You have just skimmed the surface of ERwin's capabilities. But now that you are
becoming acquainted with ERwin's features, you are ready for an in-depth exploration.
The following chapter explains how to take advantage of the latest modeling
techniques that help optimize your data models while managing the impact of design
changes throughout your organization.
315
316
4
Putting ERwin To Work!
Chapter
his chapter walks you through some very basic ERwin features and provides an
opportunity for you to become familiar with the ERwin landscape. In this
chapter you will be creating and editing ERwin data models. Before you begin
exploring the workspace, youll learn about the basic data modeling concepts and
objects such as entities, attributes, and relationships.
NOTE: If you are already familiar with these concepts, you can skip
ahead to the section titled Creating A Data Model.
41
What Is An Entity?
An entity is a person, place, or thing about which an organization maintains
information. In the logical model, an entity usually corresponds to a table in the
physical model. Two types of entities/tables can be drawn in an ERwin data model:
independent and dependent.
For example, an independent entity is an entity whose instances can be uniquely
identified without determining its relationship to another entity. It is represented as a
box with square corners. A dependent entity is an entity whose instances cannot be
uniquely identified without determining its relationship to another entity or entities. It
is represented as a box with rounded corners.
What Is An Attribute?
Once you have discovered the people, places, and events that define the entities in
your model, you can begin to define the attributes for each entity. For example, once
you create the CUSTOMER entity, you can begin to define the individual pieces of
information you want to track for each customer, including Name, Address, and
Phone Number. In the logical model, each of these pieces of information is saved in
ERwin as an attribute of the CUSTOMER entity. In the physical model, attributes
equate to columns in a table.
42
When you add an entity, ERwin determines the entity type based on the
relationship in which it is involved. For example, when you initially place an entity in a
model, it is represented as an independent entity. When you connect the entity to
another entity using a relationship, ERwin determines if the entity is independent or
dependent based on the relationship type.
What Is A Relationship?
In an ERwin data model, a relationship shows an association between two entities or
tables. ERwin represents a relationship as a line connecting two entities or two tables.
Depending on the notation you choose, the symbols at either end of the line may
change. The diagram below shows the relationship between the CUSTOMER entity
and the MOVIE RENTAL RECORD entity using Integration DEFinition (IDEF1X)
notation.
43
Buddy Tip If you want a non-key to migrate instead of the primary key, you can use the
alternate key migration option. For more information, search for Alternate Key Migration
in the Online Help system.
44
Identifying relationship
Non-identifying relationship
Recursive relationship
Many-to-many relationship
Subtype relationship
45
2.
In the New Model Type group box, select Logical/Physical. For the purpose of
this exercise, we use the default template, Blank Logical/Physical Model, and the
default target database, Oracle 8.x, for the physical side of the model.
3.
46
To Add Entities
1.
2.
Repeat until two more entities appear in the diagram window (they are named E/2
and E/3).
3.
At this point, you should save your data model. From the File menu, choose Save
As. In the ERwin Save As dialog, name the model by typing
My ERwin Model. ERwin adds .er1 as the file extension for data models.
47
Click Save to return to the Diagram Window. The name you typed in the ERwin
Save As dialog appears in the ERwin title bar. Your data model should look like
this:
NOTE: Notice that the entities that you created in the Diagram Window
also appear in the Model Explorer because ERwin automatically
synchronizes both areas of the workplace.
To Name Entities
You can name an entity by typing directly in the Diagram Window or in the Model
Explorer. The following procedure uses both methods:
1. In the Diagram Window, locate the entity named E/1. Click once on the entitys
name, wait briefly, and then click again. An edit box appears around the name.
Type CUSTOMER over the default entity name and click the mouse once outside
of the edit box.
48
In the Model Explorer, right-click on E/2, and from the context menu, select
Rename. Type ORDER over the default entity name and click the mouse once
outside of the edit box.
3.
Using the method that you prefer, rename the last entity PRODUCT. When
youre done, your diagram should look like this:
To Add Attributes
You can also add attributes to the entities directly in the Diagram Window or in the
Model Explorer. We will try both methods in the following exercise.
1. In the Diagram Window, click in the CUSTOMER entity box and press the Tab
key. An edit box appears below the entity name with the default name, Attribute
Name.
49
To add the first attribute, which is the primary key, type Number directly over the
default name. Then click the mouse outside of the edit box.
NOTE: To add another primary key, press Enter and the edit box will
appear above the line in the entity. To add a non-key, press Tab
and the edit box will appear below the line in the entity.
3.
Now, to add an attribute in the Model Explorer, click on the plus sign next to
CUSTOMER to expand the object list. Right-click on Attributes and choose New
from the context menu. A New Attribute edit box appears under Number. Type
Name in the edit box and when youre done click the mouse once outside of the
edit box.
4.
Using the method that you prefer, add Phone Number as a non-key attribute in
the CUSTOMER entity. When youre done, your diagram should look like this:
Buddy Tip To designate an attribute as a primary key, in the Model Explorer, doubleclick on the attributes name to open the Attributes editor. In the General tab, select (check)
the Primary Key box. You can also assign other properties to the attribute such as datatype
and domain.
410
To Add Relationships
In the following exercise, we will add two relationships an identifying relationship
between CUSTOMER and ORDER and a non-identifying relationship between
ORDER and PRODUCT.
1.
2.
3.
. To add a
In the ERwin Toolbox, click the Non-identifying relationship tool
non-identifying relationship between ORDER and PRODUCT, click ORDER
and then click PRODUCT. Your model should look similar to this:
411
With My ERwin Model.er1 open, on the Drawing Objects toolbar, select the
Rounded Rectangle tool.
2.
3.
On the Font and Color toolbar, click the arrow on the Apply Background Color
tool.
4.
Choose any blue color, which will be applied to the background of rectangle.
5.
6.
412
Click the Text tab and type A product is part of an order. in the box.
8.
Click the Text Properties tab and select any dark color for the text. Click OK to
close the dialog and see the text in the circle. This is just an example of how you
can use drawing objects to enhance your data model.
9.
413
When emovies.er1 opens, from the Tools menu select Split L/P Model.
3.
When the split model process completes, ERwin prompts you to save first the
logical model, then the physical model. Save the logical model as
emovies-L1.er1. Save the physical model as emovies-P1.er1.
4.
After you save the models, close all other models except emovies-P1.er1,
which you will use for the next exercise.
414
2.
In the first page of the Derive New Model Wizard, in the Model Type group
box, select Physical. In the Create Using Template box, accept the default
template, Blank Physical Model. In the Target Database list, choose Oracle
version 8x. Click Next.
415
On the second page, accept the default settings in which all objects are
selected.
4.
On the third page, also accept the default settings and click Finish.
5.
You have created a new physical model. Save the new model as emoviesP2.er1 and close both models.
416
Forward Engineering
When you have a physical data model, ERwin automatically generates the schema for
the target server as you build the model. Forward Engineering is the process that ERwin
uses to transfer the schema from the data model to the target server.
When you forward engineer a data model, you can choose to generate a script file,
which you can use to update the database using a database administration tool or you
can forward engineer by directly connecting to the database catalog. Either way,
ERwin does the majority of work for you by generating the script for your target
server.
Before you forward engineer, you can view the schema, which is a text-based
representation of the database objects that will be created in the database from the
script. ERwin uses the data definition language (DDL) for the target database to write
the script. Each time you add an object or property to your data model, ERwin
automatically updates the script file to reflect the change to the data model.
417
From the File menu, choose Open and locate My ERwin Model.er1, which you
saved in a previous exercise.
2.
When My ERwin Model.er1 opens, using the Model Type Indicator, switch to the
Physical model. Then from the Tools menu, choose Forward Engineer/Schema
Generation.
3.
When the Oracle Schema Generation dialog appears, click the Preview button at
the bottom of the dialog. The Oracle Schema Generation Preview dialog appears.
4.
When you are finished previewing the schema, click the Close button to return to
the Oracle Schema Generation dialog.
NOTE: By default, the target server is Oracle. To change the target
server, with a physical data model open, go to the Database
menu and select Choose Database. Click the button next to the
target server and select the version from the list.
418
In the Oracle Schema Generation dialog, click the Report button at the bottom of
the dialog.
2.
In the Save As dialog, in the File Name box, type My ERwin Model.sql and
click Save.
419
From the File menu, choose Close. When the Close dialog appears, choose the
Save As .ER1 file option and then click OK. ERwin saves and closes My ERwin
Model.ER1.
Whats Next?
By this time you have a better idea of the basic features that ERwin offers, and how
they interact. The next chapter takes you to a new level of achievement: you will
perform reverse engineering and compare the changes between a script file and a data
model.
420
5
Jump Start Your Data Design Process!
Chapter
ou are now familiar with how ERwin helps you create a model from scratch or
from an existing model using the Split Logical Physical and Derive New Model
features. In this chapter, we will explore how to create a data model by reverse
engineering, which is a process that takes advantage of an existing database to speed the
design of a new data model and the subsequent delivery of new systems.
Reverse Engineering
When you have an existing database from which you want to create a data model,
ERwin lets you reverse engineer the database schema, which is converted by ERwin
into a graphical representation of the database structures. The process of reverse
engineering saves considerable time because ERwin does the work of creating the data
model directly from the database.
51
2.
In the dialog, select Physical as the New Model Type, select Blank Physical
Model as the template, and Oracle 8.x as the target database.
52
Then click Next. The Reverse Engineer Set Options dialog box appears:
4.
In Reverse Engineer From, select Script File and then click Browse to locate
the My ERwin Model.sql file that you saved in the previous chapter. For the
purpose of this exercise, accept the default options in the remaining areas of
the dialog and then click Next.
53
You will see a small dialog with text that describes the database structures that
ERwin is reverse engineering. When the process ends, a new data model
appears in the Diagram Window.
6.
From the File menu, choose Save and save this model as
My ERwin Model.ER1. When asked if you want to replace the existing file,
click Yes.
54
In the Model Explorer, click the plus sign to expand Tables. Next, locate the
CUSTOMER table and expand it. Then, expand the columns under CUSTOMER
and locate the phone_number column.
3.
4.
55
From the Tools menu, choose Complete Compare. The Complete Compare
Set Options dialog appears:
2.
3.
In the Compare Current Model With group box, select Script File and click
Browse and locate My ERwin Model.SQL
4.
In the Sync Action group box, select the default Update Current and click
Next.
5.
In the Items to Compare page, accept the default selection (all objects) and
click Next.
6.
On the Object Filter Options page, accept the default selection and click
Next. At this point, ERwin begins to process the Script File.
7.
On the Other Model Filter Options page, accept defaults, click Next.
8.
On the Resolve Differences page, two trees appear next to each other. They
represent the differences that ERwin finds between the current model and the
script file. The left tree is named My ERwin Model and the right tree is
labeled MyERwinModel.SQL.
56
In the right tree, locate the CUSTOMER table and select the Phone_Number
column by clicking on the line to highlight it.
3.
Click the Import button on the right side of the dialog. Then click Next.
4.
Click OK when prompted to import and apply the changes that you selected
to the model.
5.
In the Model Explorer, verify that phone_number was re-added to the model
after previously being deleted.
6.
Whats Next?
The next chapter describes the ERwin Report Template Builder and explains how you
can use this tool to quickly create reports about your model.
57
6
Build Reports On Your ERwin Models!
Chapter
Select any topic to learn more about the Report Template Builder or any
other topic.
61
Go to the Tools menu, choose Report Builder. Until the first template is
saved in the Reports folder, you may see a message indicating that the folder
is empty. Or you may see a message indicating that you need to click the
Browse button on the next dialog and select a folder where you want to save
your reports.
Buddy TipYou can read or execute an ERP report file created in the ERwin
Data Browser using the Report Templates dialog. Select your ERP report from
the list, or click Browse to search for the file.
62
4.
Accept the defaults on the Property Tree tab. Click the Title Tab.
5.
6.
Click the Add Macro button to append the models name to the report title.
7.
Click the Export tab and verify that HTML is the report output type. If not,
choose HTML from the Export AS list. Then, in the HTML Export
Properties group box, select Picture Reports as pop-up windows.
8.
Close the window and return to the Report Template Builder pane.
63
In Available Sections pane, select Entity (in Logical Section), and click the
right arrow to add this section to the Report Layout pane.
3.
4.
Click the plus sign to expand Entity, then check Name and Definition.
5.
Click the plus sign to expand Attribute, check Name, and close the window to
return to the Report Template Builder.
6.
In the left frame of the browser, locate the links to the Report Components.
Click the links in the Picture and Entity sections to review each section.
3.
In the Entity section you can change the view from Tabular to Hierarchical.
4.
5.
Return to ERwin and close the Report Template Builder. Close emovies.er1.
64
2.
3.
On the Report Templates dialog, from the Available Templates list, select
MyReport.
4.
5.
Click Run to launch your local word processor and display the report in the
document window.
6.
After you have viewed the report, close your word processor and then close
emovies1.er1.
65
66
7
Using ERwin's Advanced Features!
Chapter
enerally, in a design layer hierarchy, different model types are used for a
distinct purpose in the application development lifecycle. For example, a
logical model may represent business requirements and rules. From that
model, a generic physical model may be derived, in which physical constructs are
designed for a generic database. Once the generic physical model is considered stable,
you can derive from it multiple database specific models. In this way, the generic
physical model becomes the standards model.
A variety of ERwin features are necessary to support the separation of model
types and to keep related models linked and in sync. A brief discussion about these
features follows in this chapter.
71
Design Layer 1
Physical
Model
Design Layer 2
Design Layer 3
DB2
Physical
Model
Oracle
Physical
Model
Generally, it is unfeasible to use the same model to accommodate all phases of the
design process. Instead, you must be able to develop and link related models in
different design layers. Within each design layer, you must be able to make and record
design decisions that transform the structure from one layer to another. Finally, you
must be able to maintain the links between the models in different design layers and to
synchronize changes made in different layers while maintaining the appropriate
structures in each. In ERwin, the combination of linking models in different design
layers via model sources and applying transforms within a model provide this
capability.
72
73
Logical Model
Logical Model
DB2 Physical
Model
DB2 Physical
Model
Oracle
Physical Model
Oracle
Physical Model
74
Marketing Data
Mart
Sales Data
Mart
Deriving A Model
Whether you have a logical/physical model or a logical-only or physical-only model,
ERwin makes creating a new model easy. Rather than copying objects from one model
to another or starting from scratch, the Derive New Model wizard takes a step-by-step
approach to help you derive a new model from a model source. ERwin links the
original model as the source of the new model. Then you and others can work on the
separate models knowing that changes to each model can be synchronized at any time.
To derive a new model, choose the Derive New Model option on the Tools menu.
The Derive Model wizard walks you through the process and lets you specify the
objects that you want the source model to contribute to the new model.
75
What Is A Transform?
A transform is a method by which you can apply and maintain a record of a design
decision, which is a decision to change objects or properties within a design layer. When
applied, a transform changes a set of objects from one state to another for the purpose
of refining, normalizing, or denormalizing a model. The main advantages of using
transforms include:
Automation. ERwin simplifies the refinement of the logical and physical
model. You can use wizards to automatically apply design layer changes,
instead of manually applying changes.
76
Transform Toolbar
The Transform Toolbar provides a set of tools to apply transforms. The model type
and the objects that you want to participate in the transform determine which tools are
available on the Transform Toolbar.
Applying Transforms
In most cases, when you select the objects that you want to transform, the appropriate
tools on the Transform Toolbar become available. For example, to apply a Supertype
Subtype Rollup transform you must first select the supertype/subtype symbol.
77
78
Click
This Tool
Many-to-Many
Supertype/
Subtype Identity
Supertype/
Subtype Roll-up
Supertype/
Subtype Roll-down
79
Result
of Transform
Select
This Object(s)
Click
This Tool
Vertical Partition
Horizontal Partition
Roll-down
Denormalize
Roll-up
Denormalize
Copy/Link Column
710
Result
of Transform
When you reverse a transform, ERwin preserves the source objects and deletes
the transform and the model objects that the transform creates.
To reverse a transform, go to the Model Explorer and right click on the
transform. From the context menu, choose Delete and then choose Reverse.
711
Managing Standards
When multiple individuals or groups are responsible for designing a set of data models,
the enforcing of standards is a critical element. Typically, the naming of objects and
the mapping of datatypes are primary areas in which inconsistency can be a problem.
ERwin provides built-in tools to help you manage the naming conventions and
datatype standards that you apply across your enterprise models.
Naming Standards
ERwin has a wide-range of naming standard features that can help you develop new
standards or implement existing standards. You can take full advantage of all of the
naming standard features or use only those enforced by your organization.
On the Tools menu, choose Names and then choose the Model Naming Options
dialog. In this dialog, you define the naming standards for the current data model. You
can specify the case (lower or upper) and maximum length for physical objects. For all
model types, you can specify how ERwin responds to non-unique names (ask, allow,
or disallow).
On the Tools menu, when you choose Names and then choose Edit Naming
Standards, ERwin opens the Naming Standard Editor. In this editor, you can specify
separate naming standards for logical and physical objects.
In the Glossary tab on the Naming Standards Editor, you can either import an
existing names glossary or build one from scratch. You can define how these standards
are implemented, and create entries including business terms, and abbreviations, that
are relevant to your business. ERwin saves naming standards information in a naming
standards file (*.nsm). For each ERwin model in which you use naming standards, you
must attach a naming standards file. You can apply a naming standards file to multiple
models.
When you attach a naming standards file to a data model, ERwin automatically
applies the standards and conventions defined in the file. You can also use the file to
check compliance of the names of objects in the model, which is similar to a spell
checker in a word processing application. ERwin uses the naming standards file as a
dictionary and compares the names in the data model to the names in the dictionary.
When it finds a discrepancy, ERwin stops to let you decide whether to ignore or
replace the non-compliant name.
Buddy TipIn ERwin, you can use the ERwin Macro Toolbox to assign names to
model objects. ERwin includes macros designed to make it easy to distinguish between their
application in the logical and physical model types.
712
Datatype Mapping
A datatype is a predefined set of characteristics for an attribute or column that specifies
field length, acceptable characters, and optional and required parameters. For example,
the datatype char(18) specifies that the column can store up to 18 alpha and numeric
characters.
By default, ERwin applies a datatype to every attribute in a logical model and to
every column in a physical model. In the logical model, the datatype is determined by
the domain from which the attribute inherits its properties or from the datatype that
you assign. In the physical model, the datatype is determined by the default value
specified by the target server or the datatype that you assign. Considering the large
quantity of attributes or columns a data model usually has, it can be quite tedious to
manually assign and maintain consistency of datatypes. For this reason, ERwin has
several tools that help you with this task.
The Datatype Standards Editor can be used to edit the default datatype mapping
for your logical and physical models. For physical models, you can edit the default
datatype that ERwin automatically attaches to each column. For logical models, you
can add logical datatypes and assign the datatypes to the attributes in the logical model.
You define the datatype mapping standards by specifying how logical datatypes
map to the available datatypes for your target server. If you have database applications
running on multiple server platforms, you can map datatypes for all of the target
servers. ERwin saves datatype mapping information in a datatype standards file
(*.dsm). For each ERwin model in which you use datatype standards, you must attach
a datatype standards file. If you open an ERwin model and you have not attached a
datatype standards file, ERwin uses the default datatype mapping.
Of course ERwin lets you define your datatype mapping standards once and apply
them to multiple data models. On the Tools menu, when you choose Datatypes and
then choose Model Datatype Options, you can specify the datatype mapping file that
you want to apply to the current model.
713
When you create a physical model and add tables and columns.
When you derive a physical model from a logical model and create tables and
columns in the derived physical model.
When you split a logical/physical model into independent logical and physical
components.
When you apply a transform to two tables and create a single denormalized
table.
When you reverse engineer a database or script file and create tables and
columns in the new model.
When you add a model source that contributes tables and columns to a
model.
714
8
Ask Your Buddy
Chapter
Answer:
You can open the Whats New menu item in the ERwin Help
menu to review new features and related overview topics.
Question:
How do you bring older 3.5.2 models into the new ERwin structure?
Answer:
Perform a normal file open and point to the old 3.5.2 file. ERwin
4.x will automatically convert your models into the latest format.
Question:
Answer:
With the logical/physical model open, from the Tools menu, choose
Split L/P Model. ERwin begins splitting the model and prompts you
to save first the logical-only and then the physical-only model. When
the split is complete, the new models will contain a history entry that
indicates that they were created by splitting the original model.
Additionally, the logical model will be linked to the physical model as
its model source. The original logical/physical model is preserved
without any changes.
81
On the Edit menu, choose Select All, then Edit>Copy Group. The
clipboard image can now be pasted into another Windows
application.
82
If you are installing ERwin on Windows NT, you must have the
appropriate permissions to create a Program Group. Your System
Administrator can assign these permissions in the Administrators,
Power Users, and Server Operators groups. Contact your
Administrator if you need to upgrade your permissions to allow you
to create a Program Group.
ERwin ERX output is replaced with a new XML format output file.
This XML format provides access to all data within an ERwin model
and is based on the ERwin 4.x metamodel. New options have been
added to the File Save As and Open dialogs to support the reading
and writing of files in XML format.
Question: How do I break the link between a model and its model source?
Answer:
Use the Save as New Model feature to save an existing model with a
new model identifier. When you save a source model as a new
model, you break the associative link between the model and any
derived models.
83