您好,欢迎访问三七文档
当前位置:首页 > 财经/贸易 > 资产评估/会计 > ERWin建模基础教程(非常好的入门教程)
BusinessIntelligenceWGODS©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTDERWin建模基础教程2020/6/15BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD|15June2020|ERWin简介•目前流行的数据库建模工具PowerDesignerRoseERwin•ERwin全称是AllFusionERwinDataModeler,是CA公司AllFusion品牌下的建模套件之一BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD|15June2020|常用工具栏介绍选择边框色范围內放大模型主题选择放大打开模型新建模型数据浏览物理/逻辑模型切换建立唯一子类新建实体正常显示縮小打印保存模板生成显示实体的名字字体颜色放大到和视窗一样显示实体及属性选择背景色键标识多对多关系标识非键标识实体定义BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD工具栏设置可以依据使用的需要设置工具栏上显示的工具条|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD|15June2020|如何新建工程•单击file选择new键或者工具栏上的CreateModel按钮BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何新建工程出现如下界面,依据需求选择,配置好后按OK键。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何建主题域下面的两种方法:|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何建主题域双击或者依据弹出的界面设置域名称|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何选择主题域单击所选的主题域,按右键选择GoTo|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何选择逻辑或物理模型标题栏中有快捷选择|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何建立实体表单击逻辑模型下的Entity,物理模型下的Independenttable,如下图:|15June2020|在建模区域的空白外单击就会出现一个实体BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置逻辑实体表名与属性选中要设置的表,双击或者右键,如下:|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置逻辑实体表名与属性弹出如下图的实体属性窗口:|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置逻辑实体表字段属性选中要设置的实体表,右键--Attributes…出现下面的Attributes属性框,再选择New按钮:|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置逻辑实体表字段属性出现NewAttribute界面,设置相关属性,点OK按钮。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置逻辑实体表字段属性弹出如下属性框:可以选择New新建实体的字段属性,选择Rename修改字段属性,选择Delete删除相关属性;在General选项卡中选择相应的数据域类型,如果是关键字,勾选PrimaryKey|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置逻辑实体表字段属性选择Datatype选项卡设置字段的数据类型,由于在General中选择了字段的数据域Domain类型,Datatype选项卡会选择该域的默认数据类型,然后可依据情况设置相应的数据类型长度等。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置逻辑实体表字段属性选择Definition选项卡设置字段的逻辑定义(注释),一般与字段逻辑名一致,单击OK按钮,一个逻辑字段的属性设置完成。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置物理实体表属性选择物理模型,选中要设置的表右键TablePropertiesComment,设置表的物理属性|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置物理实体表属性在弹出的界面中设置输入Name,Owner,Comment,Comment通常与逻辑名称一致。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置物理实体字段属性选中要设置的物理表实体,右键Columns,设置物理表的字段属性.|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置物理实体字段属性弹出Columns字段属性界面,依次选择General,ORACLE,Comment选项卡,前两个选项卡逻辑模式下已经设置好字段属性的数据类型,长度,只需要设置Comment选项卡为逻辑字段名一致。而New,Rename,Delete按钮与之前逻辑模式下的操作基本一致。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置实体表的索引选中要设置的物理表实体,右键Indexes,弹出索引设置界面,设置物理表的索引属性.|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置实体表的索引在索引属性界面中单击New,出现NewIndex界面,设置索引名称,不选中Unique,单击OK。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置实体表的索引依据需要,选择索引的成员字段,然后点OK。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置实体表的颜色,字体在逻辑或物理模式下,选中要设置的实体表,右键ObjectFont&Color,弹出实体表的字体与颜色设置界面。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置实体表的颜色,字体依据需要设置实体表的名称的字段,窗体的颜色。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何设置实体界面显示选择属性数据类型,外键和数据类型的图标显示。|15June2020|选择前及选择后的区别BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD|15June2020|如何生成建表SQL语句选择物理模式,选择ToolsForwardEngineer/SchemaGeneration,弹出以下界面,选择EditOptions,然后在左边选择需要生成的选项:BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何生成建表SQL语句选择ShowSelectedOnly查看选中的选项,通常选择以下几项:|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何生成建表SQL语句单击Filter按钮,弹出Select选择界面,依据需要选择相关表,选择完毕后单击Close按钮。|15June2020|BusinessIntelligenceR&DDepartment©CopyrightGuangZhouSunriseElectronicsDevelopmentCO.,LTD如何生成建表SQL语句单击Preview按钮,弹出生成SQL的界面,可以复制出SQL语句或者单击Generate按钮生成DDL文件。|15June2020|BusinessInt
本文标题:ERWin建模基础教程(非常好的入门教程)
链接地址:https://www.777doc.com/doc-5909343 .html