Open In App

How Data is Stored in Hierarchical Database?

Last Updated : 27 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Answer: In a hierarchical database, data is organised in a tree with a root record, parent-child relationships, and efficient access via unique keys.

  1. Root Record: A hierarchical database starts with a single root record, serving as the top-level entity in the hierarchy.
  2. Segments or Fields: Each record is divided into segments or fields, representing specific attributes or data elements.
  3. Parent-Child Relationships: Records are organised based on parent-child relationships, where each record has a single parent and potentially multiple children.
  4. Tree Structure: The data is structured as a tree with the root at the top and subsequent levels forming branches, mirroring a natural hierarchy.
  5. Record Identification: Every record is identified by a unique key, and relationships are maintained through pointers or links between parent and child records.
  6. Traversal: Accessing data involves traversing the tree structure, starting from the root and navigating down to specific records based on the desired path.
  7. Efficiency for Certain Queries: Hierarchical databases are efficient for queries that involve navigating through parent-child relationships, making them suitable for scenarios where a top-down approach is applicable.

Example

IMS (Information Management System) is an example of a hierarchical database, commonly used for managing hierarchical data structures in applications like banking and telecommunications


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads