Difference Between Generalization and Specialization in DBMS (with Comparison Chart)

February 2022 · 5 minute read

generalisation_vs_specialisationGeneralization and Specialization both the terms are more common in Object Oriented Technology, and they are also used in the Database with the same features. Generalization occurs when we ignore the differences and acknowledge the similarities between lower entities or child classes or relations (tables in DBMS) to form a higher entity.

However, when we moved on to the specialization, it spilt a higher entity to form lower entities, then we discover the differences between those lower entities.

Generalization and Specialization are exactly opposite to each other. Further, we will discuss the differences between generalization and specialization with the help of a comparison chart.

Content: Generalization Vs Specialization

  • Comparison Chart
  • Definition
  • Key Differences
  • Conclusion
  • Comparison Chart

    Basis for ComparisonGeneralizationSpecialization
    BasicIt proceeds in a bottom-up manner.It proceeds in a top-down manner.
    FunctionGeneralization extracts the common features of multiple entities to form a new entity.Specialization splits an entity to form multiple new entities that inherit some feature of the splitting entity.
    EntitiesThe higher level entity must have lower level entities.The higher level entity may not have lower level entities.
    SizeGeneralization reduces the size of a schema.Specialization increases the size of a schema.
    ApplicationGeneralization entities on group of entities.Specialization is applied on a single entity.
    ResultGeneralization results in forming a single entity from multiple entities.Specialization results in forming the multiple entity from a single entity.

    Definition of Generalization

    Generalization, this term is often used while designing any relational Schema. If designing proceeds in a bottom-up manner then it is featured as Generalization. If the entities, that are figured out to create a schema shares some similar features, then they are combined to form a higher-level entity.

    In generalization, we say if some lower level entities have some characteristics in common then they are clubbed to form a new higher level entity that will further combine with some entities to form a new higher level entity. In generalization, there can never be a high level entity without any lower level entity.

    Generalization is always applied on a group of entities, and if overviewed it seems to reduce the size of a schema.

    Let us discuss an example of generalization. If I ask you to name some furniture, then it’s common to say study table, dining table, computer table, armchair, folding chair, office chair, double bed, single bed and the list is so on.

    generalizationNow, we will generalise these furniture, here, study table, dining table, computer table, all are kind of table so, I will generalise these entities to a new higher level entity Table. The entities armchair, folding chair, office chair, are the kind of Chair so, they form a new higher level entity Chair. The entity Double bed, Single bed combined to form the higher level entity Bed. Now, we have three higher level entity Table, Chair and Bed which can be clubbed further to form a new higher level entity Furniture.

    Furniture entity is the generalised entity of all those entities we discussed above.

    Definition of Specialization

    Specialization is a designing procedure that proceeds in a top-down manner. Specialization is just opposite to Generalization. In specialization, we split an entity to form multiple lower level entities. These newly formed lower level entities inherit some features of the higher level entities.

    It may happen that a higher level entity may not split further and hence, it may not have any lower level entity. Specialization is always applied on a single entity, and if overviewed, it increases the size of a schema.

    Letus discuss specialization with the help of an example. Let us take an entity Animal and apply specialization on it. The entity animal can further be spilt into amphibian, reptiles, birds, mammals the list is long, but this much is enough for explaining specialization.

    specialisationNow an entity amphibian can be further split to crocodile, alligator, frog.The entity reptile splits to snake, lizard. The entity bird can be split to sparrow, pigeon, parrot. Mammals can be spilt to a tiger, lion, elephant.

    This is how specialization increases the number of entity increasing the size of a schema.

    Key Differences Between Generalization and Specialization in DBMS

  • The fundamental difference between generalization and specialization is that Generalization is a bottom-up approach. However, specialization is a top-down approach.
  • Generalization club all the entities that share some common properties to form a new entity. On the other hands, specialization spilt an entity to form multiple new entities that inherit some properties of the spiltted entity.
  • In generalization, a higher entity must have some lower entities whereas, in specialization, a higher entity may not have any lower entity present.
  • Generalization helps in reducing the size of schema whereas, specialization is just opposite it increases the number of entities thereby increasing the size of a schema.
  • Generalization is always applied to the group of entities whereas, specialization is always applied on a single entity.
  • Generalization results in a formation of a single entity whereas, Specialization results in the formation of multiple new entities.
  • Conclusion

    Generalization and specialization both are the designing procedures and both are equally important to design a schema. Which one to use depends on upon the requirement of a user.

    ncG1vNJzZmislZi1pbXFn5yrnZ6YsrR6wqikaJyZm7OmvsSnmp5lkprBuLHEp2SgnZ6av6K4yLOYraGfo3qiusNmqqmdk56urbXZmquip55itq95w5ukrGaYqbqt