# 实体—联系模型

实体—联系（ER）模型是一种用于[数据库设计](https://www.edgepedia.org/zh/database-design)的高级概念数据模型，它将现实世界表示为实体、实体之间的联系以及描述二者的属性。该模型由陈品山（Peter P. S. Chen）在论文《实体—联系模型：迈向数据的统一视图》中提出，发表于《ACM数据库系统汇刊》第1卷第1期（1976年3月），第9–36页；此前一个版本于1975年9月在[马萨诸塞州弗雷明汉](https://www.edgepedia.org/zh/framingham-massachusetts)举行的超大型数据库国际会议上宣读。<sup>[1](https://openlib.org/home/krichel/courses/lis512/readings/chen76theentity-relationship.pdf)</sup> 该模型至今仍是数据库概念建模的标准工具。<sup>[2](https://scholarsmine.mst.edu/bio_inftec_facwork/283/)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | 陈品山，《实体—联系模型：迈向数据的统一视图》，ACM TODS 1(1)，1976年3月，第9–36页；早期版本于1975年9月22–24日在马萨诸塞州弗雷明汉的VLDB会议上宣读<sup>[1](https://openlib.org/home/krichel/courses/lis512/readings/chen76theentity-relationship.pdf)</sup> |
| 目的 | 一种用于数据库设计的高级概念模型，陈品山将其定位为综合了网状模型、关系模型和实体集模型三者优点的模型<sup>[1](https://openlib.org/home/krichel/courses/lis512/readings/chen76theentity-relationship.pdf)</sup><sup> • </sup><sup>[3](https://people.cs.pitt.edu/~chang/156/03ERmodel.html)</sup> |
| 核心构造 | 实体类型、联系类型和属性；联系可以带有自己的属性，例如WORKS_ON上的HoursPerWeek<sup>[4](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDRelationships.html)</sup> |
| 基数约束 | 基数比为1:1、1:N和M:N；基数标识最大值，参与度标识最小值<sup>[5](https://cs-courses.mines.edu/csci403/fall2018/lectures/L13-ERD.pdf)</sup> |
| 参与约束 | 完全参与（每个实体实例都必须参与，画为双线）与部分参与（单线）<sup>[6](https://jcsites.juniata.edu/faculty/rhodes/dbms/ermodel.htm)</sup> |
| 弱实体 | 弱实体没有主键，可能只有部分分辨符键，通过将该分辨符与其所属强实体的主键组合来标识；画为双矩形，以双菱形连接<sup>[7](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDComponents.html)</sup> |
| 设计角色 | 在数据库设计中，ER图是概念模型，随后映射为关系模式（逻辑设计），再映射为物理表<sup>[8](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDMappingToRDD.html)</sup> |

## 目的与历史背景

陈品山提出该模型，是对20世纪70年代三大数据模型的回应：网状模型、关系模型和实体集模型。每一种都有其弱点，他希望将其综合消解。网状模型在一定程度上分离了实体与联系，提供了数据的自然视图，但其实现数据独立性的能力受到质疑。关系模型基于关系理论，实现了高度的数据独立性，但可能丢失关于现实世界的一些语义信息。实体集模型基于集合论，同样实现了高度的数据独立性，但其对“3”或“红色”这类值的处理方式可能让一些人觉得不自然。陈品山的模型采用这样的观点：现实世界由实体和联系构成，他主张该模型具有前述三种模型的大部分优点。<sup>[1](https://openlib.org/home/krichel/courses/lis512/readings/chen76theentity-relationship.pdf)</sup>

## 基本构造

**实体与属性。** 实体是现实世界中的一个对象，每个实体都有称为属性的性质。属性可以是简单（原子）的、复合的、单值的或多值的；派生属性，如由BIRTHDATE计算得出的AGE，不存储而是计算得出。属性可以取空值，表示未知或不适用。实体类型是具有相同属性的实体的集合，其中的个别现实事物是实体实例。<sup>[3](https://people.cs.pitt.edu/~chang/156/03ERmodel.html)</sup> 每个属性都有一个关联的值集或数据类型，如整数、字符串、子界或[枚举类型](https://www.edgepedia.org/zh/enumerated-type)。<sup>[7](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDComponents.html)</sup>

在陈品山的论文中，实体键是一组属性，其关联映射——将实体集中的每个实体映射到其匹配的值集组合——是一对一的。如果在可用数据上不存在这样的映射，或者为了追求简单性，可以定义一个人工属性和值集以使标识成为可能。<sup>[10](https://dspace.mit.edu/server/api/core/bitstreams/88551f68-e0c3-4a1e-a234-8f6b73fbe58f/content)</sup>

**联系。** 联系类型是实体之间的关联；一个实体类型参与一个联系类型，例如EMPLOYEE和DEPARTMENT参与WORKS_FOR。联系的度是参与实体类型的数目，因此WORKS_FOR的度为2。每个参与者扮演一个角色，在递归联系中一个实体类型可以扮演两个角色，例如一个EMPLOYEE既是主管又是被主管者。联系类型可以有自己的属性：WORKS_ON上的HoursPerWeek既不描述员工也不描述项目，而是描述二者之间的关系。<sup>[3](https://people.cs.pitt.edu/~chang/156/03ERmodel.html)</sup><sup> • </sup><sup>[4](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDRelationships.html)</sup>

## 约束

**基数。** 基数是另一个实体集在该联系下可以映射到的实体实例数目。三种基数比为一对一（1:1）、一对多（1:N）和多对多（M:N）。基数标识最大值；参与度标识最小值。<sup>[6](https://jcsites.juniata.edu/faculty/rhodes/dbms/ermodel.htm)</sup><sup> • </sup><sup>[5](https://cs-courses.mines.edu/csci403/fall2018/lectures/L13-ERD.pdf)</sup>

**参与度。** 完全参与意味着实体集中的每个成员都必须参与该联系，画为从实体矩形到联系菱形的双线；部分参与画为单线，意味着并非每个实例都必须参与。例如，一个Class实体除非与某位Faculty成员相关联否则不能存在，则具有完全参与；而一本Textbook可以在不与Class关联的情况下存在，则具有部分参与。<sup>[6](https://jcsites.juniata.edu/faculty/rhodes/dbms/ermodel.htm)</sup> （min,max）记法结合了两种约束：（0,10）表示部分参与，（1,max）表示完全参与。<sup>[3](https://people.cs.pitt.edu/~chang/156/03ERmodel.html)</sup>

**弱实体。** 如果Y的每个实例都必须有X的对应实例，则实体Y在存在上依赖于实体X，这迫使Y在该联系中完全参与。如果Y还缺少自己的候选键，则Y是弱实体，X是强实体。弱实体可以有一个部分键，称为分辨符，用于区分与同一强实体相关联的各个弱实体；弱实体通过分辨符与强实体主键的组合来标识。并非每个存在依赖的实体都是弱实体；缺少键才是定义的关键。在图中，弱实体画为双矩形，其与强实体的标识联系画为双菱形。<sup>[6](https://jcsites.juniata.edu/faculty/rhodes/dbms/ermodel.htm)</sup><sup> • </sup><sup>[7](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDComponents.html)</sup> 弱实体集在其标识联系中必须具有完全参与，且弱实体集与其支配者之间的[基数](https://www.edgepedia.org/zh/cardinality)不能是多对多。<sup>[11](https://cs.slu.edu/~goldwamh/class/slu/csci371/2003_Fall/lectures/design/)</sup><sup> • </sup><sup>[12](https://csit.udc.edu/~byu/CIS416/LN2ER.pdf)</sup>

## 度与分解的局限

度高于二的联系提出了一个建模要点，教学文献对此有明确表述：一个三元联系类型不等价于三个二元联系类型。在OFFERS的例子中，联系涉及一位教师、一门课程和一个学期，三元组（i,c,s）除非（i,c）、（i,s）和（s,c）三对都存在否则不能存在，但反之不成立，因此三个二元联系所携带的信息少于那个三元联系。<sup>[3](https://people.cs.pitt.edu/~chang/156/03ERmodel.html)</sup>

参与约束在模型转换时也有语法上的后果。[密苏里科技大学](https://www.edgepedia.org/zh/missouri-university-of-science-and-technology)（Missouri University of Science and Technology）的Cecil Eng Huang Chua和佐治亚州立大学（Georgia State University）的Veda C. Storey在一篇教程中给出了指导原则：对于二元1:1和1:M联系集，可选参与有时意味着该联系在关系模型中应表示为一个单独的关系；一元联系集不能具有（1,1）参与；具有（1,1）参与的n元联系集可以简化为更低的连接度；分解不能替代规范化。<sup>[2](https://scholarsmine.mst.edu/bio_inftec_facwork/283/)</sup>

## 从ER图到关系模式

数据库设计通常经历概念建模（ER图）、逻辑建模（关系模式）和物理建模（特定数据库引擎中的表）。将实体—联系图转换为关系模式，意味着将实体、属性和联系分解为表、列和键。<sup>[8](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDMappingToRDD.html)</sup> 在所得的关系设计中，一对多联系通常通过在“多”方的表中设置一个外键属性来建模，多对多联系则通过一个带有指向双方外键的表来实现。<sup>[13](https://web.mit.edu/11.521/www/lectures/lecture7/lec_data_design.html)</sup><sup> • </sup><sup>[14](https://www.postgresql.org/docs/current/ddl-constraints.html)</sup>

陈品山本人的论文描述了一个四步设计流程：识别实体集和联系集，判定映射是否为1:n，定义值集和属性，将数据组织为实体关系和联系关系同时确定主键。在他的制造公司示例中，DEPENDENT关系是一个弱实体关系，因为它将EMPLOYEE的主键作为自身主键的一部分；PROJECT-WORKER是一个m:n映射，可以为其指定最小计数和最大计数。<sup>[15](https://dspace.mit.edu/bitstream/handle/1721.1/47432/entityrelationshx00chen.pdf)</sup>

## 扩展与记法

基本模型已被扩展。增强实体—联系（EER）模型增加了特化——将一个类分解为具有附加属性或参与单独联系的子类的过程——以及泛化——自底向上地认识到Student和Faculty等类共享共同性质，可以为其赋予一个超类。EER图还支持带有覆盖约束和不相交约束的ISA层次结构、具有多继承的共享子类，以及并集或类别构造，其中子类属于若干超类之一。（min..max）记法同时显示基数和参与约束，可用于ER图和EER图。<sup>[16](https://jcsites.juniata.edu/faculty/rhodes/dbms/eermodel.htm)</sup>

同一组概念存在多种图形记法。陈氏记法用矩形表示实体、菱形表示联系；鸦爪记法和（min,max）记法以不同方式表达相同的基数和参与约束，设计者选择一种记法并在图中始终一致地使用。<sup>[4](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDRelationships.html)</sup><sup> • </sup><sup>[17](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDExapmle.html)</sup>

## References

1. [Peter P. S. Chen (1976). The Entity-Relationship Model: Toward a Unified View of Data. ACM Transactions on Database Systems 1(1), 9–36.](https://openlib.org/home/krichel/courses/lis512/readings/chen76theentity-relationship.pdf)
2. [Cecil Eng Huang Chua and Veda C. Storey (2011). Issues and Guidelines in Modeling Decomposition of Minimum Participation in Entity-Relationship Diagrams. Communications of the Association for Information Systems 29.](https://scholarsmine.mst.edu/bio_inftec_facwork/283/)
3. [Data Modeling Using the Entity-Relationship Model, course notes, University of Pittsburgh](https://people.cs.pitt.edu/~chang/156/03ERmodel.html)
4. [2.5. ERD Relationship Types, OpenDSA Database textbook](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDRelationships.html)
5. [Conceptual ERD lecture notes, Colorado School of Mines, CSCI 403](https://cs-courses.mines.edu/csci403/fall2018/lectures/L13-ERD.pdf)
6. [The Entity-Relationship Model, course notes, Juniata College](https://jcsites.juniata.edu/faculty/rhodes/dbms/ermodel.htm)
7. [2.2. ERD Basic Components, OpenDSA Database textbook](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDComponents.html)
8. [2.3. ERD Mapping To Relational Data Model, OpenDSA Database textbook](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDMappingToRDD.html)
9. [The entity-relationship model: toward a unified view of data, MIT DSpace record (Sloan working paper 839-76)](https://dspace.mit.edu/entities/publication/5f4dcb94-111c-4368-8374-cec8842dee1d)
10. [The Entity-Relationship Model, Chen paper text, MIT DSpace bitstream](https://dspace.mit.edu/server/api/core/bitstreams/88551f68-e0c3-4a1e-a234-8f6b73fbe58f/content)
11. [Introduction to Database Design, course notes, Saint Louis University](https://cs.slu.edu/~goldwamh/class/slu/csci371/2003_Fall/lectures/design/)
12. [Entity-Relationship (ER) Model lecture notes, Dr. Byunggu Yu, University of the District of Columbia](https://csit.udc.edu/~byu/CIS416/LN2ER.pdf)
13. [Relational Database Design, MIT lecture notes](https://web.mit.edu/11.521/www/lectures/lecture7/lec_data_design.html)
14. [PostgreSQL Documentation: 5.5. Constraints](https://www.postgresql.org/docs/current/ddl-constraints.html)
15. [The Entity-Relationship Model, Chen working paper text, MIT DSpace bitstream](https://dspace.mit.edu/bitstream/handle/1721.1/47432/entityrelationshx00chen.pdf)
16. [Enhanced Entity-Relationship Model, course notes, Juniata College](https://jcsites.juniata.edu/faculty/rhodes/dbms/eermodel.htm)
17. [2.7. Comprehensive example, OpenDSA Database textbook](https://opendsa-server.cs.vt.edu/ODSA/Books/Database/html/ERDExapmle.html)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems › Database theory and data modeling › Schema and data modeling methods

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/entity-relationship-model

English original: https://www.edgepedia.org/entity-relationship-model
