Hubbry Logo
Hierarchical database modelHierarchical database modelMain
Open search
Hierarchical database model
Community hub
Hierarchical database model
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something
Hierarchical database model
Hierarchical database model
from Wikipedia

A hierarchical database model is a data model in which the data is organized into a tree-like structure. The data are stored as records which is a collection of one or more fields. Each field contains a single value, and the collection of fields in a record defines its type. One type of field is the link, which connects a given record to associated records. Using links, records link to other records, and to other records, forming a tree. An example is a "customer" record that has links to that customer's "orders", which in turn link to "line_items".

The hierarchical database model mandates that each child record has only one parent, whereas each parent record can have zero or more child records. The network model extends the hierarchical by allowing multiple parents and children. In order to retrieve data from these databases, the whole tree needs to be traversed starting from the root node. Both models were well suited to data that was normally stored on tape drives, which had to move the tape from end to end in order to retrieve data.

When the relational database model emerged, one criticism of hierarchical database models was their close dependence on application-specific implementation. This limitation, along with the relational model's ease of use, contributed to the popularity of relational databases, despite their initially lower performance in comparison with the existing network and hierarchical models.[1]

History

[edit]

The hierarchical structure was developed by IBM in the 1960s and used in early mainframe DBMS. Records' relationships form a treelike model. This structure is simple but inflexible because the relationship is confined to a one-to-many relationship. The IBM Information Management System (IMS) and RDM Mobile are examples of a hierarchical database system with multiple hierarchies over the same data.

The hierarchical data model lost traction as Codd's relational model became the de facto standard used by virtually all mainstream database management systems. A relational-database implementation of a hierarchical model was first discussed in published form in 1992[2] (see also nested set model). Hierarchical data organization schemes resurfaced with the advent of XML in the late 1990s[3] (see also XML database). The hierarchical structure is used primarily today for storing geographic information and file systems.[citation needed]

Currently, hierarchical databases are still widely used especially in applications that require very high performance and availability such as banking, health care, and telecommunications. One of the most widely used commercial hierarchical databases is IMS.[4] Another example of the use of hierarchical databases is Windows Registry in the Microsoft Windows operating systems.[5]

Examples of hierarchical data represented as relational tables

[edit]

An organization could store employee information in a table that contains attributes/columns such as employee number, first name, last name, and department number. The organization provides each employee with computer hardware as needed, but computer equipment may only be used by the employee to which it is assigned. The organization could store the computer hardware information in a separate table that includes each part's serial number, type, and the employee that uses it. The tables might look like this:

employee table
EmpNo First Name Last Name Dept. Num
100 Almukhtar Khan 10-L
101 Gaurav Soni 10-L
102 Siddhartha Soni 20-B
103 Siddhant Soni 20-B
computer table
Serial Num Type User EmpNo
3009734-4 Computer 100
3-23-283742 Monitor 100
2-22-723423 Monitor 100
232342 Printer 100

In this model, the employee data table represents the "parent" part of the hierarchy, while the computer table represents the "child" part of the hierarchy. In contrast to tree structures usually found in computer software algorithms, in this model the children point to the parents. As shown, each employee may possess several pieces of computer equipment, but each individual piece of computer equipment may have only one employee owner.

Consider the following structure:

EmpNo Designation ReportsTo
10 Director
20 Senior Manager 10
30 Typist 20
40 Programmer 20

In this, the "child" is the same type as the "parent". The hierarchy stating EmpNo 10 is boss of 20, and 30 and 40 each report to 20 is represented by the "ReportsTo" column. In Relational database terms, the ReportsTo column is a foreign key referencing the EmpNo column. If the "child" data type were different, it would be in a different table, but there would still be a foreign key referencing the EmpNo column of the employees table.

