Hierarchichal Database Model
Hierarchichal Database Model
Hierarchical database technology was the first major data model to be largely accepted. Many
legacy servers have been hosting hierarchical databases for decades. A hierarchical database
operates on the principle that a record will contain groups of similar objects.These groups are
organized into a cascading hierarchy. 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 in a series of
records, which have 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, and 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. This is done by using trees, like set theory used in the relational
model, "borrowed" from maths. 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.
As can be seen in the above diagram, sales information is embedded right into a customer’s
record. Inside the sales sub-group is information about the items sold, and inside that group,
information about the manufacturers of those items.
Most hierarchical databases support the concept of repeating groups (a group of fields that may
store multiple values). For example, in the above diagram, a customer could have many sales
listed in his name. These would be handled by adding a separate entry for each sale into the Sale
repeating group. The concept behind a hierarchical database model is that sales information is
part of a customer’s record and should therefore be stored with customer information.
Hierarchical databases are typically very fast and conceptually simple; unfortunately, they are
usually inflexible due to their flat file structures.
XML and LDAP are two technologies that use hierarchical data models effectively. However,
many complex systems are more easily built with relational database models.
Limitations:-
Disadvantages:-
Navigational and procedural nature of processing.
Database is visualized as a linear arrangement of records.
Little scope for "query optimization" .
Example:-