当前位置:文档之家› ERwin使用说明(中英文)

ERwin使用说明(中英文)

ERwin使用说明(中英文)
ERwin使用说明(中英文)

Getting Started with ER win (Erwin

入门)

by Dr. Peter Wolcott

Department of Information Systems and Quantitative Analysis

College of Information Science and Technology

University of Nebraska at Omaha(由内布拉斯加州的奥马哈大学信息科学与技术学院门的信息系统和定量分析博士彼得著)

Introduction (介绍)

ER win is a popular data modeling tool used by a number of major companies in Omaha and throughout the world. (Erwin是受奥马哈和世界各地的一些主要的公司欢迎的数据模型工具) The product is currently owned, developed, and marketed by Computer Associates, a leading software developer.(该产品是由具有领导地位的CA软件开发公司拥有、开发和销售) The product supports a variety of aspects of database design, including data modeling, forward engineering (the creation of a database schema and physical database on the basis of a data model), and reverse engineering (the creation of a data model on the basis of an existing database) for a wide variety of relational DBMS, including Microsoft Access, Oracle, DB2, Sybase, and others.该软件为多种多样的关系型数据库管理系统,包括

Microsoft Access,甲骨文,Sybase,DB2,和其他人提供支持数据库设计的各个方面,包括数据建模、正向工程(在现有的数据模型的基础上创建数据模式和物理数据库)和逆向工程(在现在的数据库基础上创建数据模型)

This brief tutorial steps you through the process of creating a data model using ER win.(你可以通过这个简单教程中的步骤运用Erwin来创建数据模

型) It will not explain all aspects of ERwin, but will show you the minimum necessary to create and use data models for this class. (这个课程不可能全面地讲解Erwin,但它向你展示了必要的最基本的创建和使用数据模型的知识) It consists of three major segments, which correspond to the project-related assignments in your class: (这个课程由三个主要部分组成,它与有关项目任务相符)

1.Creation of a basic data model (Conceptual data model) 创建一个

基本的数据模型(概念数据模型)

2.Creation of a database schema 建立数据库模式

3.Creation of the database创建数据库

This tutorial is a static one, suitable for printing.本教程是一个静态的,适合印刷A tutorial using screen captures and narration is also available. 一个指南使用屏幕捕捉和叙述是可用的。

Section 1. Creation of a basic data model

You will be creating a data model similar to that created for the Heartland Properties case study used in class.教程中你将创建一个和研究心脏地带个案相似的数据模型 The Entities involved in this model include: Employee, Office, Property, and Inspection. 参与本次的实体模型包括:员工、办公、财产、及检验。

First, invoke ER win from Start->Programs->Computer Associates->All Fusion-> ERwin Data Modeler-> Erwin首先,从开始——程序——CA——所

有程序——ERwin Data Modeler

You will first encounter a dialog box entitled "ModelMart Connection Manager"(经理ModelMart连接). Simply click on Cancel.将首先遇到一

个对话框题为“ModelMart Connection Manager”。只需点击“取消”。You will be asked to choose between creating a new model, and opening an existing model, as shown in Figure 1你将被要求之间作出选择,创造了一种新的模式,开放一个现有的模型,如图1所示. For this exercise, create a new model.通过这个练习,创建一个新的模型

Figure 1: Create a new model

The next dialog box, shown in Figure 2, will ask you to choose the template to be used to create the new model. 下一个对话框,如图2所示,会让你选择的模板可以被用来创造新的模型 At this point, you may associate the model with a target DBMS product, such as Microsoft Access, Oracle, DB2, etc.

在这一点上,你可以把这个模型与如Microsoft Access,甲骨文,DB2等目标数据库产品联系在一起 You will have the opportunity to change this choice later, but for now choose Microsoft Access. 你之后将有机会改变这种选择,但是现在选择Microsoft Access。 Also, choose Logical/Physical as the new model type.同时,选择的逻辑或者物理作为新模型形式 This choice will allow us to switch back and forth easily between a logical model (ER Diagram) and a physical model (database schema). 这个选择将让我们轻易之间来回切换逻辑模型(ER图)和物理模型(资料库)

