Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

databases
structure
model
entities

What is specialization and generalization in DBMS?

Educative Answers Team

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code

Specialization and generalization are fundamental concepts in database modeling that are useful for establishing superclass-subclass relationships.

Specialization

Specialization is a top-down approach in which a higher-level entity is divided into multiple specialized lower-level entities. In addition to sharing the attributes of the higher-level entity, these lower-level entities have specific attributes of their own. Specialization is usually used to find subsets of an entity that has a few different or additional attributes.

The following enhanced entity relationship diagram expresses the entities in a hierarchical database to demonstrate specialization:

svg viewer
Make, Model, and Chassis_No are shared attributes among the entities Car, Bus, Truck. These entities have their own attributes as well.

Generalization

Generalization is a bottom-up approach in which multiple lower-level entities are combined to form a single higher-level entity. Generalization is usually used to find common attributes among entities to form a generalized entity. It can also be thought of as the opposite of specialization.

The following enhanced entity relationship diagram expresses entities in a hierarchical database to demonstrate generalization:

svg viewer
Make, Model, and Chassis_No are shared attributes among the entities Car, Bus, Truck that can be combined to form a higher-order entity.

RELATED TAGS

databases
structure
model
entities
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code
Keep Exploring