# Network Model

The network model is the extension of the hierarchical structure because it allows many-to-many relationships to be managed in a tree-like structure that allows multiple parents.

There are two fundamental concepts of a network model −

• Records contain fields which need hierarchical organization.
• Sets are used to define one-to-many relationships between records that contain one owner, many members.

A record may act as an owner in any number of sets, and a member in any number of sets.

P.S. Set must not be confused with the mathematical set.

A set is designed with the help of circular linked lists where one record type, the owner of the set also called as a parent, appears once in each circle, and a second record type, also known as the subordinate or child, may appear multiple times in each circle.

A hierarchy is established between any two record types where one type (A) is the owner of another type (B). At the same time, another set can be developed where the latter set (B) is the owner of the former set (A). In this model, ownership is defined by the direction, thus all the sets comprise a general directed graph. Access to records is developed by the indexing structure of circular linked lists.

The network model has the following major features −

• It can represent redundancy in data more efficiently than that in the hierarchical model.
• There can be more than one path from a previous node to successor node/s.
• The operations of the network model are maintained by indexing structure of linked list (circular) where a program maintains a current position and navigates from one record to another by following the relationships in which the record participates.
• Records can also be located by supplying key values.

The following diagram depicts a network model. An agent represents several clients and manages several entertainers. Each client schedules any number of engagements and makes payments to the agent for his or her services. Each entertainer performs several engagements and may play a variety of musical styles.

A collection of records is represented by a node, and a set structure helps to establish a relationship in a network helps to This development helps to relate a pair of nodes together by using one node as an owner and the other node as a member. A one-to-many relationship is managed by set structure, which means that a record in the owner node can be related to one or more records in the member node, but a single record in the member node is related to only one record in the owner node.

Additionally, a record in the member node cannot exist without being related to an existing record in the owner node. For example, a client must be assigned to an agent, but an agent with no clients can still be listed in the database.

The above diagram shows a diagram of a basic set structure. One or more sets (connections) can be defined between a specific pair of nodes, and a single node can also be involved in other sets with other nodes in the database.

The data can be easily accessed inside a network model with the help of an appropriate set structure. there are no restrictions on choosing the root node, the data can be accessed via any node and running backward or forward with the help of related sets.

For example, when a user wants to find the agent who booked a specific engagement. He/she begins by locating the appropriate engagement record in the ENGAGEMENTS node, and then determines which client "owns" that engagement record via the Schedule set structure. Finally, he/she identifies the agent that "owns" the client record via the Represent set structure.

• fast data access.
• It also allows users to create queries that are more complex than those they created using a hierarchical database. So, a variety of queries can be run over this model.