Anda di halaman 1dari 48

ER/Studio Training

Powering Today s Applications and Data


Dormevilly Tertius

dtertius@embarcadero.com.br

ER/Studio EcoSistema

AppWave
ER/Repository
ER/Portal

License Server

AD, DBA
Analista

Agenda

Day 1
Day 2

§  Entity–Relationship Modeling
§  The Naming Standards Template

§  Introducing ER/Studio Data Architect
§  Exporting and Importing a Model
§  ER/Studio Installation
using XML

§  Getting Started with ER/Studio DA
§  Working with Universal Mappings

Enterprise Level Modeling

§  Logical and Physical Modeling
§ 
§  Impact Analysis

§  Creating a New Data Model

§  Importing from External Metadata
§  Working with ER/Studio Repository

§  Reverse Engineering an Existing Database
§  Establishing Security for the Repository

§  Entities, Attributes and Relationships
§  Using Enterprise Data Dictionaries

Working with the Data Dictionary

§ 
§  Automating ER/Studio Data Architect

§  Generate Physical Models

§  Macros

§  Using the Compare and Merge Utility

§  COM Automation

§  Generating RTF and HTML Model Reports

§  Advanced Modeling Capabilities



A Embarcadero Technologies

GPS?

•  Todo mundo já viu um GPS?

•  Alguém aqui nunca usou o Google Maps?



Google Maps

Google Maps

Qual é mais fácil de entender?



Entity–Relationship Modeling

•  An ER (Entity–Relationship) model is an abstract way to describe a database

•  Entity, relationship and the cardinality are the three main components of an
ERD (Entity–Relationship Diagram)



Introducing ER/Studio DA

What is ER/Studio?

•  ER/Studio Data Architect (ER/Studio DA) is a visual modeling application used
for platform-independent logical data architecture analysis and design, in
addition to platform-specific physical database design and construction.

•  Its powerful, multi-level design environment addresses the everyday needs of


database administrators, developers, and data architects who build and maintain
large, complex database applications and strive to consolidate, report, and re-
use metadata across the enterprise.

ER/Studio DA Key Resources

•  Strong logical design capabilities

•  The ability to spawn many physical designs from a corporate logical
design

•  Bi-directional model comparison and information synchronization

•  VBA API for product customization

•  Powerful DDL reverse engineering and generation

•  Metadata import and export capabilities

•  Data lineage documentation

•  Sophisticated XML, HTML, and RTF-based documentation and
reporting facilities

ER/Studio XE Ecosystem

ER/Studio Installation

SYSTEM REQUIREMENTS
ER/Studio DA Installation
Review the requirements before you install ER/Studio Data Architect. Adhering to these
requirements optimizes ER/Studio Data Architect performance.



ER/Studio Data Architect Requirements
Hardware Processor
RAM
Pentium III, 600 MHz or higher
1 GB
Disk Space 340 MB
175 MB in the System TEMP directory for temporary file storage during
installation.
DVD Reader
Operating System Any of the following:
• Windows 8
• Windows 7 (32-bit and 64-bit modes)
• Windows Server 2008
• Windows Vista
• Windows XP Professional
• Windows 2003 (32-bit mode)
• Windows 2000 Pro Server
• Advanced Server with Service Pack 2
Software To use an Open Data Base Connectivity (ODBC) database as a data source, install the ODBC
driver on your client computer.
To connect to the DBMS using native connectivity, install the native client libraries available from
the DBMS vendor.
Privileges Local administrator privileges (required for installation only).

•  Installation process: Installing ER/Studio DA (page 10)



INSTALLING ER/STUDIO DATA ARCHITECT
SYSTEM REQUIREMENTS
ER/Studio Repository Installation
Review the following requirements before you install ER/Studio Repository. Adhering to these
requirements optimizes ER/Studio Repository performance.



ER/Studio Repository Requirements
Repository Database Server Repository Server
Hardware As required for your database platform
Processor Pentium 4 or higher
ER /S TUDI O REPO SI TO RY I N STALLATION > DATABASE SE RVER RE QUIRE M ENTS
RAM 2 GB
Disk Space 50 MB

DATABASE SERVER REQUIREMENTS


