kc第讲-数据库设计(二)其它方面知识.pptVIP

kc第讲-数据库设计(二)其它方面知识.ppt

  1. 1、本文档共41页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
kc第讲-数据库设计(二)其它方面知识

第7讲: (第6章) 数据库设计(二): 数据库设计的其它方面 重庆大学计算机学院 Reduction to Relation Schemas E-R图是数据库系统设计的概念设计阶段,之后我们还需要进行逻辑设计和物理设计。 如何将E-R图模型转化为关系模式是逻辑设计的任务。 Primary keys allow entity sets and relationship sets to be expressed uniformly as relation schemas that represent the contents of the database. A database which conforms to an E-R diagram can be represented by a collection of schemas. For each entity set and relationship set there is a unique schema that is assigned the name of the corresponding entity set or relationship set. Each schema has a number of columns (generally corresponding to attributes), which have unique names. Representing Entity Sets as Schemas 强实体集的表示:A strong entity set reduces to a schema with the same attributes. (产生一新关系模式) 实体的键?关系的键 弱实体集的表示:A weak entity set becomes a table that includes a column for the primary key of the identifying strong entity set (产生一新关系模式) 主实体的键+弱实体的偏键?关系的键 Example: payment = ( loan_number, payment_number, payment_date, payment_amount ) Representing Relationship Sets(n:m) as Schemas n:m联系的表示:A many-to-many relationship set is represented as a schema with attributes for the primary keys of the two participating entity sets, and any descriptive attributes of the relationship set. (产生一新模式) Example: schema for relationship set borrower borrower = (customer_id, loan_number ) Redundancy of Schemas(1:n1:1,完全参与时) Redundancy of Schemas (其它情形) 1:n联系为部分参与时:If participation is partial on the “many” side, replacing a schema by an extra attribute in the schema corresponding to the “many” side could result in null values 例子:雇员-部门经理 (n:1) , 某员工不属于任何部门 雇员(姓名,工种,参加工作时间) 部门经理(部门,经理) 雇员(姓名,工种,参加工作时间,部门) 添加的额外属性(可取Null) 弱实体联系:The schema corresponding to a relationship set linking a weak entity set to its identifying strong entity set is redundant. Example: The payment schema already contains the attributes that would appear in the loan_payment schem

文档评论(0)

panguoxiang + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档