Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Hierarchical Database Model
A hierarchical model represents data in a tree-like structure where each record has a single parent. A sort field keeps sibling nodes in order. This model was designed for early mainframe systems like IBM's Information Management System (IMS), supporting one-to-one and one-to-many relationships.
Data is structured as an inverted tree − a single root table at the top, with other tables as branches. Records are accessed by navigating down through the structure using pointers combined with sequential accessing.
Agents Database Example
The following diagram shows a typical hierarchical database ?
An agent books entertainers (each with their own schedule) and maintains clients who book engagements and make payments. A parent/child relationship links tables − a parent can have many children, but each child has only one parent.
Advantages
- Fast data retrieval due to explicit links between tables.
- Built-in referential integrity − deleting a parent automatically deletes all associated child records.
Disadvantages
- Cannot store a child record without an existing parent record.
- Cannot support complex many-to-many relationships, leading to data redundancy and potential inconsistencies.
For example, an entertainer cannot be added until assigned to an agent. Schedule and Engagement tables may duplicate client and entertainer data respectively, risking inconsistent information.
Conclusion
The hierarchical model was well-suited to tape storage on 1970s mainframes and provides fast direct access via parent-child navigation. However, its inability to handle many-to-many relationships and data redundancy issues led to the development of network and relational database models.