This simple model is commonly known as the adjacency list model and was introduced by Dr. Edgar F. Codd after initial criticisms surfaced that the relational model could not model hierarchical data.[citation needed] However, the model is only a special case of a general adjacency list for a graph.

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The hierarchical database model is a organization method that structures information in a -like , where each record (or segment) has exactly one and can have multiple children, enforcing strict one-to-many relationships between entities. This model represents as a rooted , with the top-level segment serving as the and subordinate levels branching downward to dependent records. Developed by in the late as part of its Information Management System (IMS), the hierarchical model emerged during the era of mainframe computing to handle complex, large-scale needs, particularly for the Apollo space program and early enterprise applications. It gained prominence in the 1970s as one of the first commercial database management systems, alongside the network model, with IMS becoming the dominant . in hierarchical databases occurs via procedural, record-at-a-time access, often using languages like DL/I in IMS, which employs commands such as Get Unique, Get Next, and Get Next Within Parent to traverse parent-child paths in a preorder sequence. Storage can utilize sequential files, indexed structures like B-trees, or pointers, with database definitions specified through schema languages to maintain physical and some logical . Key advantages of the hierarchical model include its simplicity in constructing and operating tree-structured data, efficient retrieval for predefined hierarchical queries, and automatic enforcement of through parent-child dependencies, making it suitable for domains like organizational charts or routine in banking systems. However, it suffers from rigidity, as relationships must be predefined and cannot easily accommodate many-to-many associations without data replication, leading to update anomalies, storage waste, and inconsistency risks. Its navigational, procedural nature also limits query flexibility, requires detailed programming for access, and complicates structural modifications, contributing to its decline in favor of relational models by the . Despite its limitations, the hierarchical model persists in legacy systems like IMS, which still supports mission-critical applications in industries such as and , and influences modern technologies including XML document storage and geographic information systems (GIS) that leverage tree-based representations. Extensions like logical databases in IMS allow virtual views across multiple physical trees to mitigate some relational shortcomings, demonstrating the model's adaptability in specialized contexts.

Fundamentals

Definition and Overview

The hierarchical database model is a approach that organizes information into a tree-like structure, where records are connected through -child relationships, allowing each child record to have exactly one while a parent can have multiple children. This model represents as a collection of rooted trees, often forming a forest of such trees, with links associating exactly two records to enforce the hierarchy. The primary purpose of the hierarchical model is to facilitate efficient storage and retrieval of data exhibiting natural hierarchical relationships, such as those found in organizational charts, bill-of-materials in manufacturing, or file directory systems. Visually, the resembles an upside-down , with a single root record at the top branching downward into subordinate records, enabling straightforward navigation along predefined paths. This model emerged in the as one of the earliest formalized database paradigms, predating the and influencing subsequent systems.

Core Concepts

In the hierarchical database model, data is structured using as the fundamental nodes, each comprising a collection of fields that hold related information. These are further divided into segments, which serve as logical groupings of data elements reflecting dependencies between them, such as departments, employees, or projects in an organizational context. A database itself is a collection of multiple such hierarchies, forming a forest of rooted trees where each represents a complete set of interconnected . The model maintains a clear distinction between logical and physical views to separate user-facing data organization from underlying storage mechanics. Logical records encapsulate the conceptual structure and content visible to applications, defining the hierarchy and relationships without regard to storage details. In contrast, physical records address implementation specifics, including indexing, pointer linkages for navigation, and disk allocation to optimize access efficiency. Fields within segments are generally single-valued, meaning each contains only one data value to ensure and simplicity. However, the model supports multivalued aspects through repeating groups of child segments under a , enabling one-to-many relationships where a parent record can link to multiple instances of a child type, such as multiple courses under a department. Native many-to-many relationships are not directly supported, necessitating workarounds like data replication or virtual linking to avoid redundancy while maintaining the . Operations in the hierarchical model presuppose patterns, as inherently follows the predefined hierarchical paths, typically via depth-first or traversal starting from the root to navigate segments in a top-down, left-to-right sequence. This traversal order aligns with the model's tree-like organization, prioritizing efficient linear processing over arbitrary jumps.

Data Organization

Tree Structure

