Generalization & Specialization in DBMS – This article is about the Generalization & Specialization in DBMS which describes what are Generalization & Specialization in DBMS with an example.
Before moving ahead let’s know a bit about Functional Dependency.
Table of Contents
Generalization is the bottom-up process of combining lower-level entities based on some common properties to make a higher-level entity. Making a higher level entity continues until it reaches the last highest level entity.
- Generalization is the bottom-up approach in which two or more lower-level entities are combined based on some common properties to make a higher-level entity.
- In Generalization, an entity of a higher level can also combine with the entities of a lower level to form a different higher-level entity.
- The process of Generalization is more like subclass and Superclass, but the only difference is the approach that uses the bottom-up approach.
- In Generalization, entities are combined to form a more generalized entity, i.e., subclasses are combined to make a superclass.
For example, Employee, Teacher, and Doctor entities can be generalized and create a higher level entity Person with some common properties like Name, Age, Phone, and Address.
For example, Saving A/c, and Current A/c entities can be generalized and create a higher level entity Bank A/C with some common properties like Name, Phone, and Address.
Specialization is the top-down process where a higher-level entity is broken down into two lower-level entities.
On the other hand, specialization splits an entity into multiple levels that inherit some properties from the root node, i.e., the head entity. Specialization is the opposite of Generalization, which aims to increase the size of schema/entities.
- Specialization is the opposite of Generalization. It follows the top-to-down approach in which one higher entity level is split into lower levels of entities.
- Specialization is used to find the subsets of entities that share different properties.
- Here, the superclass is defined first, then the subclass and its related attributes are described next, and the relationship sets are added.
For example: The Bank A/C which is high level entity can be subclassed as Saving A/C entity and Current A/C entity in the company.
For example: The Developer which is high level entity can be subclassed as Creator entity, Tester entity and Implementer entity in the company.
For example: The University which is high level entity can be subclassed as Department entity, Class room entity and Library entity.
If you find anything incorrect in the above-discussed topic and have further questions, please comment below.