Lecture 05. E-R model

keys在这里插入图片描述
E-R Diagram
  • Rectangles represent entity sets.
  • Diamonds represent relationship sets.
  • Lines link attributes to entity sets and entity sets to relationship sets.
  • Ellipses represent attributes.
    • Double ellipses represent multivalued attributes.
    • Dashed ellipses denote derived attributes.
  • Underline indicates primary key attributes.

在这里插入图片描述
在这里插入图片描述

  • We express cardinality constraints by drawing either a directed line (→), signifying “one”, or an undirected line (—), signifying “many”, between the relationship set and the entity set.
    在这里插入图片描述

  • Total participation (全参与) (indicated by double line): every entity in the entity set participates in at least one relationship in the relationship set.
    E.g., participation of loan in borrower is total.
    Every loan must have a customer associated to it via borrower.

  • Partial participation (部分参与): some entities may not participate in any relationship in the relationship set.
    在这里插入图片描述

  • An entity set that does not have a primary key is referred to as a weak entity set
    The discriminator or partial key (分辨符或部分码) of a weak entity set is the set of attributes that distinguishes among all those entities in a weak entity set that depend on one particular strong entity
    在这里插入图片描述在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述在这里插入图片描述在这里插入图片描述

  • 若一个对象只对其名字及单值感兴趣,则可作为属性,如性别;若一个对象除名字外,本身还有其他属性需描述,则该对象应定义为实体集。如电话, 部门.

  • 一个对象不能同时作为实体和属性.

  • 一个实体集不能与另一实体集的属性相关联,只能实体与实体相联系

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值