The hierarchical database model organizes into a topology, where a single segment serves as the topmost entry point, from which subordinate segments branch downward in a series of parent-child relationships, culminating in leaf segments that possess no further dependents. This structure enforces a strict one-to-many (1:N) relationship, ensuring that each non- segment has precisely one parent while allowing parents to have zero or more children, thereby forming a resembling an inverted . The segment anchors the entire hierarchy, and traversal occurs from higher to lower levels, reflecting natural containment or composition relationships in the . A single hierarchical database can accommodate multiple such trees, collectively forming , particularly when distinct hierarchies are maintained in separate physical datasets or through definitions supporting varied instances. This capability allows for the representation of disjoint groupings within the overall , such as independent organizational units, without violating the model's tree-based constraints. Each tree in the operates autonomously, with its own , enabling modular while preserving the of individual hierarchies. Storage in the hierarchical model prioritizes efficiency for hierarchical access patterns by placing parent and child segments contiguously on disk, often in sequential order within each database record. Access methods such as Hierarchical Sequential Access Method (HSAM) and Hierarchical Indexed Sequential Access Method (HISAM) facilitate this by storing all segments of a record in physically adjacent locations, optimizing sequential reads and writes along the paths. This contiguous arrangement minimizes seek times and supports rapid traversal from parents to children, though it can complicate updates that alter the hierarchy. To illustrate, consider a simple organizational : a "Department" segment branches to multiple "Employee" segments, each of which in turn branches to one or more "" leaf segments. This arrangement might be depicted as:

Department ([Root](/page/Root)) ├── Employee 1 │ ├── [Project](/page/Project) A │ └── [Project](/page/Project) B └── Employee 2 └── [Project](/page/Project) C

Department ([Root](/page/Root)) ├── Employee 1 │ ├── [Project](/page/Project) A │ └── [Project](/page/Project) B └── Employee 2 └── [Project](/page/Project) C

Such a captures the containment of employees within departments and projects within employee assignments, with flowing unidirectionally downward from the .

Parent-Child Relationships

In the hierarchical database model, the parent-child relationship forms the foundational linkage between records, organizing data into a where each child record is associated with exactly one record. This enforces a strict one-to-one or one-to-many relationship, ensuring that no child can belong to multiple parents, which eliminates ambiguity in data ownership but restricts the model's ability to represent complex many-to-many associations without data duplication. A single parent can have multiple child occurrences, allowing for the representation of one-to-many relationships through repeating groups of child records subordinate to the parent. These repeating groups are implemented as multiple instances of child segments under a given parent segment, such as an employee record containing several dependent job or absence entries, which are linked to facilitate sequential or random access. Linkages between parents and children are typically established using pointer-based mechanisms, including physical pointers from children to their parents (often as addresses or relative byte addresses) and hierarchical pointers that connect parents to their first child or sequence of children and siblings. In systems like IBM's IMS, these include forward hierarchical pointers for parent-to-child traversal and twin pointers for chaining multiple children of the same type under a parent, enabling efficient navigation along the tree path. Key constraints in these relationships include the prohibition of cycles, ensuring acyclic tree formation, and the requirement that between siblings or back to parents occurs only through designated pointers or by traversing the , preventing direct cross-links outside the defined parent-child paths. This structure maintains by confining associations to the topology but necessitates full path traversal for any non-adjacent access.

Querying and Operations

In hierarchical database models, navigation primarily involves traversing the from the segment downward through -child relationships to reach target data. This path-based approach requires along predefined hierarchical paths, often using a traversal to follow the leftmost branches first for efficiency. For instance, to retrieve details on an line item, an application might start at the customer segment, proceed to the associated parent, and then access the child line item segment. To facilitate faster access without always beginning at the , hierarchical databases employ secondary indexes that provide alternative entry points based on key values outside the primary . These indexes, such as those in IBM's Hierarchical Indexed Access Method (HIDAM), allow retrieval of segments or specific paths using sequence fields, reducing the need for full . Secondary indexes can be qualified or , enabling targeted searches by attributes like customer number or order ID while maintaining the underlying integrity. Querying in hierarchical models typically uses procedural languages that specify navigation commands along these paths. In IBM's Information Management System (IMS), the Data Language/I (DL/I) interface supports calls like Get Unique (GU) for direct segment retrieval by key, Get Next (GN) for sequential traversal within a path, and Get Next within Parent (GNP) for accessing siblings under the same parent. These commands, often embedded in application code (e.g., ), use Segment Search Arguments (SSAs) to qualify paths, such as retrieving all line items under a specific . Access patterns in hierarchical databases are optimized for queries that align with the , such as retrieving entire subtrees or following known parent-child chains, which minimizes I/O through contiguous storage in methods like Hierarchical Sequential Access Method (HSAM). However, they prove inefficient for ad-hoc or non-hierarchical searches, as locating data without a predefined path often requires exhaustive scanning or multiple index lookups.

Insert, Update, and Delete Operations