Figure 2: Selecting a model type

ERwin will now display the main window from which most of your ER diagram development will be done, as shown in Figure 3. ERwin现在将显示在主窗口大部分你ER图发展来完成,如图3。

Figure 3: The ERwin Workplace ERwin工作场所

The ERwin workplace consists of two main parts. On the left is the Model Navigator, which displays a hierarchy of items of importance, such as entities, domains, and subject areas. 左面是模型的领航员,显示某一层次的物品的重要性,如实体、领域和课题。 On the right is the Display Window, which will show the ER diagram itself. 右边是显示窗口,它能够显示ER图本身 As you create objects, they will appear in the display window (if they are visual in nature, like entities), and appear in the hierarchy within the Model Navigator.当你创建对象时,他们将会出现在显示器窗口(如果它们是视觉的自然属性,就像实体),并将出现在层级模型导航器。

Setting Preferences 偏好设置

A tool like ER win can accomodate a number of data modeling notations and conventions. 像ER这样工具可以容纳大量的数据建模的符号和对话 In my

class please make the following changes to the preferences before you begin to create your model在我的课上请完成下面的改变的偏好,在你开始之前,创造你的模型:

1.From the Format->Entity Display menu, make sure that Primary Key

Designator is checked从格式- >实体显示菜单,确保主键栏进行检查

2.From the Format->Entity Display menu, make sure that Foreign Key

Designator (FK) is un checked.从格式- >实体显示菜单,确保外国关键指示器(FK)是不能检查

3.From the Format->Entity Display menu, make sure that Show Migrated

Attributes is un checked.从格式- >实体显示菜单,确保显示属性迁移

到un checked

4.From the Format->Relationship Display, make sure that Verb Phrase

is checked. 从格式- >关系显示、确保动词短语进行检查

In addition, you may choose between two different E-R diagramming notations. 另外,你可以选择两种不同的e - r种画图符号In ERwin, click on Model->Model Properties to see the window shown in Figure 3b:点击模型- >窗口模型属性看到如图3b.

Figure 3b: Choice of notation

This tutorial is based on the Information Engineering ("Crows Foot") notation. You may also use IDEF1X, if you wish.本教程是基于信息工程(“乌鸦脚”)的符号。你也可以使用IDEF1X,如果你愿意的话。

Creating an Entity创造一个实体

To create a new entity, click on the entity icon () on the toolbar, or right-click on the word Entity in the Model Navigator. 创建一个新的

实体,点击实体工具栏上的图标(),或者以右键点击这个词中的实体模型导航器 If you click on the entity icon, you then should click on the Display Window where you would like the entity to appear, as shown in Figure 4. 如果你点击了实体图标,那么你应该点击显示窗口,在那里你会喜欢这个实体出现的各位朋友,如图4所示

Figure 4: A new entity

Notice that the default name for the entity is E/x, where x is some number (2 in this case). 注意,默认的名字因为实体是E / x,那里的x是一些数字(2

在这种情况下) Click on the Tab key several times and notice what happens.点击Tab键了好几次,通知会发生些什么 Pressing the tab key cause the focus to cycle between the three main parts of the Entity: 按tab键引起关注焦点,周期之间的三个主要部分的实体 the name of the entity, the primary key attribute(s)主要的关键属性, and the non-primary key attribute(s)时速的关键属性(s). In general, to modify one of these three parts of the entity, you will press the Tab key to cycle to the appropriate part of the entity, then type to add or modify that part of the entity.一般来说,修改这三部分的实体,你会按Tab键循环到适当的一部分,然后输入实体的增加或修改的那部分实体

Right now, press the Tab key until the entity name is highlighted.现在,按Tab键,直到实体名称是突出了 Then type EMPLOYEE, as shown in Figure 5. 然后输入雇员,如图5。