DVD Reader
Operating System
yes
Any of the following:
• Windows Server 2008 (32-bit and *64-
The following table lists the databases the Repository
bit modes) supports. In order for the Repository to
communicate with the database, the machine •running
Windows 8 the Repository must also have the
• Windows 7
corresponding RDMS client utility installed. The RDMSVista
• Windows client utilities must also be installed on
the machine running ER/Studio Data Architect•ifWindows
you wantXP to use ER/Studio Data Architect to
• Windows 2003 (32-bit mode)
reverse engineer databases originating at any For
of 64-bit
these platforms.
configurations, the 32-bit
database client libraries are required.
ER/Studio
Software Repository Database
Transaction Server
Control Requirements
Protocol (TCP) up TCP up and running
and running
Supported Repository DBMS Corresponding RDBMS Client Utility Software
Western European character set
IBM DB2 Universal 9.x(UNICODE
Server and UTF8 are not supported)
Corresponding version of IBM DB2 UDB Client Utilities
Supported DBMS (see Database Server
Microsoft SQL Server Requirements
2005 - 2012on page 10) Corresponding version of SQL Server Client Access
Privileges
Oracle 10g and 11g DBMS privileges to create objects on the DBMS privileges
Corresponding to create
version of Oracle objects
Clienton Utilities
the
server server
Local administrator privileges Local administrator privileges

•  Installation
Important Notes
NOTE: The
process: Installing the Repository (page 13)

hardware requirements are based on an ER/Studio Repository installation with five
to 10 users. For more than 10 users, ensure your hardware surpasses the previously
• ER/Studio Repository has been certified to work with the above database platforms using
stated hardware requirements to accommodate the number of transactions that
ER /S TUDI O REPO SI TO RY ADMI NIS T RATI ON > UNDE R S T A N D I N G A N D M A I N T A I N I N G T H E R E P O S I T O R Y

Repository Architecture

REPOSITORY ARCHITECTURE AND DESIGN
ER/Studio Portal Installation

•  Installation process: Installing the Portal (page 17)



Portal Architecture

ER/Studio Repository and Portal Upgrade


•  Take special care when upgrading from old versions of the Repository
and Portal

•  Check in all your diagrams and objects and…

•  Make sure you backup your Repository database before upgrading

•  Read the entire (updated) version of the upgrade tutorial :
W ELCOME
ER/Studio XE/Enterprise Upgrade Guide

This upgrade guide helps you upgrade applications in the ER/Studio suite of products. The most
The current
• current versions ofversions are:

the ER/Studio Suite of products are as follows:
• ER/Studio Repository 6.5

• ER/Studio Data Architect 9.5

• ER/Studio Portal 2.0

• ER/Studio Business Architect 1.7.1


• ER/Studio Software Architect 1.0 - When a new release is available, upgrade instructions will
be available.

When you purchase an upgrade, Embarcadero support sends you an email that includes the
download link for the product and instructions for obtaining the new license. Review that email
ER/Studio DBMS Support

•  Hitachi® HiRDB
•  Microsoft Visual FoxPro® 3, 5

•  IBM® DB2® for LUW: 5.x, 6.x, 7.x, 8.x, •  MySQL® 3.x, 4.x, 5.x

9.x
•  Netezza 4.6, 5.0, 6.0

•  IBM® DB2® for z/OS: 5.x, 6.x, 7.x, 8.x, •  Teradata® V2R4, V2R5, V2R6, 12.0,
9.x, 10.x
13.0

•  IBM® DB2® for iSeries: V4R5 and •  Oracle® 7.3.x, 8.x, 9i, 10g, 11g

V5R2
•  PostgreSQL 8.x, 9.x

•  IBM® DB2® for Common Server
•  Sybase® Adaptive Server® Enterprise
•  Informix® OnLine, SE and 9.x
(ASE) 11.9.2, 12.x, 12.5, 15.0

•  Greenplum 4.2
•  Sybase Adaptive Server Anywhere
•  InterBase® 4, 2007, 2009
(ASA) 5, 6, 7, 8, 9, 10

•  Microsoft® Access 2.0, 95, 97, 2000
•  Sybase IQ 12.5

•  Microsoft SQL Server 7, 2000, 2005, •  Sybase Watcom SQL

