- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Representation of class hierarchy in DBMS
Class hierarchy can be viewed one of two ways
Specialization (Top Down Approach)
Generalization (Bottom Up Approach)
Specialization
Specialization is a process of identifying subsets of an entity that shares different characteristics. It breaks an entity into multiple entities from higher level (super class) to lower level (subclass).
The class vehicle can be specialized into Car, Truck and Motorcycle ( Top Down Approach)
Hence, vehicle is the superclass and Car, Truck, Motorcycle are subclasses. All three of these inherit attributes from vehicle. Moreover, these three share those attributes among themselves while containing some other attributes which make them different.
Generalization
Generalization is a process of generalizing an entity which contains generalized attributes or properties of generalized entities. The entity that is created will contain the common features. Generalization is a Bottom up process.
The classes Car, Truck and motorcycle can be generalised into Vehicle. (Bottom Up Approach). Car, Truck and Motorcycle are subclasses while vehicle is the superclass.
Basically, Vehicle contains the common attributes that were shared between Car, Truck and Motorcycle.