Figure 5: Changing the name of the entity

At this point, you may wish to save and name your diagram to avoid loss should the system or application crash. 在这一点上,你可能想要存起来,说出你的图来避免损失应该系统或应用程序崩溃。

Adding primary key columns添加主键字段

Once you have changed the name to EMPLOYEE, press the Tab key again to move the focus to the next part of the Entity, adding a primary key attribute. 一旦你已经更改了名称给员工,按Tab键来移动焦点再下一部分的实体,添加一个关键属性 Then type the name of the primary key attribute, Emp_Num, as shown in Figure 6. 然后输入名称的属性,Emp_Num主键,如图6。

Figure 6: Adding a primary key attribute

Notice that because of the preferences you set earlier, the primary key attribute has a key icon next to it. 值得注意的是,因为你的喜好设定早些

时候,主键的属性是一个关键的图标旁边。Press the Tab key one more time to bring the focus below the horizontal line in the Entity, where you will add in a number of non-primary key attributes.按Tab键一遍把焦点的水

平线以下的实体,在那里您将加入一定数量的时速关键属性。 Type Emp_Fname, as shown in Figure 7.Emp_Fname型,如图7 When you have typed Emp_Name, press the Enter key (not Tab)当你打了Emp_Name,按回车键(不是选项

卡). Notice what happens当你学得. The cursor is now positioned for you to add another attribute in this same portion of the Entity, the non-primary key attribute portion. 定位光标被现在你添加另一个属性在这个相同的部分实体、时速关键属性分。

Figure 7: Adding non-primary key attributes

Continue adding the following non-primary key attributes: 继续增加下列时速关键属性:

Emp_Lname

Emp_SSN

Emp_Street

Emp_City

Emp_State

Emp_Zipcode

Emp_Phone

Emp_Fax

Your diagram should now look like Figure 8.

Figure 8: The Employee entity

Repeat the entity creation process for the entities and attributes listed in Table 1. 重复这个实体创建过程中为实体及其属性列于表1。

Notice that some of the entities have no primary key attributes (Manager, Associate), and one entity has an attribute which is part of the primary key, but by itself does not constitute a primary key (Inspection). 注意到一些实体属性没有主键(经理、副),和一个实体有一个属性的一部分,而是由主键本身并不会构成一个主键(检验)。As we add relationships to the diagram, the nature of the keys for these entities will become clear.当我们添加关系图,大自然的钥匙,这些实体就变得清晰了 For the time being, be sure that there are no primary key attributes for Manager and Associate, and only one primary key attribute for Inspection, as shown in Figure 9. 随着时间的推移,要确保没有关键属性对经理及员工,只有一个主要的关键属性进行检验,如图9所示

Figure 9: Heartland Properties Entities

Creating Relationships建立人际关系

ER win supports the creation of relationships with three basic kinds of connectivity (ER win支持创造之间的关系三种基本的连通性: one-to-one, one-to-many, and many-to-many. Within the one-to-many category, ER win allows us to distinguish between identifying and non-identifying

one-to-many relationships.这一对范畴,ithin欧文允许我们区分识别和

non-identifying一对多的关系。

One-to-many Relationships

We'll begin with two relationships, between Inspection and Employee and between Inspection and Property.我们可以先开始两个关系,检验和员工之间,检验和财产的权利之间 Inspection is related to both Property and Employee

in one to many relationships. 同时与检验是财产和员工在一对多的关

系 Each Inspection is undertaken at one Property; 在进行每个检查是一套房产each Property may undergo many inspections每处房产,可能经过许多检查. Each Inspection is carried out by one Employee每次检验进行了一名员工; each Employee carries out many Inspections每一位员工进行许多检查. Are these relationships identifying relationships or

non-identifying relationships? 这些是关系识别关系或non-identifying关系吗? Are these relationships identifying relationships or

non-identifying relationships? 这些是关系识别关系或non-identifying关系吗? The issue hinges on the nature of the primary key of Inspection, the entity on the "many" side of the relationship. 问题的关键在于性质的主键的检验、实体上的“许多”方面的关系。 The primary key of Inspection in this example is a composite primary key consisting of two attributes 主键的检验在本例中是一个合成物,主键由两个属性: {Insp_Date,

Prop_ID} The business rule in effect here is that each property has at most one inspection per day Insp_Date Prop_ID }的商业规则,在这里,每一种性质影响的条件下,在大多数人检查每天. One might argue whether or not that is a sound assumption, but lets suppose for the sake of illustration that it is. 一个人可能会争辩说不管那是一种合理的假设,但为了说明我们可以假设它是。 Notice that the primary key of Inspection includes the primary key of Property, the entity with which it has a relationship.值得注意的是,主键检查包括主键的性质、实体与它有关系 For this reason, we say that the relationship between Inspection and Property is an identifying one-to-many relationship. 因为这个原因,我们说,检验和财产之间的关系是一种识别一对多的关系。