In hierarchical database models, the insert operation adds a new record as a of an existing record, ensuring adherence to the predefined and relationship rules. The process involves setting the values for the new record in a work area or template, then specifying the under which it will be placed, often via a condition matching the 's key. Pointers are updated to link the new to the , typically inserting it as the leftmost or in sequence order if defined by the . Hierarchy rules are checked to prevent violations, such as inserting into invalid positions or exceeding constraints like one-to-many limits. For instance, adding a new employee record under a department requires verifying the department exists and updating the 's pointer list. The update operation, often termed "replace," modifies the fields of an existing record while preserving the overall tree integrity. It begins by navigating to the target record using a get-hold command to establish a pointer, followed by altering the desired non-key fields in the work area. If a key field changes, such as a parent's identifier, the operation may require repositioning all dependent children by deleting and re-inserting them to maintain links, as direct key updates are typically prohibited to avoid breaking navigational paths. This ensures that parent-child relationships remain valid post-modification, with checks for consistency and range limits. An example is updating an employee's field without affecting its position under the department parent, or adjusting a name and cascading pointer adjustments for accounts. Deletion removes a record and handles its dependents according to rules, commonly cascading to eliminate the entire subtree to uphold . The procedure locates the record via a get-hold, then executes the delete, which severs parent pointers and frees the space for the node and all descendants. Orphaning children is possible but constrained, requiring explicit allowance and subsequent re-parenting to avoid dangling references. Constraints prevent deletion of roots with dependents unless cascading is enabled, ensuring no incomplete hierarchies remain. For example, deleting a record would remove associated order subtrees, maintaining the database's structural consistency. Transaction control in hierarchical models groups insert, update, and delete operations into units of work to guarantee atomicity and consistency, using commit to persist all changes or to them entirely. A transaction starts implicitly with the first database call or explicitly via allocation, encompassing multiple modifications across records while locking paths to prevent concurrent interference. Upon commit, all pointer updates and data changes are finalized; reverts the database to the pre-transaction state by reversing operations in reverse order. This mechanism ensures that partial failures do not leave the hierarchy in an inconsistent state, such as orphaned children or broken links, particularly in systems like IMS where DL/I calls form the unit of recovery.

Historical Development

Origins and Early Implementations

The hierarchical database model emerged in the mid-20th century as demands grew for organized, efficient data storage on mainframe systems. Its foundations trace back to early file organization methods like IBM's Indexed Sequential Access Method (ISAM), introduced in the , which enabled indexed access to sequentially stored records and laid the groundwork for structured data hierarchies in subsequent database designs. This approach addressed the limitations of purely sequential file systems by incorporating tree-like indexing, influencing the development of more sophisticated models in the . In the early , spearheaded innovations in to support large-scale applications on its System/360 mainframes, with key contributions from figures like chief architect Vern Watts. Charles Bachman's work at further shaped the field through the Integrated Data Store (IDS), an early prototype DBMS released around 1964 that introduced navigational access via pointer chains, inspiring hierarchical and related structures for linking records. Bachman's IDS demonstrated the potential for integrated data handling beyond flat files, emphasizing parent-child linkages that became central to hierarchical organization. The model's first major implementation arrived with IBM's Information Management System (IMS) in 1968, conceived in 1963 to fulfill NASA's requirements for the Apollo space program. IMS was designed for efficient mainframe-based management of high-volume, structured data, such as tracking thousands of rocket parts through bill-of-materials hierarchies, enabling real-time inventory and versioning control. This system marked a pivotal shift from file-based storage to true database capabilities, designed to handle high-volume structured data processing, such as inventory management for the Apollo program. Initial adopters focused on and sectors, where the model's tree-like excelled at representing complex, one-to-many relationships in mission-critical environments like the Apollo missions. NASA's use of IMS at the Rockwell Space Division in 1968 exemplified its suitability for handling voluminous, hierarchical data in high-stakes projects requiring rapid access and reliability. These applications underscored the model's value in organized sectors demanding scalable data navigation without the flexibility of later paradigms.

Evolution, Decline, and Resurgence