2008, 2012
•  Sybase SQL Anywhere 5

•  ODBC/AINSI SQL

ER/Studio Licensing
• 
set of licenses that is tied to a
Workstation licenses: A license or
particular workstation. The product can only be used on that
workstation

•  Networked licenses: Networked licenses are administered and
distributed by a central License Server (AppWave)

•  Concurrent licensing: Users on different machines take turns using
licenses from a shared pool

•  Networked Named User licensing: Licenses are pre-assigned to
specific users that are setup on the license server's user list

Getting Started with 
ER/Studio DA

• Windows 8, Windows 7, and Windows Vista:

ER/Studio DA Overview

C:\ProgramData\Embarcadero\ERStudioDA_X.X\Sample Models

• AppWave ION: My Documents\ERStudio Data Architect XE\Sample Models


For information on enhanced UI features, click a number in the image below:

1.  Toolbars

2.  Active Project

3.  Active Model

4.  Data Model tab

5.  Schema Objects

6.  Overview Window

7.  Zoom Window

Configuring ER/Studio DA

•  Customizing the Display of Diagrams and Objects

•  View > Diagram and Object Display Options

•  Defining Model Options for the Selected Model

•  Right-click the target model and then click Model Options

•  Customizing Standard Model Features for New Models

•  Tools > Options

•  Specifying the Default File Locations

•  Tools > Options > Directories

•  Changing Cursor Popup Help Options

•  View > Cursor Popup Help Options

Logical and Physical Modeling

Creating a new data model
• 
up by drawing a new data model.

Build a new design from the ground TUT O RIA L S > G E T T I N G S T A R T E D W I T
•  Build a data model from an existing database through live reverse
engineering.

STARTING TO DATA MODEL WITH ER/STUDIO DA
•  Import designs1 On from other Start
the Windows modeling products
> Programs menu,such as Embarcadero
choose ERwin or SQL> ERStudi
Architect.
files.

2 Choose File > New > Draw a new data model.

As you can see in the Create a New Model dialog, there are a number of wa
PROPERTIES TAB
• Relationship Type > Identifying Relationships: Identifying relationsh
mandatory. A foreign key value must exist in the child entity and the fo

Entities, Attributes and Relationships


be found in the primary key of the parent. Identifying relationships pro
as primary keys to child entities, which can result in compound keys.
U S I N G E R / S T UD I O D A TA ARC H I T E CT > D EV E L O P I N G T H E L O GThe
I C Ause
L MO DEL
of compound keys is often valid and appropriate; however, th
of your data model. When you use a compound key, the data containe
can only be identified in the context of its parent. If you ever need to
independently, then you will have a problem
•  Creating
PROPERTIES TAB Entities and Attributes
The cardinality of a mandatory relationship must be in the form of on
• Relationship Type > Identifying Relationships: Identifying relationships are always
•  Establishing Relationships Between Entities

When generating a physical model, foreign key columns propagated
mandatory. A foreign key value must exist in the child entity and
relationship the
default foreign
to NOT NULL. key value must
be found in the primary key of the parent. Identifying relationships propagate primary keys
• asIdentifying Relationships

primary keys to child entities, which can result in compound keys.
Non-Identifying,
• The use of compound keys Optional Relationships

is often valid and appropriate; however, they limit the flexibility
of your data model. When you use a compound key, the data contained in the child entity
Non-Identifying,
• can only be identified in Mandatory Relationships

the context of its parent. If you ever need to use the data
independently, then you will have a problem
•  Non-Specific Relationships
• Relationship Type > Non-Identifying, Optional Relationships: Non-
The cardinality of a mandatory relationship must berelationships
in the form of one-to-something.
propagate the parent's primary key to the non-key attribu
•  Working with athe
When generating Data
physical Dictionary

model, the relationship is optional the foreign key value is not always required
foreign key columns propagated by a mandatory
however, if a value does exist, then the foreign key value must be foun
relationship default to NOT NULL.
•  Using Data Dictionary Domains to Populate The cardinality ofNew Entity

the parent.
an optional relationship takes the form of zero or on
When generating a physical model, foreign key columns propagated
relationship default to NULL.

• Relationship Type > Non-Identifying, Optional Relationships: Non-identifying