An identifying relationship is created by clicking first on the identifying relationship icon ().创建一个识别关系是通过点击第一的

在识别关系图标() Notice that it has the crow's foot notation (indicating "many") and a solid line (indicating identifying). 值得注意的是,它有乌鸦脚的符号(表示“许多”)和一个实线(指着识别) To create an identifying relationship, click first on this icon, then click on the parent entity (on the one side of the relationship) and then click on the child entity (on the many side of the relationship). 创建一个识别关系,点击先在这个图标,然后点击“家长实体(在这边的关系),然后点击孩子实体(在许多一端的关系) In this case, you will click first on the identifying relationship icon, then on Property, then on Inspection. 在这种情况下,你就会点击图标先识别,然后在产权关系,然后在检查 The results are shown in Figure 10. 结果显示于图10

Figure 10: An identifying relationship

Notice that ER win has provided a label "R/1" for the relationship, which is not very helpful. 值得注意的是, ER win已经提供了一个标签" R / 1”的关系,而不是很有帮助 Double-click on the relationship itself to bring up a dialog box in which we can further refine the relationship definition 双击关系本身造就了一个对话框,以这种方式我们能够进一步提炼的关系的定义. Fill out this dialog box as shown in Figure 11. 填写这对话框如图11分

Figure 11: Relationships definition

In the Relationship:text box the relationship is presented in the form parent entity R/1 child entity. 在这段关系的关系:文本框的形式给出了R / 1孩子家长实体的实体 The Verb Phrase portion of this box allows us to define the label to place on the relationship in place of R/1. 这个动词短语的一部分,这盒允许我们来定义标签的地方的关系上所处的R / 1 Since the parent entity is Property and the Child entity is Inspection, the Parent-to-Child verb phrase will read "Property Undergoes Inspection."自从父母实体是财产和孩子的主体是检查、Parent-to-Child动词短语会读"财产经历检查。” The Child-to-Parent verb phrase will read "Inspection Undertaken at Property." 动词短语的Child-to-Parent会读”的检测在进行财产。”

In the Relationship Cardinality portion of this window, we can determine how many child entity occurences may be associated with each parent entity occurence. 人际关系的行集数的一部分,这窗户,我们可以决定了有多少孩子实体检测仪可伴有每个父母实体发生 More specifically, "One Property Undergoes Zero, One or More Inspections." 更具体地说,“一个财产经历零,一个或更多的检查。” Notice that at this point we are also able to define participation. 值得注意的是,在这一点上我们也能够定义的参与。 If each

property had to have undergone at least one inspection in order to be stored in the database, then we could have forced mandatory participation by choosing the One or More option.如果每个财产不得不经历了至少一个检测为了被储存在数据库中,那么,我们就可以迫使强制性参与挑选一个或更多的选择。

Click OK to complete the relationship definition, as shown in Figure 12.点击OK完成关系定义,如图12。

