数据库管理系统概述英文版课件:2 ER Diagram.ppt

数据库管理系统概述英文版课件:2 ER Diagram.ppt

  1. 1、本文档共52页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
COMP231 * One-to-one relationship One-to-one (1-to-1) relationship An entity in A is related to at most one entity in B An entity in B is related to at most one entity in A. 1-to-1 A B COMP231 * One-to-one relationship A customer is associated with at most one loan via the relationship borrower A loan is associated with at most one customer via borrower 1-to-1 A B Key = {customer-id, loan-number} Not a candidate key! Candidate key = ? COMP231 * Many-to-many Relationship Many-to-many Relationship An entity in A is associated with any number of entities in B An entity in B is associated with any number of entities in A That is, there is no restriction in the mapping. Many-to-Many A B COMP231 * Many-to-many Relationship A customer is associated with several (possibly 0) loans via borrower A loan is associated with several (possibly 0) customers via borrower Many-to-Many A B Key = {customer-id, loan-number} Candidate key! COMP231 * Participation Constraint The above constraints (e.g., 1-to-many) tells us that a customer borrows some loans. A natural question to ask is to whether every loan is borrowed by at least one customer. Suppose that each loan is borrowed by at least one customer. Such a constraint is called a participation constraint. 1-to Many A B COMP231 * Participation Constraint We can classify participation in relationships as follows. Total Each entity in the entity set must be associated in at least one relationship Partial Each entity in the entity set may (or may not) be associated in a relationship 1-to Many A B COMP231 * Participation Constraint The participation of loan in borrower is total Every loan must be borrowed by a customer The participation of customer in borrow is partial Some customers may (or may not) borrow loans COMP231 * Outline Entity Relationship Binary relationship Weak Entity/Strong Entity Class Hierarchy Relationship Non-Binary relationship COMP231 * Weak Entities Strong Entity An entity can be uniquely identified by some at

您可能关注的文档

文档评论(0)

学习让人进步 + 关注
实名认证
内容提供者

活到老,学到老!知识无价!

1亿VIP精品文档

相关文档

相关课程推荐