Working with Models

TU T O RI A L S > L O G I C A L A N D P H Y S IC AL M

•  Creatingand Working with Submodels in ER/Studio DA



4 Collapse the folders in the Data
•  Generating Physical Models from a Logical Model
image below:

7 • Below Create Submodel, enter Address Components as the name for the s
Finding out How an Entity Maps to the Physical Model

8 Click OK. the Compare and Merge Utility

§  Using
§  Generating
ER/Studio RTF and
DA creates HTML
the Model
Address Reports
submodel.
Components



Advanced Modeling Capabilities

•  Promoting Data Integrity Through Rules

•  UPPER(CURRENT_CUSTOMER) in (‘Y’, ‘N’)

•  Create and Edit Defaults

•  Working with Attachments

•  Customizing Datatype Mappings

•  Denormalizing the Physical Model

•  Validating the Model

The Naming Standards Template

Enforcing Naming Standards

•  Case

•  Prefix and Suffix

•  Prime, Qualifier and Class

•  Considering a attribute called Customer First Name ID

•  Customer is the Prime (also Employee, Account, etc.)

•  ID is the Class (also date, code, document, etc.)

•  First and Name are the Qualifiers

•  Illegal: Words that are not allowed in names (these will mainly be
used during the validation process)

•  Delimiter Options

•  Special Characters

Enforcing Naming Standards

Case

Size

Abbreviations

Exporting and Importing 
a Model using XML

Exporting Data Model to XML

•  The eXtensible Markup Language (XML) is a document format
supported by many applications and platforms, allowing the data
modelers and application developers to collaborate SOA initiatives

•  ER/Studio DA allows you to generate the following XML-type files:

•  Schema Definition (XSD)

•  The XSD formally describes the elements in an XML document. It is an abstract
representation of an object’s characteristics and how the object relates to other
objects. The XSD is used to verify that each element in an XML document conforms
to the element rules described in the XSD.

•  Document Type Definition (DTD)



•  The DTD is another XML schema language used in traditional text document
publishing applications.The DTD is a description in XML declaration syntax of a
particular type or class of documents.

Exporting Data Model to XML

•  XML Metadata Interchange (XMI)

•  The XMI file format was designed primarily to allow the exchange of data between
data modeling applications. Based on the XML format, XMI allows data modelers using
Unified Modeling Language (UML) and programmers using different languages and
development tools to exchange information about the model metadata, what a set of
data consists of and how it is organized.

•  XML Schema Generation (XML)



•  The XML Schema Generation Wizard creates schemas that can be based on a logical
or physical model, a submodel, or even specific components only of a model or
submodel. The XML Schema Generation Wizard allows you to customize the XML
schema structure by clicking the desired options and dragging the available objects
from the database design into a tree representing the XML schema.

Working with 
Universal Mappings

Universal Mappings

•  Universal Mappings have been implemented to support enterprise-
level modeling in large organizations with many systems and
overlapping data and processes

•  They allow you to map objects between models in the same dm1 file,
between models in separate dm1 files, and between an ER/Studio
Data Architect diagram and a ER/Studio Business Architect workspace
in the Repository

•  These mappings are retained and can be used when comparing and
merging using the Compare and Merge Utility

What is a mapping

•  A mapping is a link between two objects…

•  Mappings within a design layer: This horizontal type of mapping
shows reuse within a design layer, such as logical to logical, physical
to physical and conceptual to conceptual. The scope of this
mapping is limited to mapping objects of the same type, such as
entity to entity, table to table, and column to column.

•  Mappings across different design layers: This vertical type of
mapping shows traceability or where used, upstream and
downstream across different design layers, such as: conceptual to
logical; logical to physical; and logical and physical.

Why are cross-repository 
mappings important?

•  Impact Analysis: Understanding where common objects are located.
Traceability between conceptual and logical models

•  Scalability: A mapping system across dm1s and workspaces reduces
the need for large models that have everything in them. You can now
perform Where Used (ER/Studio DA) or Impact Analysis (ER/Studio
BA) that can include information on multiple dm1 or workspace files.

•  Performance: Smaller dm1 or workspaces improves performance and
manageability

•  Enterprise Modeling: Facilitates an enterprise view of your data