Figure 12: Finished relationship

Notice that when an entity participates as the child in an identifying relationship it is modeled with rounded corners.值得注意的是,当一个实体作为识别的关系那孩子是模仿和圆角。 This notation is used for what in other data modeling tools is called a "Weak Entity".这个符号是用来在其他数据建模工具,一种被称为“弱单位”。

The relationship between Inspection and Employee is somewhat different. 检查和员工之间的关系是有不同的。 It is a one-to-many relationship, but it is non-identifying, because the primary key of Employee is not part of the primary key of Inspection. 这是一个一对多的关系,但它是

non-identifying中的主键,因为雇员没有部分的主键检查 For such a relationship, we must click on the non-identifying relationship icon

(), which uses a dashed line instead of a solid line. 对于这样一个关系,我们必须点击屏幕上的图标()),它使用一个虚线来代替一个实线。

As before, we click on the icon, then the parent entity, then the child entity. 和以前一样,我们点击这个图标,那么父的实体,然后孩子的实

体 Click on the non-identifying relationship icon, then the Employee entity, then the Inspection entity.点击屏幕上的图标,然后

non-identifying员工关系实体,然后检验实体 Double-click on the relationship to bring up the relationship definition window and fill it in as shown in Figure 13. ouble-click的关系来定义窗口和关系把它填上如图13岁。

Figure 13: Non-identifying relationship definition.

As before, we provide more meaningful verb phrases for the relationship. 和以前一样,我们提供更多的有意义的动词短语的关系 As before, since each employee may be associated with zero, one or more inspections, we choose the corresponding cardinality. 和以前一样,因为每个员工可能伴有零,一个或多个检查,我们选择相应的行集数 Unlike before, when we chose the identifying relationship type, we have now chosen the non-identifying relationship type. 不同于以往的,当我们选择了识别关系类型,我们现在已经选好了non-identifying关系类型。 We have the option of indicating whether nulls are permitted or not. 我们可以选择是否允许nulls表示。 This decision regards the participation of the parent entity in a relationship with the child entity. 这一决定将参与实体的父母与孩子的关系实体。 In other words, does each child entity occurence (Inspection) have to be associated with a parent entity occurence (Employee)? 换句话说,每一个孩子的实体(检查)发生有助于家长实体发生(雇员)吗? In this case, the answer yes. Each inspection must be carried out by an employee, or it is not considered a proper inspection. 在这种情况下,答案是的。每项考核必须执行一个雇员,或并不被认为是一个适当的检验。 The participation of Employee in the relationship is mandatory. 在参与的员工之间的关系是强制性的。

Click OK to complete the relationship definition, as shown in Figure 14. 点击OK完成关系定义,如图14。

Figure 14: Non-identifying relationship

Employee and Office also participation in a relationship with each other.员工和办公室也参与相互认识 Each Employee is assigned to one and only one Office, and each Office has one or more Employees. 每个员工被指定到唯一的一间办公室,每个办公室都拥有一个或更多的员工。In this one-to-many relationship, Office is the parent and Employee is the child. 在这一对多的关系,办公室是家长和员工是孩子。 Since the primary key of the child (Employee) does not include the primary key of the parent (Office), this is a non-identifying relationship. 自从主键的孩子(雇员)并不包括主键的父母(办公室),这是一个non-identifying关系。 Click on the non-identifying relationship icon, Office, and Employee to create this relationship. 点击屏幕上的图标non-identifying关系、写字楼及员工,形成了这种关

系。 Double-click on the relationship and fill in the relationship definition window as shown in Figure 15.双击关系并填入关系定义窗口如图15。

Figure 15: A non-identifying relationship with mandatory participation

