Hierarchical database model

from Wikipedia, the free encyclopedia
Hierarchical database model

A hierarchical database model is the oldest database model ; it depicts the real world through a hierarchical tree structure. Each record has exactly one predecessor, with the exception of exactly one record , namely the root of the resulting tree structure.

The data is stored in a series of records to which various fields are linked. The instances of a certain data record are summarized as a data record image. These record images are comparable to the tables in a relational database .

Links between the data record images are implemented in hierarchical databases as parent-child relationships (PCR) , which are mapped in a tree structure. The disadvantage of hierarchical databases is that they can only deal with such a tree. Links between different trees or over several levels within a tree are not possible.

With the two structural elements (record types and PCR types), the following minimum conditions can be placed on a hierarchical database model:

  • A record type must represent the root element and thus does not appear as a “child” in a PCR relationship.
  • Every other record type appears exactly once as a "child"
  • A record type that does not appear as a “parent” in a PCR type is called a “leaf”

This tree structure only allows 1: 1 and 1: n relationships to be displayed (see graphic). The n: m relationships that are often required can be achieved on the one hand via redundancies , but better via virtual parent-child relationships (VPCR).

The hierarchical model has largely been replaced by other database models in the field of database systems .

File systems of many operating systems are "approximately" hierarchical databases: files correspond to sheets, directories / folders correspond to nodes with children. The similarity is incomplete because directories without files are still not sheets (simple files) (in reality they contain, for example, references to themselves and the higher-level node, namely with “.” And “..”), and because the Use of soft links or hard links does not preserve the tree structure.

Hierarchical data storage with XML is experiencing a renaissance . Various older applications at banks and insurance companies still use hierarchical databases today. The best known hierarchically organized database system is IMS / DB from IBM .

See also