keys![在这里插入图片描述](https://img-blog.csdnimg.cn/20190629225340285.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9pcmlzc3N5LmJsb2cuY3Nkbi5uZXQ=,size_16,color_FFFFFF,t_70)
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
-
若一个对象只对其名字及单值感兴趣,则可作为属性,如性别;若一个对象除名字外,本身还有其他属性需描述,则该对象应定义为实体集。如电话, 部门.
-
一个对象不能同时作为实体和属性.
-
一个实体集不能与另一实体集的属性相关联,只能实体与实体相联系