The hierarchical database model reached its peak of widespread adoption during the , particularly in mainframe environments where it powered large-scale enterprise applications due to its efficiency in handling structured, tree-like data relationships. This dominance was evident in systems like IBM's IMS, which became a standard for in industries requiring high performance and reliability. However, the publication of Edgar F. Codd's seminal 1970 paper, "A Relational Model of Data for Large Shared Data Banks," introduced an alternative paradigm that emphasized and declarative querying, setting the stage for a shift away from hierarchical rigidity. The model's decline accelerated in the and as relational databases gained prominence, driven by the of SQL and the need for greater flexibility in data manipulation and schema evolution. Hierarchical systems were increasingly viewed as inflexible, with their parent-child structures complicating ad-hoc queries and adaptations to changing requirements, leading to a major market shift toward relational systems by the late 1980s. Commercial successes like and further solidified relational dominance, rendering pure hierarchical databases largely obsolete for new developments. A partial resurgence occurred in the 2000s, fueled by the rise of hierarchical data formats like XML and JSON, which echoed the tree-based organization of the original model and found applications in semi-structured data storage and web services. XML databases, in particular, revived interest in hierarchical approaches for handling nested documents, while JSON's adoption in NoSQL document stores extended this trend into the 2010s. Legacy hierarchical systems, such as IMS, continue to support critical operations in banking, telecommunications, and healthcare as of 2025, valued for their proven scalability in high-volume transaction environments. As of , the hierarchical model occupies a niche role, including in file systems like the for configuration storage and in specialized sectors where data hierarchies align naturally with operational needs. No major new developments in pure hierarchical database technologies have emerged post-2020, with focus instead on modernization and integration of existing systems into hybrid environments.

Notable Examples

IBM Information Management System (IMS)

The IBM Information Management System (IMS), released in 1968, serves as a foundational implementation of the hierarchical database model, originally developed to support the Apollo space program. It integrates IMS Database Manager (IMS/DB), which provides hierarchical data storage and retrieval, with IMS Transaction Manager (IMS/TM), enabling robust alongside database operations. This combination allows IMS to manage complex, parent-child data relationships in a tree-like structure, where root segments anchor hierarchies and dependent segments represent subordinate entities. A core feature of IMS is its Data Language/Interface (DL/I) call-level , which facilitates path-based navigation through the database by specifying segment search arguments and qualifiers to traverse from to levels. DL/I supports operations like retrieval, insertion, and modification via calls such as GU (Get Unique) and GNP (Get Next within ), optimized for sequential or in mainframe environments. Designed for large-scale z/OS mainframes, IMS excels in high-throughput scenarios, processing up to 100,000 transactions per second in benchmarks while maintaining through locking mechanisms at the segment level. IMS hierarchical databases are structured around segments stored in physical sequential datasets (PSDs), which form the underlying storage for access methods like HDAM (Hierarchical Direct Access Method) using randomizers or HIDAM (Hierarchical Indexed Direct Access Method) employing entry sequences. These datasets support efficient organization of up to 15 levels and 255 segment types per database, with pointers linking parent-child relationships. To enhance flexibility, IMS incorporates secondary indexes as separate VSAM-based databases, allowing access to segments via non-primary keys—up to 32 indexes per segment and 1,000 per database—without altering the physical hierarchy. As of 2025, continues to maintain and update IMS, particularly for mission-critical applications in sectors such as and , where it powers systems handling petabyte-scale data volumes and billions of daily transactions. Its enduring architecture ensures reliability and scalability, with features like Large Databases (HALDB) extending partition support for massive datasets.

Other Hierarchical Systems

Early precursors to commercial hierarchical systems include inventory management databases from the 1950s, which evolved into more structured models like IMS for complex applications such as the Apollo program. In modern operating systems, the Windows Registry exemplifies a hierarchical structure for managing configuration data, introduced with Windows NT 3.1 in 1993. Organized as a tree with root keys branching into subkeys and values, it stores settings for the OS, applications, and hardware in a parent-child manner, enabling efficient navigation similar to a file system. XML databases represent another variation, leveraging the inherent hierarchical nature of XML documents where tags define parent-child relationships. XML DB, released in the early with 9i Database Release 2, integrates this model into a relational environment, mapping XML hierarchies to database objects for storage, querying, and indexing of . In industry applications, hierarchical models persist in specialized domains requiring structured relationships. For instance, ' billing systems in employ hierarchical structures to manage complex customer and service hierarchies, supporting B2B scenarios with interactive, multi-level billing presentations as of 2023. Similarly, in healthcare, hierarchical databases organize patient records into tree-like layers—such as facilities, departments, and individual encounters—for and , with ongoing use in electronic systems to enforce regulations like HIPAA.

