Hierarchical data model
Objects are very often in such relationships,which are called hierarchical. Usually there is talk about such relationships as "part-whole", the relationship of subordination or species relationship. Objects that are in such relationships form a tree, called an oriented 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 remaining vertices is realized as follows: any other vertex is subject to only one vertex located above it. Conceptually, a hierarchical data model is understood as a collection of record types that are linked by link types into one single or multiple individual trees. In this model, all types of relationships are formed by the type "one to several", and on the graph it is represented by arrows. It turns out that the hierarchical data model has such a type of relationship between objects, as in the family tree, but there is one exception: for each subject 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 essentially a navigational base, that is, access is possible only with the help of previously defined links.
If you are modeling events, thenusually require many-to-many relationships. To remove such a limitation, you can suggest an output such as duplication of objects. However, duplication of objects has a drawback: there may be inconsistency of information. The hierarchical data model has such advantages as providing quick access along certain predefined relationships due to its navigational nature. However, she also has disadvantages. They are related to the lack of flexibility in such a data model, in particular, it concerns the impossibility of the presence of several parents at the object, as well as the inability to obtain direct access to the data. This makes it unusable in conditions of regular implementation of requests that were not planned in advance. The hierarchical database model has one more drawback. It consists in the fact that information retrieval from the lower hierarchical levels can not be directed at the nodes located above.
As the main information units in theThe hierarchical model is the segment and field. Under the data field, it is customary to define the smallest indivisible unit of data that is available to the user. For segments, it is common to define the type and instance of a segment. The type of a segment is a named set of types of data fields that it includes. 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 level of the concept, then it is only a particular case of the network model. In the hierarchical model, the type of the segment corresponds to the vertices, and to the arcs the type of the links in the form of an "ancestor-descendant". There is a strict rule here, the descendant segment can have only one ancestor. In general, such a model looks like an undirected connected graph, having a tree structure that unites all segments. The hierarchical database type structure includes an ordered set of trees. The model itself is a tree, on the upper level of which there is one main object, at the second level are placed the objects of the second level, on the third - the third, and so on.
From this material, you can get some idea of what a hierarchical data structure is.