关系型数据库中的er模型_增强型ER模型

关系型数据库中的er模型

增强型ER模型 (The Enhanced ER Model)

As the complexity of data increased in the late 1980s, it became more and more difficult to use the traditional ER Model for database modelling. Hence some improvements or enhancements were made to the existing ER Model to make it able to handle the complex applications better.

在1980年代后期,随着数据复杂性的增加,使用传统的ER模型进行数据库建模变得越来越困难。 因此,对现有的ER模型进行了一些改进或增强,以使其能够更好地处理复杂的应用程序。

Hence, as part of the Enhanced ER Model, along with other improvements, three new concepts were added to the existing ER Model, they were:

因此,作为增强型ER模型的一部分以及其他改进,在现有ER模型中添加了三个新概念,它们是:

  1. Generalization

    概括
  2. Specialization

    专业化
  3. Aggregration

    聚集

Let's understand what they are, and why were they added to the existing ER Model.

让我们了解它们是什么,以及为什么将它们添加到现有的ER模型中。

概括 (Generalization)

Generalization is a bottom-up approach in which two lower level entities combine to form a higher level entity. In generalization, the higher level entity can also combine with other lower level entities to make further higher level entity.

泛化是一种自下而上的方法,其中两个较低级别的实体合并形成一个较高级别的实体。 一般而言,较高级别的实体也可以与其他较低级别的实体组合以构成其他更高级别的实体。

It's more like Superclass and Subclass system, but the only difference is the approach, which is bottom-up. Hence, entities are combined to form a more generalised entity, in other words, sub-classes are combined to form a super-class.

它更像是超类和子类系统,但唯一的区别是方法是自下而上的。 因此,实体被组合以形成更通用的实体,换言之,子类被组合以形成超类。

generalization in ER model

For example, Saving and Current account types entities can be generalised and an entity with name Account can be created, which covers both.

例如,可以概括“ 保存”和“ 当前帐户类型”实体,并可以创建名称为“ 帐户”的实体,其中涵盖了这两个实体。

专业化 (Specialization)

Specialization is opposite to Generalization. It is a top-down approach in which one higher level entity can be broken down into two lower level entity. In specialization, a higher level entity may not have any lower-level entity sets, it's possible.

专业化与通用相反。 这是一种自上而下的方法,其中可以将一个较高级别的实体分解为两个较低级别的实体。 在专门化中,较高级别的实体可能没有任何较低级别的实体集,这是可能的。

Specialization in ER Model

聚集 (Aggregration)

Aggregration is a process when relation between two entities is treated as a single entity.

聚集是将两个实体之间的关系视为一个实体时的过程

aggregration

In the diagram above, the relationship between Center and Course together, is acting as an Entity, which is in relationship with another entity Visitor. Now in real world, if a Visitor or a Student visits a Coaching Center, he/she will never enquire about the center only or just about the course, rather he/she will ask enquire about both.

在上图中, CenterCourse之间的关系一起充当一个实体,该实体与另一个实体Visitor关联。 现在在现实世界中,如果访客或学生访问辅导中心,他/她将永远不会只询问该中心或只询问课程,而只会询问这两个中心。

翻译自: https://www.studytonight.com/dbms/generalization-and-specialization.php

关系型数据库中的er模型