Using Universal Mappings in ER/S

•  Creating Universal Mappings through the Compare/Merge Utility

•  Creating a Universal Mapping using the Universal Mapping Editor

•  Viewing Universal Mappings

U S I N G E R / S T UD I O D A TA ARC H I T E C T > D EV E L O P I N G T H E L O G I C A L MO D E L

U S I N G E R / S T UD I O D A TA ARC H I T E CT > D EV E L O P I N G T H E L O G I C A L MO D E L

• Existing Mappings: You can see which objects are already mapped, as well as the
description and any other data associated with the mapping.

U S I N G E R / S T UD I O D A TA ARC H I T E C T > D EV E L O P I N G T H E L O G I C A L MO D E L 1 In the diagram window, right-click the object you want to map or change the mapp
and select Universal Mappings.
6 Deselect or select the target object’s Mapped checkbox to remove or add a mapping.

7 Click OK to complete the change.


8 Save your diagram and in the case of Repository diagrams, check in the affected object to
save the mapping change to the Repository.

VIEWING UNIVERSAL MAPPINGS


Universal Mappings are displayed in the object’s Where Used tab.
Now that the match is made, we can choose to save the match to use the next time we compare
these two models. The matches are saved in both the current and target models.

You can also see the mappings of an object by right-clicking the object and selecting Where
Working with ER/Studio
Repository

ER/S Repository Options

•  Specifying Repository and Portal Connection Details

•  Logging In and Out of the Repository and Portal

•  Establishing Security for the Repository

•  Creating and Managing Roles

•  Creating and Managing Users

•  Creating and Managing Groups

•  Granting and Prohibiting User Access to Repository

Working with Objects 
in the Repository

•  Exploring the Repository

•  Adding a Diagram or Data Dictionary to the Repository

•  Retrieving a Repository Diagram or a Named Release

•  Checking in to the Repository

•  Checking Out Repository Items

•  Determining Who has an Object Checked Out

•  Working with Named Releases of Repository Diagrams

•  Branching and Merging Diagrams

•  Rolling Back a Diagram to a Previous Version

Enterprise Data Dictionaries

•  Creating an Enterprise Data Dictionary

•  Promote Local Data Dictionary to Enterprise Data
Dictionary

•  Create a New, Empty Data Dictionary

•  Associating a Data Dictionary with a Diagram

•  Determining Where an Enterprise Data Dictionary is Used

•  Associating the Enterprise Data Dictionary with Repository
Diagrams

Automating ER/Studio
Data Architect

ER/S Macros and Automation

•  Automation Interface objects are scriptable controls for most ER/
Studio Data Architect (ER/ Studio DA) functions

•  You can create macros to automate repetitive tasks or to extend the
functions already found in the application

•  A number of example macros are included. To see them, open any
ER/Studio DA *.dm1 file, switch to the Macro tab in the Data Model
Explorer, and double-click any sample macro. The macro will open in
the Macro Editor.

•  You can use macros within ER/Studio DA as well run your own COM
application external to ER/Studio DA

functions already found in the application. A few days coding can save m
resources in the long run as described in Why Use Automation Objects?
This section is intended for programmers with a working knowledge of
using ER/Studio DA’s macro editor, but you’ll also need a textbook devo

Macros and COM Interface



beginner BASIC programmers. The macro language is SAX BASIC, simi
There are a few, but critical, syntactic differences from other BASIC lang
Introduction to the Automation Interface Reference Guide, which is acc
menu, to save some debugging time.
You can also create event handlers to run automatically every time you p
•  The diagram shows the differences between using macros within ER/
application, such as Add Entity. See Creating Event Handlers. You can a
update events, see Handling Update Events.

Studio DA and running your own COM


A number application
of example macros are external to
included. To see ER/
them, open any ER/S
switch to the Macro tab in the Data Model Explorer, and double-click an
macro will open in the Macro Editor.
Studio DA.

•  Further Information

•  Automation Interface Reference
Guide, accessible from the Help
menu

•  Programming SAX Basic tutorial:
Programming SAX Basic.pdf

ER/Studio Training





Questions ?

Dormevilly Tertius

dtertius@embarcadero.com.br

Anda mungkin juga menyukai