📜  DBMS中通用化和专业化之间的区别

📅  最后修改于: 2021-08-24 04:43:25             🧑  作者: Mango

泛化和专业化是增强实体关系图(EER图)

1.概括:
它基于自下而上的方法原理。在一般化中,将较低级别的功能组合起来以形成称为实体的较高级别的函数。进一步重复此过程以制作高级实体。

在概化过程中,属性是从特定实体中提取的,因此我们可以创建概化实体。我们可以概括概括化过程,因为它将子类组合成超类。

概括示例–
考虑两个实体“学生”和“病人”。这两个实体将具有自己的某些特征。例如,学生实体将具有Roll_No,Name和Mob_No,而患者将具有PId,Name和Mob_No特征。现在在此示例中,可以将学生和患者的姓名和Mob_No合并为一个人,以形成一个更高级别的实体,此过程称为通用化过程。

2.专长:
可以说,专业化与一般化是相反的。在专业化中,事物被分解为较小的事物以进一步简化它。我们也可以说,在专业化中,特定实体分为子实体,并且是根据其特征来完成的。同样在专业化中,继承也会发生。

专业化的例子–
考虑一个实体帐户。这将具有一些属性,将它们视为Acc_No和Balance。帐户实体可能具有其他一些属性,例如Current_Acc和Savings_Acc。从现在开始,Current_Acc可能具有Acc_No,余额和交易,而Savings_Acc可能具有Acc_No,Balance和Interest_Rate从此以后,我们可以说专门实体继承了更高级别实体的特征。

应用一般化和专业化后,所得图形的结构相同。

泛化与专业化之间的区别:

GENERALIZATION SPECIALIZATION
Generalization works in Bottom-Up approach. Specialization works in top-down approach.
In Generalization, size of schema gets reduced. In Specialization, size of schema gets increased.
Generalization is normally applied to group of entities. We can apply Specialization to a single entity.
Generalization can be defined as a process of creating groupings from various entity sets Specialization can be defined as process of creating subgrouping within an entity set
In Generalization process, what actually happens is that it takes the union of two or more lower-level entity sets to produce a higher-level entity sets. Specialization is reverse of Generalization. Specialization is a process of taking a subset of a higher level entity set to form a lower-level entity set.
Generalization process starts with the number of entity sets and it creates high-level entity with the help of some common features. Specialization process starts from a single entity set and it creates a different entity set by using some different features.
In Generalization, the difference and similarities between lower entities are ignored to form a higher entity. In Specialization, a higher entity is split to form lower entities.
There is no inheritance in Generalization. There is inheritance in Specialization.