Hierarchical database model
A data model that organizes records into a tree of parent–child relationships. Common in early mainframe systems and certain configuration and directory services, it emphasizes fast navigational access.
The hierarchical database model arranges data in a tree-like structure of parent and child records. Each parent node can have multiple children, but each child has a single parent, producing strict one-to-many relationships. This contrasts with models that allow many-to-many links; hierarchies reflect real-world nested groupings such as organizational charts, file systems, or configuration keys.
Core characteristics
At its core the model defines record types (sometimes called entity types) and record occurrences. A record holds a fixed set of attributes, and relationships are implemented by explicit links or pointers from parent records to child records. Typical terms used to describe the structure include root (the topmost record), node, subtree, sibling (records sharing the same parent) and leaf (a node with no children).
- One-to-many mapping: every link represents a single parent with possibly many children.
- Navigational access: applications traverse the tree via parent/child links rather than issuing declarative queries.
- Rigid schema: changes to the layout or relationships typically require reorganization of the tree.
History and notable systems
The hierarchical approach emerged in the early era of database management as a practical way to represent structured, repeating information and to support high-throughput transaction processing. One of the best-known implementations is IBM's Information Management System (IMS), introduced in the late 1960s for demanding transaction workloads. Another familiar example in contemporary computing is the Windows Registry, which stores configuration settings in a hierarchical key/value arrangement; users and developers often interact with it as a tree of keys and subkeys (Windows Registry).
Common uses and examples
Hierarchical databases have been widely applied where data naturally forms a tree or where predictable, fast access to child records from a parent is required. Typical examples and related technologies include:
- Legacy transaction systems on mainframes (e.g., IMS).
- Operating system configuration stores and registries (Windows Registry).
- Directory services and naming systems that present hierarchical namespaces (for example, LDAP-style directories).
- File system organization and document formats such as XML/JSON that express nested structures.
Advantages and limitations
Advantages of hierarchical databases include straightforward representation of nested data, efficient navigational access when the access paths are known in advance, and good performance for certain transaction patterns. However, the model is less flexible for queries that do not follow the established tree paths. It can be cumbersome to represent many-to-many relationships, and restructuring data (for example, inserting a new level of hierarchy) can be costly. These limitations led to the rise of alternative models—network, relational and various NoSQL approaches—that provide more flexible relationship expressiveness or declarative querying.
Relevance today
Although relational and document-oriented systems dominate many modern applications, the hierarchical model remains relevant in several niches. It persists in long-lived mainframe systems, configuration stores, directory services and in data interchange formats that mirror tree structures. Understanding hierarchical design is useful when dealing with legacy systems, hierarchical file layouts, or any domain where parent/child semantics are primary.
Questions and answers
Q: What is a hierarchical database model?
A: It is a data model where the data is organized like a tree.
Q: How is repeating information allowed in a hierarchical database model?
A: Repeating information is allowed using parent/child relationships where each parent can have many children but each child only has one parent.
Q: What is an entity type in a database?
A: An entity type is the equivalent of a table where all attributes of a specific record are listed.
Q: How is each individual record represented in a database?
A: Each individual record is represented as a row and an attribute as a column.
Q: How are entity types related to each other in a database?
A: Entity types are related to each other using 1:N mapping, also known as one-to-many relationships.
Q: What are the most recognized and used hierarchical databases?
A: The most recognized and used hierarchical databases are IMS developed by IBM and Windows Registry by Microsoft.
Q: What is the difference between a parent and a child in a hierarchical database model?
A: A parent can have many children, but each child only has one parent.
Author
AlegsaOnline.com Hierarchical database model Leandro Alegsa
URL: https://en.alegsaonline.com/art/44077