Objects are very often found in relationships called hierarchical. Usually we are talking about relationships such as "part-whole", the relationship of subordination or species relationship. Objects that are in such a relationship form a tree called a directed graph, that is, having only one vertex that is not subordinate to any other vertex. This vertex is called the root of the tree. The interaction between the other vertices is implemented as follows: any other vertex obeys only one vertex located above it. In conceptual terms, a hierarchical data model is understood as a collection of record types that are linked by types of relationships into one single or several separate trees. In such a model, all types of connections are formed in a one-to-several type, and this is shown on the graph by arrows. It turns out that the hierarchical data model has this type of relationship between objects as in the family tree, but there is one exception: for each subordinate object there is only one main object. That is, in such a data model, only two types of communication between database objects are allowed: one-to-one or one-to-many. The hierarchical database is inherently a navigation database, that is, access is possible exclusively through previously defined connections.
If event modeling is done, then many-to-many relationships are usually required. To remove this restriction, you can offer such a solution as duplication of objects. However, duplication of objects has a drawback: information inconsistency may appear. The hierarchical data model has the advantages of providing quick access along certain predefined relationships due to its navigational nature. However, it also has drawbacks. They are associated with the lack of flexibility in such a data model, in particular, this concerns the impossibility of several parents having the object, as well as the impossibility of obtaining direct access to data. This makes it unusable under conditions of regular implementation of requests that were not planned in advance. The hierarchical database model has another drawback. It consists in the fact that the information search from the lower hierarchical levels cannot be directed to the nodes located above.
The main information units in the hierarchical model are the segment and the field. Under the data field, it is customary to determine the smallest indivisible unit of data that is available to the user. For segments, it is customary to determine the type and instance of a segment. A segment type is a named collection of types of data fields that are included in it. A segment instance is formed from some specific field values. The hierarchical data model, as mentioned above, is formed on the graph form of the data structure. If we consider it at the concept level, then it is only a special case of the network model. In the hierarchical model, the type of segment corresponds to the vertices, and the type of connection in the form of ancestor-descendant corresponds to arcs. There is a strict rule, a descendant segment can have only one ancestor. In general, such a model looks like an undirected connected graph with a tree structure that unites all segments. The structure of the hierarchical type of database includes an ordered set of trees. The model itself is a tree, at the top level of which there is one main object, at the second level there are objects of the second level, at the third - the third, and so on.
From this material you can get some idea of ββwhat a hierarchical data structure is.