0% found this document useful (0 votes)
307 views3 pages

Hierarchichal Database Model

The hierarchical database model organizes data in a tree structure with parent-child relationships. Records can have repeating child data segments, allowing things like a customer record to embed sales information. While conceptually simple and fast, hierarchical databases are inflexible and cannot represent many-to-many relationships.

Uploaded by

Saurabh Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
307 views3 pages

Hierarchichal Database Model

The hierarchical database model organizes data in a tree structure with parent-child relationships. Records can have repeating child data segments, allowing things like a customer record to embed sales information. While conceptually simple and fast, hierarchical databases are inflexible and cannot represent many-to-many relationships.

Uploaded by

Saurabh Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Hierarchical 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:-

 Many To Many relationships:- The most significant limitation in a hierarchical


database structure is the inability to support many-to-many relationships. As seen in the
diagram to the right, we can state that an item has more than one manufacturer, because
we can make the manufacturer a repeating group. The screwdriver here was made by two
organizations: ABC Inc. and DEF Inc. However, we cannot state that a manufacturer has
made many items. That is, if ABC Inc. makes screwdrivers and hammers, we can only
store information on the screwdriver.
 Referential Integrity:- If we wanted to store information on the hammer, we
would have to duplicate all of ABC Inc.’s information and copy it into a record for the
hammer. This is known as a lack of referential integrity, and is a significant limitation in
the database structure. Having to copy the same record to multiple areas of the database
is inefficient and can cause serious data flaws if the records are changed.
Advantages:-
 Hierarchical Model is simple to construct and operate on.
 Corresponds to a number of natural hierarchically organized domains - e.g., assemblies in
manufacturing, personnel organization in companies .
 Language is simple; uses constructs like GET, GET UNIQUE, GET NEXT, GET NEXT
WITHIN PARENT etc.

Disadvantages:-
 Navigational and procedural nature of processing.
 Database is visualized as a linear arrangement of records.
 Little scope for "query optimization" .

Example:-

Imformation Management System

You might also like