Advantages and Disadvantages

Strengths

The hierarchical database model excels in performance due to its tree-like structure, which enables fast to data through pre-linked parent-child relationships, eliminating the need for complex joins common in other models. This design allows for rapid retrieval of related records by traversing the hierarchy directly, making it particularly efficient for large-scale, batch-oriented processing in environments like mainframe systems. For instance, in IBM's Information Management System (IMS), access methods such as Hierarchical Direct Access Method (HDAM) minimize I/O operations by avoiding index lookups, while Fast Path DEDB configurations can achieve high throughput rates exceeding 11,000 transactions per second in optimized setups. Similarly, the model's generalized retrieval algorithms further reduce access times by narrowing the search space efficiently. Data integrity is a core strength, as the enforced one-to-many relationships inherent in the prevent and anomalies by ensuring each child record is linked to a , maintaining consistent associations. This structure supports single-instance storage of shared data, reducing duplication while allowing multiple users to access the same information without conflicts. In IMS implementations, features like fine-grained locking and program isolation isolate transactions, minimizing deadlocks and ensuring modifications are committed only at points, thereby upholding database consistency even under concurrent access. Parent-child dependencies also facilitate automatic enforcement of , as changes to parent records can propagate predictably to dependents. The model's simplicity makes it intuitive for representing naturally hierarchical , such as organizational charts, bills of materials, or file systems, where entities exhibit clear or subordination. Developers can navigate the using straightforward calls like Get Unique or Get Next, which align directly with the logical , simplifying application programming without requiring abstract query languages. This conceptual clarity stems from the parent-child , which promotes easy comprehension and maintenance of relationships. As noted in early database research, the unified framework of hierarchical access simplifies design across various organizations. Resource efficiency is evident in low-overhead operations tailored for mainframe environments and read-heavy workloads, where the compact storage of hierarchies optimizes and CPU usage. IMS, for example, employs reusable buffers and , with DEDB achieving up to 50% reduction in CPU utilization compared to full-function databases, while supporting scalable configurations across multiple processors without data affinities. The absence of redundant links reduces storage needs, and efficient space management parameters like loading factors further enhance utilization in high-volume scenarios. This makes the model suitable for legacy systems handling massive, structured datasets with predictable access patterns.

Weaknesses

The hierarchical database model exhibits significant rigidity in its structure, primarily because it is designed to represent only one-to-one and one-to-many (1:N) relationships efficiently, forcing many-to-many (M:N) relationships to be handled through data duplication or extensive redesign. For instance, in modeling an employee assigned to multiple projects, the employee's record must be duplicated under each relevant project parent, leading to redundancy and potential inconsistencies during updates. This fixed tree-like organization, enforced by parent-child constraints, limits adaptability to complex or non-hierarchical data patterns without altering the entire schema. Querying in hierarchical databases is often inefficient for ad-hoc or exploratory access, as it requires specifying the full navigational path from to the desired segment, which can involve multiple sequential operations for deep hierarchies. Unlike declarative query languages, the model's procedural navigation—using commands like GET NEXT or GET UNIQUE—demands precise knowledge of the , making non-hierarchical queries cumbersome and prone to inefficiency, especially when virtual parent-child relationships rely on pointers rather than inherent sequences. Segment search arguments (SSAs) further complicate this by necessitating complex specifications for filtering, reducing usability for dynamic querying needs. Maintenance poses substantial challenges due to the model's dependence on predefined hierarchies, where structural changes such as adding new levels or segments require rewriting application code and potentially reorganizing large portions of the database. Insertions are restricted by the rule that child records cannot exist independently of a , often necessitating temporary placeholders or batch operations to maintain . Deletions exacerbate this, as removing a automatically cascades to all descendants, risking unintended without careful safeguards. Overall, these factors demand specialized tuning and increase the workload for database administrators. Scalability limitations become evident in handling unstructured or evolving schemas, particularly in modern environments, where the rigid struggles to accommodate irregular relationships or schema without degradation. As data volumes grow, through deep hierarchies slows, and the inability to easily model M:N links or distributed leads to bottlenecks in large-scale systems. Implementations like IMS impose hard limits, such as one virtual per record type, further constraining expansion in dynamic contexts.

