ERwin使用说明中英文.docx
- 文档编号:23548114
- 上传时间:2023-05-18
- 格式:DOCX
- 页数:26
- 大小:1,010.08KB
ERwin使用说明中英文.docx
《ERwin使用说明中英文.docx》由会员分享,可在线阅读,更多相关《ERwin使用说明中英文.docx(26页珍藏版)》请在冰豆网上搜索。
ERwin使用说明中英文
GettingStartedwithERwin(Erwin入门)
byDr.PeterWolcott
DepartmentofInformationSystemsandQuantitativeAnalysis
CollegeofInformationScienceandTechnology
UniversityofNebraskaatOmaha(由内布拉斯加州的奥马哈大学信息科学与技术学院门的信息系统和定量分析博士彼得著)
Introduction(介绍)
ERwinisapopulardatamodelingtoolusedbyanumberofmajorcompaniesinOmahaandthroughouttheworld. (Erwin是受奥马哈和世界各地的一些主要的公司欢迎的数据模型工具)Theproductiscurrentlyowned,developed,andmarketedbyComputerAssociates,aleadingsoftwaredeveloper.(该产品是由具有领导地位的CA软件开发公司拥有、开发和销售) Theproductsupportsavarietyofaspectsofdatabasedesign,includingdatamodeling,forwardengineering(thecreationofadatabaseschemaandphysicaldatabaseonthebasisofadatamodel),andreverseengineering(thecreationofadatamodelonthebasisofanexistingdatabase)forawidevarietyofrelationalDBMS,includingMicrosoftAccess,Oracle,DB2,Sybase,andothers.该软件为多种多样的关系型数据库管理系统,包括MicrosoftAccess,甲骨文,Sybase,DB2,和其他人提供支持数据库设计的各个方面,包括数据建模、正向工程(在现有的数据模型的基础上创建数据模式和物理数据库)和逆向工程(在现在的数据库基础上创建数据模型)
ThisbrieftutorialstepsyouthroughtheprocessofcreatingadatamodelusingERwin.(你可以通过这个简单教程中的步骤运用Erwin来创建数据模型) ItwillnotexplainallaspectsofERwin,butwillshowyoutheminimumnecessarytocreateandusedatamodelsforthisclass.(这个课程不可能全面地讲解Erwin,但它向你展示了必要的最基本的创建和使用数据模型的知识) Itconsistsofthreemajorsegments,whichcorrespondtotheproject-relatedassignmentsinyourclass:
(这个课程由三个主要部分组成,它与有关项目任务相符)
1.Creationofabasicdatamodel(Conceptualdatamodel)创建一个基本的数据模型(概念数据模型)
2.Creationofadatabaseschema建立数据库模式
3.Creationofthedatabase创建数据库
Thistutorialisastaticone,suitableforprinting.本教程是一个静态的,适合印刷Atutorialusingscreencapturesandnarrationisalsoavailable.一个指南使用屏幕捕捉和叙述是可用的。
Section1.Creationofabasicdatamodel
YouwillbecreatingadatamodelsimilartothatcreatedfortheHeartlandPropertiescasestudyusedinclass.教程中你将创建一个和研究心脏地带个案相似的数据模型 TheEntitiesinvolvedinthismodelinclude:
Employee,Office,Property,andInspection. 参与本次的实体模型包括:
员工、办公、财产、及检验。
First,invokeERwinfromStart->Programs->ComputerAssociates->AllFusion->ERwinDataModeler-> Erwin首先,从开始——程序——CA——所有程序——ERwinDataModeler
Youwillfirstencounteradialogboxentitled"ModelMartConnectionManager"(经理ModelMart连接). SimplyclickonCancel.将首先遇到一个对话框题为“ModelMartConnectionManager”。
只需点击“取消”。
Youwillbeaskedtochoosebetweencreatinganewmodel,andopeninganexistingmodel,asshowninFigure1你将被要求之间作出选择,创造了一种新的模式,开放一个现有的模型,如图1所示. Forthisexercise,createanewmodel.通过这个练习,创建一个新的模型
Figure1:
Createanewmodel
Thenextdialogbox,showninFigure2,willaskyoutochoosethetemplatetobeusedtocreatethenewmodel.下一个对话框,如图2所示,会让你选择的模板可以被用来创造新的模型 Atthispoint,youmayassociatethemodelwithatargetDBMSproduct,suchasMicrosoftAccess,Oracle,DB2,etc.在这一点上,你可以把这个模型与如MicrosoftAccess,甲骨文,DB2等目标数据库产品联系在一起 Youwillhavetheopportunitytochangethischoicelater,butfornowchooseMicrosoftAccess.你之后将有机会改变这种选择,但是现在选择MicrosoftAccess。
Also,chooseLogical/Physicalasthenewmodeltype.同时,选择的逻辑或者物理作为新模型形式 Thischoicewillallowustoswitchbackandfortheasilybetweenalogicalmodel(ERDiagram)andaphysicalmodel(databaseschema).这个选择将让我们轻易之间来回切换逻辑模型(ER图)和物理模型(资料库)
Figure2:
Selectingamodeltype
ERwinwillnowdisplaythemainwindowfromwhichmostofyourERdiagramdevelopmentwillbedone,asshowninFigure3.ERwin现在将显示在主窗口大部分你ER图发展来完成,如图3。
Figure3:
TheERwinWorkplaceERwin工作场所
TheERwinworkplaceconsistsoftwomainparts. OntheleftistheModelNavigator,whichdisplaysahierarchyofitemsofimportance,suchasentities,domains,andsubjectareas.左面是模型的领航员,显示某一层次的物品的重要性,如实体、领域和课题。
OntherightistheDisplayWindow,whichwillshowtheERdiagramitself.右边是显示窗口,它能够显示ER图本身 Asyoucreateobjects,theywillappearinthedisplaywindow(iftheyarevisualinnature,likeentities),andappearinthehierarchywithintheModelNavigator.当你创建对象时,他们将会出现在显示器窗口(如果它们是视觉的自然属性,就像实体),并将出现在层级模型导航器。
SettingPreferences偏好设置
AtoollikeERwincanaccomodateanumberofdatamodelingnotationsandconventions.像ER这样工具可以容纳大量的数据建模的符号和对话 Inmyclasspleasemakethefollowingchangestothepreferencesbeforeyoubegintocreateyourmodel在我的课上请完成下面的改变的偏好,在你开始之前,创造你的模型:
1.FromtheFormat->EntityDisplaymenu,makesurethatPrimaryKeyDesignatorischecked从格式->实体显示菜单,确保主键栏进行检查
2.FromtheFormat->EntityDisplaymenu,makesurethatForeignKeyDesignator(FK)isunchecked.从格式->实体显示菜单,确保外国关键指示器(FK)是不能检查
3.FromtheFormat->EntityDisplaymenu,makesurethatShowMigratedAttributesisunchecked.从格式->实体显示菜单,确保显示属性迁移到unchecked
4.FromtheFormat->RelationshipDisplay,makesurethatVerbPhraseischecked.从格式->关系显示、确保动词短语进行检查
Inaddition,youmaychoosebetweentwodifferentE-Rdiagrammingnotations. 另外,你可以选择两种不同的e-r种画图符号InERwin,clickonModel->ModelPropertiestoseethewindowshowninFigure3b:
点击模型->窗口模型属性看到如图3b.
Figure3b:
Choiceofnotation
ThistutorialisbasedontheInformationEngineering("CrowsFoot")notation. YoumayalsouseIDEF1X,ifyouwish.本教程是基于信息工程(“乌鸦脚”)的符号。
你也可以使用IDEF1X,如果你愿意的话。
CreatinganEntity创造一个实体
Tocreateanewentity,clickontheentityicon(
)onthetoolbar,orright-clickonthewordEntityintheModelNavigator.创建一个新的实体,点击实体工具栏上的图标(
),或者以右键点击这个词中的实体模型导航器 Ifyouclickontheentityicon,youthenshouldclickontheDisplayWindowwhereyouwouldliketheentitytoappear,asshowninFigure4.如果你点击了实体图标,那么你应该点击显示窗口,在那里你会喜欢这个实体出现的各位朋友,如图4所示
Figure4:
Anewentity
NoticethatthedefaultnamefortheentityisE/x,wherexissomenumber(2inthiscase).注意,默认的名字因为实体是E/x,那里的x是一些数字(2在这种情况下) ClickontheTabkeyseveraltimesandnoticewhathappens.点击Tab键了好几次,通知会发生些什么 PressingthetabkeycausethefocustocyclebetweenthethreemainpartsoftheEntity:
按tab键引起关注焦点,周期之间的三个主要部分的实体 thenameoftheentity,theprimarykeyattribute(s)主要的关键属性,andthenon-primarykeyattribute(s)时速的关键属性(s). Ingeneral,tomodifyoneofthesethreepartsoftheentity,youwillpresstheTabkeytocycletotheappropriatepartoftheentity,thentypetoaddormodifythatpartoftheentity.一般来说,修改这三部分的实体,你会按Tab键循环到适当的一部分,然后输入实体的增加或修改的那部分实体
Rightnow,presstheTabkeyuntiltheentitynameishighlighted.现在,按Tab键,直到实体名称是突出了 ThentypeEMPLOYEE,asshowninFigure5.然后输入雇员,如图5。
Figure5:
Changingthenameoftheentity
Atthispoint,youmaywishtosaveandnameyourdiagramtoavoidlossshouldthesystemorapplicationcrash.在这一点上,你可能想要存起来,说出你的图来避免损失应该系统或应用程序崩溃。
Addingprimarykeycolumns添加主键字段
OnceyouhavechangedthenametoEMPLOYEE,presstheTabkeyagaintomovethefocustothenextpartoftheEntity,addingaprimarykeyattribute.一旦你已经更改了名称给员工,按Tab键来移动焦点再下一部分的实体,添加一个关键属性 Thentypethenameoftheprimarykeyattribute,Emp_Num,asshowninFigure6.然后输入名称的属性,Emp_Num主键,如图6。
Figure6:
Addingaprimarykeyattribute
Noticethatbecauseofthepreferencesyousetearlier,theprimarykeyattributehasakeyiconnexttoit.值得注意的是,因为你的喜好设定早些时候,主键的属性是一个关键的图标旁边。
PresstheTabkeyonemoretimetobringthefocusbelowthehorizontallineintheEntity,whereyouwilladdinanumberofnon-primarykeyattributes.按Tab键一遍把焦点的水平线以下的实体,在那里您将加入一定数量的时速关键属性。
TypeEmp_Fname,asshowninFigure7.Emp_Fname型,如图7 WhenyouhavetypedEmp_Name,presstheEnterkey(notTab)当你打了Emp_Name,按回车键(不是选项卡). Noticewhathappens当你学得. ThecursorisnowpositionedforyoutoaddanotherattributeinthissameportionoftheEntity,thenon-primarykeyattributeportion. 定位光标被现在你添加另一个属性在这个相同的部分实体、时速关键属性分。
Figure7:
Addingnon-primarykeyattributes
Continueaddingthefollowingnon-primarykeyattributes:
继续增加下列时速关键属性:
Emp_Lname
Emp_SSN
Emp_Street
Emp_City
Emp_State
Emp_Zipcode
Emp_Phone
Emp_Fax
YourdiagramshouldnowlooklikeFigure8.
Figure8:
TheEmployeeentity
RepeattheentitycreationprocessfortheentitiesandattributeslistedinTable1.重复这个实体创建过程中为实体及其属性列于表1。
Entity
Attributes
Entity
Attributes
OFFICE
Office_Num(pk)
Office_Street
Office_City
Office_State
Office_Zipcode
Office_Name
Office_Phone
Office_Fax
INSPECTION
Insp_Date(pk)
Insp_Comments
PROPERTY
Prop_ID(pk)
Prop_Street
Prop_City
Prop_State
Prop_Type
Prop_Baths
Prop_Rooms
Prop_MonthlyRent
MANAGER
Man_Salary
Man_Car_Allowance
ASSOCIATE
Assoc_Hourly_Rate
Table1:
EntitiesandAttributes
Noticethatsomeoftheentitieshavenoprimarykeyattributes(Manager,Associate),andoneentityhasanattributewhichispartoftheprimarykey,butbyitselfdoesnotconstituteaprimarykey(Inspection). 注意到一些实体属性没有主键(经理、副),和一个实体有一个属性的一部分,而是由主键本身并不会构成一个主键(检验)。
Asweaddrelationshipstothediagram,thenatureofthekeysfortheseentitieswillbecomeclear.当我们添加关系图,大自然的钥匙,这些实体就变得清晰了 Forthetimebeing,besurethattherearenoprimarykeyattributesforManagerandAssociate,andonlyoneprimarykeyattributeforInspection,asshowninFigure9.随着时间的推移,要确保没有关键属性对经理及员工,只有一个主要的关键属性进行检验,如图9所示
Figure9:
HeartlandPropertiesEntities
CreatingRelationships建立人际关系
ERwinsupportsthecreationofrelationshipswiththreebasickindsofconnectivity(ERwin支持创造之间的关系三种基本的连通性:
one-to-one,one-to-many,andmany-to-many. Withintheone-to-manycategory,ERwinallowsustodistinguishbetweenidentifyingandnon-identifyingone-to-manyrelationships.这一对范畴,ithin欧文允许我们区分识别和non-identifying一对多的关系。
One-to-manyRelationships
We'llbeginwithtworelationships,betweenInspectionandEmployeeandbetweenInspectionandProperty.我们可以先开始两个关系,检验和员工之间,检验和财产的权利之间 InspectionisrelatedtobothPropertyandEmployeeinonetomanyrelationships.同时与检验是财产和员工在一对多的关系 EachInspectionisundertakenatoneProperty;在进行每个检查是一套房产each
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ERwin 使用说明 中英文