文章目录
The E-R model is very useful in mapping the meanings and interactions of real-world enterprises onto a conceptual schema.
E-R模型
在将现实企业的含义和交互
映射到
概念模式
方面非常有用。
E-R 模型的三个要素
- Entity Sets (实体集)
- Relationship Sets (联系集)
- Attributes (属性)
1.Entity 和 Entity Sets
先“具象地”认识一下,这个实体集:
看图说话:
- 实体是存在的物体,可以区别于其他物体。
比如上图的“一个(特定的)实体(76543,Singh,Finace,80000) - 实体集: 有某种共性的实体的集合
比如上图,各个学生(实体)组成的instructor实体集 - 属性: 实体有属性。好比(实体)人,有姓名性别年龄。
2.Relationship 和 Relationship Sets
Relationship: 指,(两个或者多个)实体之间的联系
如: 一个学生对应一个导师。
Relationship Set : 指,相同类型关系的集合
正规的说,Relationship Set 是 n >= 2个实体集上的数学关系,每个实体取自一个实体集
联系也可有属性 (可称之为,描述型属性(descriptive attributes))
例如,实体集教员和学生之间的:Advisor 关系集 。
可具有date属性,date就是描述型属性
(跟踪学生何时开始与教员相关联)