Comparisons with Other Models

Versus Relational Model

The hierarchical database model organizes data into a tree-like structure, where records are linked through parent-child relationships using pointers, enforcing a strict one-to-many from a single root. In contrast, the structures data as a collection of tables (relations) with rows and columns, where relationships between tables are established via primary and foreign keys, allowing for more flexible many-to-one or many-to-many associations without inherent tree constraints. This pointer-based navigation in hierarchical models directly traverses predefined paths, while relational models rely on logical keys to maintain across independent tables. Querying in the hierarchical model involves procedural path navigation, such as along parent-child links (e.g., using commands like "get next" in a traversal), which is efficient for known hierarchical traversals but requires explicit programming for complex queries. The , however, employs declarative SQL queries with joins to combine data from multiple tables, enabling ad-hoc, set-based operations that are more intuitive and flexible for unforeseen queries, though they may incur higher overhead for deeply nested hierarchies. For instance, retrieving child records in a hierarchical system follows implicit segment joins, whereas relational SQL explicitly specifies joins like SELECT * FROM Child WHERE ParentID = ?, supporting optimization by query planners. Hierarchical data can be represented in relational databases using techniques like the model, where a single table stores entities with a self-referencing (e.g., a ParentID column pointing to the same table's ), and hierarchies are reconstructed via recursive self-joins. For example, a table for organizational departments might include columns for DepartmentID, Name, and ParentDepartmentID, with queries like SELECT * FROM Departments WHERE ParentDepartmentID = 1 fetching direct children, and recursive common table expressions (CTEs) in SQL traversing deeper levels. This approach avoids the physical duplication common in hierarchical models for many-to-many scenarios, instead deriving relationships dynamically through joins. The widespread adoption of the over hierarchical systems stemmed from its normalization principles, which systematically eliminate by decomposing relations into smaller, dependency-free tables, thereby addressing the duplication inherent in hierarchical trees where child data may replicate across parent branches. Edgar F. Codd's foundational work emphasized that normalization reduces inconsistencies and storage waste, providing a mathematical basis for derivability and consistency that hierarchical models lack due to their rigid structure and potential for replicated segments. This shift enabled scalable, maintainable databases for diverse applications, as relational normalization (e.g., to ) prevents anomalies from updates in replicated data, a common issue in unnormalized hierarchical representations.

Versus Network Model

The hierarchical database model and the , both prominent pre-relational approaches developed during the late 1960s and early 1970s, differ fundamentally in their approaches to data organization and relationship representation. The hierarchical model structures data in a tree-like format, enforcing a strict one-to-many parent-child relationship where each child record has exactly one parent, which suits hierarchical data such as organizational charts or bill-of-materials systems. In contrast, the , formalized by the Data Base Task Group (DBTG) in their 1971 report, organizes data as a graph using owner-member sets to enable more flexible linkages, including many-to-many relationships between record types. This allowed the network model to represent complex interconnections without being confined to a topology, addressing limitations in scenarios requiring multiple parent-child associations. Navigation in these models also highlights their structural disparities. Hierarchical systems rely on sequential traversal along predefined parent-child paths, starting from the and descending through branches, which simplifies access for tree-structured queries but requires duplicating for records needing multiple associations. The network model, however, employs pointer-based chains within sets, where programs use indicators to follow from owner records to multiple member records or vice versa, supporting arbitrary path across the graph. This pointer-driven approach in systems provides greater expressiveness for interconnected but demands explicit programming of traversal logic. In terms of complexity, the hierarchical model's tree constraint makes it simpler to implement and maintain, as it avoids cycles and enforces a clear , though this generality is limited to non-graph . The network model offers more power for modeling real-world graphs with broad relationships, as seen in CODASYL's set-based framework, but introduces higher management overhead due to the need to handle multiple linkages, potential cycles, and intricate pointer . Historically, these models coexisted in the 1960s-1970s era of mainframe , with the network approach evolving as an extension to overcome the hierarchical model's rigidity while both preceded the relational paradigm's rise in the late 1970s.

References

Add your contribution
Related Hubs
Contribute something
User Avatar
No comments yet.