Network data model

The network data model has replaced the simpler and more understandable hierarchical one. At its core, the network model is very similar to the hierarchical one, it also has nodes, that is, the root elements into which the most important information is entered. The nodes are interconnected through links. And nodes located at the same distance from the root node form, as in the hierarchical model, levels. The peculiarity of the hierarchical model was that there could be only one route from one element to another, and this is not the case in the network, there are several routes. A network data model provides the ability to build more complex data structures . This is the main difference between these two models.

The goal of creating such a data model was to implement many-to-many relationships with the simultaneous correction of all the deficiencies in the hierarchical model that were identified over time. The network data model is based on the application of graph theory. From this point of view, an arbitrary graph corresponds to it. In this model, each descendant may have an arbitrary number of ancestors. A network database consists of a specific set of records, as well as a specified set of relationships that are present between these records. Two types of records, that is, an ancestor and a descendant, determine the types of relationships. A link type instance is typically one instance of the ancestor record type, including an ordered set of elements related to the descendant record type. By a set, it is customary to mean a named set of records, where records of one type are declared the owner of the set, and the remaining records are declared members of this set.

The network data model has some features. All types of connections used must be functional, that is, many-to-one, one-to-many, or one-to-one. In the model, such an internal restriction is expressed by the statement that certain conditions are necessarily fulfilled for this type of communication with a certain type of ancestor record and a type of descendant record. In order to define the many-to-many relationship, a special type of records was introduced, as well as a pair of functional connections of the one-to-many and many-to-one relationships . If necessary, then additional information can be added to the record that plays the role of a bundle.

In a network model, group relationships usually describe a one-to-many relationship, that is, the owner is one, and he has many subordinates. One can give as an example such an attitude as β€œworking”. It is understood that each employee works in a specific department, but several employees may well work in each department. In a one-to-many network model, the relationship between different entities is implemented using group relationships.

The network database model implies the use of the following data operations:

- remember, that is, enter information into our database;

- include in the group relationship, that is, to establish certain relationships between the data;

- switch, that is, make the transition of one member of the set to some other owner;

- update, that is, make any modifications to the data;

- extract, that is, carry out data reading operations;

- delete, that is, make logical or physical deletion of data;

- exclude some record from the group relationship, that is, to break the connection between the data.

This data model has special capabilities for manipulating data and navigating among them. The navigation apparatus in graph models is designed to establish records to which it is supposed to apply next data manipulation. These records are usually called current. In the network model, there may be transitions from the current instance to the next, from the current vertex to an arbitrary other vertex, the connection of the current with which was realized through a group relationship. Navigation can begin with a random recording.

Source: https://habr.com/ru/post/A4094/


All Articles