In Figure 15, see an example of a relationship in which participation is mandatory for both entities. 在图15,看一个例子,这样一种关系,参与对双方都是强制性的实体 The Cardinality indicates that each Office is associated with One or More (but not Zero) Employees.每间办公室的行集数表明,伴随着一个或多个(但不是零)的雇员。 The Relationship Type indicates that this is a non-identifying relationship, and that Nulls are not permitted.他的关系类型显示,这是一个non-identifying关系,Nulls是不允许的。 In other words, each child (Employee) must be associated with a single parent (Office). 换句话说,每个孩子(雇员)必须伴随一个单亲母亲(办公室)。

Complete the relationships by creating a relationship between Office and Property in which each Office manages zero, one, or more properties, and each property is managed by one and only one Office. Your diagram should now appear as shown in Figure 16. 通过创造一种完整的关系办公室和财产关系中,每个办公室管理零,一,或更多属性,并每处房产管理,通过一个而且仅仅是一个办公室。你应该现在就出现图如图16岁。

Erwin工具使用指南

Erwin工具使用指南(版本号:V )

文档修订状况

目录 第一章基本概念 (4) 数据模型(Modal) (4) 视图 (4) 逻辑视图(Logical) (4) 物理视图(Physical) (4) 第二章操作指南 (6) 新建模型 (6) 视图切换 (7) 新建主题区域 (7) 切换主题区域 (9) 编辑主题区域 (10) 选择现有数据实体到指定的主题区域。 (10) 在主题区域新建数据实体 (11) 在主题区域删除数据实体 (12) 数据实体导航 (13)

第一章基本概念 1.1数据模型(Modal) 数据模型是数据实体(Entity)和数据实体间的关系(Relationship)总和。可以简单的理解认为数据实体就是对应数据库表,实体间的关系就是表之间的关系。 1.2视图 Erwin对数据模型提供两种视——逻辑视图、物理视图。 1.2.1逻辑视图(Logical) 是以业务需求的概念对数据模型进行描述。通俗的说,在逻辑视图中我们可以用中文或描述性的语言来描述数据实体(表)和数据实体的属性(字段)。下面就是一个对车辆信信息实体的逻辑视图。 1.2.2物理视图(Physical) 物理视图与逻辑视图一一对应,物理视图是针对一种具体的数据库进行逻辑视图的物理映射。通俗的说,在物理视图中我们必须为每一个在逻辑视图中出现的数据实体(表)指定一个可被具体数据库接纳的表名称,譬如我们使用MySQL作为我们的数据库实现,我们就必须为具体的实体指定一个数据库表名(英文单词或词组),同样的对实体属性(字段)的命名也需进行转换,数据类型也需要具体为数据库支持的数据类型。下面就是对应车辆信息实体针对MySQL数据的物理视图。

ERwin使用说明(中英文)

Getting Started with ER win (Erwin 入门) by Dr. Peter Wolcott Department of Information Systems and Quantitative Analysis College of Information Science and Technology University of Nebraska at Omaha(由内布拉斯加州的奥马哈大学信息科学与技术学院门的信息系统和定量分析博士彼得著) Introduction (介绍) ER win is a popular data modeling tool used by a number of major companies in Omaha and throughout the world. (Erwin是受奥马哈和世界各地的一些主要的公司欢迎的数据模型工具) The product is currently owned, developed, and marketed by Computer Associates, a leading software developer.(该产品是由具有领导地位的CA软件开发公司拥有、开发和销售) The product supports a variety of aspects of database design, including data modeling, forward engineering (the creation of a database schema and physical database on the basis of a data model), and reverse engineering (the creation of a data model on the basis of an existing database) for a wide variety of relational DBMS, including Microsoft Access, Oracle, DB2, Sybase, and others.该软件为多种多样的关系型数据库管理系统,包括 Microsoft Access,甲骨文,Sybase,DB2,和其他人提供支持数据库设计的各个方面,包括数据建模、正向工程(在现有的数据模型的基础上创建数据模式和物理数据库)和逆向工程(在现在的数据库基础上创建数据模型) This brief tutorial steps you through the process of creating a data model using ER win.(你可以通过这个简单教程中的步骤运用Erwin来创建数据模 型) It will not explain all aspects of ERwin, but will show you the minimum necessary to create and use data models for this class. (这个课程不可能全面地讲解Erwin,但它向你展示了必要的最基本的创建和使用数据模型的知识) It consists of three major segments, which correspond to the project-related assignments in your class: (这个课程由三个主要部分组成,它与有关项目任务相符) 1.Creation of a basic data model (Conceptual data model) 创建一个 基本的数据模型(概念数据模型) 2.Creation of a database schema 建立数据库模式 3.Creation of the database创建数据库

