Hierarchical Database Model

Hierarchical database model

The hierarchical data model organizes data in a tree structure. There is a hierarchy of parent and child data segments. This structure implies that a record can have repeating information, generally in the child data segments. Data is in a series of records, which has a set of field values attached to it. It collects all the instances of a specific record together as a record type. These record types are the equivalent of tables in the relational model, with the individual records being the equivalent of rows. To create links between these record types, the hierarchical model uses Parent – Child Relationships.  These are a 1: N mapping between record types. For example, an organization might store information about an employee, such as name, employee number, department, salary. The organization might also store information about an employee’s children, such as name and date of birth. The employee and children data forms a hierarchy, where the employee data represents the parent segment and the children data represents the child segment. If an employee has three children, then there would be three child segments associated with one employee segment. In a hierarchical database the parent- child relationship is one-to-many. This restricts a child segment to having only one parent segment. Hierarchical DBMSs were popular from the late 1960s, with the introduction of IBM’s Information Management System (IMS) DBMS, through the 1970s.

Hierarchial database model

Hierarchical database model

In this model, files are arranged in a top-down structure that resembles a tree or genealogy chart.  The top file is called the root, the bottom files are called leaves, and intermediate files have one parent, or owner, file and one or several children files. Among the oldest of the database architectures, many hierarchical databases exist in larger organizations. This technology is best applied when the conceptual data model also resembles a tree and when most data access begins with the same file. Hierarchical database technology is used for high-volume transaction processing and MIS (Management Information System) applications. Few new databases are developed   with   hierarchical    DBMSs   since   newer applications  tend  to  have  broader  needs  than  simply transaction processing  or  summation of  transaction data.

Advantages of Hierarchical Database Model:

a)      It is the easiest model of database

b)      A database owner is more secured because nobody else can see and modify a child without consulting to its parent.

c)       Searching is fast and easy, if parent is known.

d)      Very efficient in handling ‘one-to-many’ relationship.

Disadvantages of Hierarchical Database Model:

a)     It is old fashioned, outdated database model.

b)   Modification and addition of child without consulting the parent is impossible or very hard. So, it is non-flexible database model.

c)     Can’t handle ‘many-to-many’ relationship.

d)     Increases redundancy because same data is to be written in different places.