Hierarchical Model in DBMS

Hierarchical model in DBMS

  • Hierarchical data model is being used from the 1960s onwards where data is organized like a tree structure
  • In 1966 IBM introduced an information management system(IMS product) which is based on this hierarchical data model but now it is rarely used.


Hierarchical model: 

The hierarchical model organizes the data into a tree structure which consist of a single root node where each record is having a parent record and many child records and expands like a tree

Hierarchical Model in DBMS

Features of the hierarchical model 

  • A child node will have only one parent node
  • One to many relationship: Hierarchical model is implemented based on one to many relationship.Based on this any parent node should have more than one child nodes i.e one parent for many child.


Example for hierarchical model

  • Example of students and courses where a course can be assigned to a single student  where as student can take a number of courses hence one to many relationship is observed
  • Here the hierarchical data can be represented as relation tables considered as student table and one as courts table and the link between these two tables is maintained using a foreign key.


Drawbacks of the hierarchical model 

As we have used one to many relationship in data organization, child records may be repeated and sometimes we need to maintain empty child records which is a memory wastage.