ERwin简单教程

Erwin教程 erwin是一个数据库关系实体模型(ER Model)设计工具,与Power Designer(Sybase公司开发)成为最常用的两种数据库设计工具。目前该工具被CA收购,成为CA数据库解决方案中的一个关键部分。与微软的Vision相比,erwin只能设计er model,而且设计界面选项较多,相对来说并不那么友好,增加了使用的难度。但如果你是一个出色的数据库应用开发者,那你一定会发现erwin的好处。因为在设计模型层次和复杂度提高以后,visio难以应付众多的数据对象设计和对象之间的关系设计。而且erwin提供了数据库正向工程、逆向工程和文档正向工程功能,可以把设计直接实施到数据库后者把数据库中的对象信息读到erwin设计中,也可以生成设计文档,格式还可以自动定义。在本教程中,将告诉大家我是怎样简单的使用erwin来进行数据库设计的。这里强调了简单二字,就是说有很多只有20%机会用到的80%的功能本教程是不会介绍的。本文用到的erwin版本是4.0。 教程一:Table & Subject Areas Table是数据库中最基本的物理元素,保持了应用的持久数据。在普通的信息系统数据库结构设计中,有90%的工作是在设计table。而table的字段定义和表间的关系,也反映了整个系统的数据流图和大致的业务流程。 Subject Areas是erwin提供逻辑元素,在实际数据库中并不存在。它的含义是把物理元素和逻辑元素按照实际意义划分成各个主题,在主题域中添加对元素的引用,起到一个按图索骥和目录的作用。有一个缺省的主题域Main Subject Area,所有的元素都会在该主题域中存在。在我本人的设计方法中,我会新建诸如“参数表”,“分户表”,“控制表”,“临时表”,“明细表”,“日志表”和“总帐”等主题域。 下面跟着我的说明,一步一步来设计table: 装好erwin4.0后,打开程序。提示你是创建一个新模型还是打一个已有的,选择创建新模型。在Model Type中选择Physical(物理模型),下面的Target Database默认值就是Oracle8.x,使用默认值,点击OK,创建了一个空白的模型。

Erwin工具使用指南

Erwin工具使用指南(版本号:V 1.0)

文档修订状况

目录 第一章基本概念 (4) 1.1 数据模型(Modal) (4) 1.2 视图 (4) 1.2.1 逻辑视图(Logical) (4) 1.2.2 物理视图(Physical) (4) 第二章操作指南 (6) 2.1 新建模型 (6) 2.2 视图切换 (7) 2.3 新建主题区域 (7) 2.4 切换主题区域 (9) 2.5 编辑主题区域 (10) 2.5.1 选择现有数据实体到指定的主题区域。 (10) 2.5.2 在主题区域新建数据实体 (11) 2.5.3 在主题区域删除数据实体 (12) 2.6 数据实体导航 (13)

第一章基本概念 1.1 数据模型(Modal) 数据模型是数据实体(Entity)和数据实体间的关系(Relationship)总和。可以简单的理解认为数据实体就是对应数据库表,实体间的关系就是表之间的关系。 1.2 视图 Erwin对数据模型提供两种视——逻辑视图、物理视图。 1.2.1 逻辑视图(Logical) 是以业务需求的概念对数据模型进行描述。通俗的说,在逻辑视图中我们可以用中文或描述性的语言来描述数据实体(表)和数据实体的属性(字段)。下面就是一个对车辆信信息实体的逻辑视图。 1.2.2 物理视图(Physical) 物理视图与逻辑视图一一对应,物理视图是针对一种具体的数据库进行逻辑视图的物理映射。通俗的说,在物理视图中我们必须为每一个在逻辑视图中出现的数据实体(表)指定一个可被具体数据库接纳的表名称,譬如我们使用MySQL作为我们的数据库实现,我们就必须为具体的实体指定一个数据库表名(英文单词或词组),同样的对实体属性(字段)的命名也需进行转换,数据类型也需要具体为数据库支持的数据类型。下面就是对应车辆信息实体针对MySQL数据的物理视图。

ERWin简明教程

ERWIN操作手册 操作手册 文档修订 版本日期更改人描述(注明修改的条款或页)V1.0 王朝操作手册 2003年9月8日 山东浪潮齐鲁软件产业股份有限公司 电子政务产品事业部

目录 1.通过Erwin 建立er1文件...........................................................................................................2 2用ERWin 的方法将ERWin 中的表导入到数据库中.................................................................6 3用ERWin 的方法将数据库表结构导入到ERWin 中 (18) Erwin 数据库设计工具 介绍 数据库设计错误将会导致在很长一段时间内不断听到各种抱怨,因此,选择 一个适合的数据库开发工具对数据环境进行规范将非常重要 . Erwin 在物理数据库的生成和反向生成、双向同步和比较功能方面居领先地位 ,可以进行逆向工程、能够自动生成文档、支持与数据库同步、支持 团队式 开发,所支持的数据库多达20多种。 Erwin 数据库设计工具可以用于设 计生成客户机/ 服务器、Web 、Intranet 和数据仓库等应用程序数据库。 1.1.通过通过Erwin 建立er1文件文件 在开始\程序菜单中打开Erwin,在Erwin 主窗口中单击create model 图标弹出如下窗口:

在new model type选项中选择physical项,在database中选择oracle类型,version中选择9.x版本,如下图: 点击ok按钮. 1.1建表

Erwin的使用手册

ERwin的使用手册 1. ERwin简介 ERwin是一个数据库关系实体模型(ER Model)设计工具,与Power Designer(Sybase公司开发)成为最常用的两种数据库设计工具。目前该工具被CA收购,成为CA数据库解决方案中的一个关键部分。与微软的Vision相比,ERwin只能设计er model,而且设计界面选项较多,相对来说并不那么友好,增加了使用的难度。但如果你是一个出色的数据库应用开发者,那你一定会发现ERwin的好处。因为在设计模型层次和复杂度提高以后,visio难以应付众多的数据对象设计和对象之间的关系设计。而且ERwin提供了数据库正向工程、逆向工程和文档正向工程功能,可以把设计直接实施到数据库后者把数据库中的对象信息读到ERwin设计中,也可以生成设计文档,格式还可以自动定义。在本教程中,将告诉大家我是怎样简单的使用ERwin来进行数据库设计的。这里强调了简单二字,就是说有很多只有20%机会用到的80%的功能本教程是不会介绍的。本文用到的ERwin版本是4.0。 2.ERwin使用 2.1正向工程 ⑴新建文件,如图1所示: 图1 Logical:只创建逻辑模型 Physical:只创建物理模型 Logical/ Physical:二者均可创建

⑵假设创建逻辑模型,可选择Logical,如图2所示: 工 绘图区 图2 常用的有以下几种: :用于移动; :用于创建实体。 :用于“Complete sub-category” :用于连接。“Identifying relationship”,即为标值关系。注意:先点的为被引用的表,后点的为引用的表。 :用于多对多连接。“Many-to-many relationship”注意:先点的为被引用的表,后点的为引用的表。 :用于连接。“Non- identifying relationship”,即为非标值关系。注意:先点的为被引用的表,后点的为引用的表。

相关主题
文本预览
相关文档 最新文档