Network Model

Definition

A network model is a database model that is designed as a flexible approach to representing objects and their relationships. A unique feature of the network model is its schema, which is viewed as a graph where relationship types are arcs and object types are nodes. Unlike other database models, the network model's schema is not confined to be a lattice or hierarchy; the hierarchical tree is replaced by a graph, which allows for more basic connections with the nodes.

The Network model replaces the hierarchical tree with a graph thus allowing more general connections among the nodes. The main difference of the network model from the hierarchical model, is its ability to handle many to many (N:N) relations. In other words, it allows a record to have more than one parent. Suppose an employee works for two departments. The strict hierarchical arrangement is not possible here and the tree becomes a more generalized graph - a network. The network model was evolved to specifically handle non-hierarchical relationships. As shown below data can belong to more than one parent. Note that there are lateral connections as well as top-down connections. A network structure thus allows 1:1 (one: one), l: M (one: many), M: M (many: many) relationships among entities.

In network database terminology, a relationship is a set. Each set is made up of at least two types of records: an owner record (equivalent to parent in the hierarchical model) and a member record (similar to the child record in the hierarchical model).  The database of Customer-Loan, which we discussed earlier for hierarchical model, is now represented for Network model as shown. In can easily depict that now the information about the joint loan L1 appears single time, but in case of hierarchical model it appears for two times. Thus, it reduces the redundancy and is better as compared to hierarchical model.

  Description: Description: Network Model of Customer Loan Database

 

Techopedia explains Network Model

Charles Bachman was the original inventor of the network model. In 1969, the Conference on Data Systems Languages (CODASYL) Consortium developed the network model into a standard specification. A second publication was introduced in 1971, which later turned into the basis for virtually all implementations.

The benefits of the network model include:

The drawbacks of the network model include:


Object Model

Definition

An object model is a logical interface, software or system that is modeled through the use of object-oriented techniques. It enables the creation of an architectural software or system model prior to development or programming.  An object model is part of the object-oriented programming (OOP) lifecycle.

Techopedia explains Object Model

An object model helps describe or define a software/system in terms of objects and classes. It defines the interfaces or interactions between different models, inheritance, encapsulation and other object-oriented interfaces and features. 

Object model examples include:

Operations on Network Model 

Detailed description of all basic operations in Network Model is as under:

 Insert Operation: To insert a new record containing the details of a new supplier, we simply create a new record occurrence. Initially, there will be no connector. The new supplier's chain will simply consist of a single pointer starting from the supplier to itself.

For example, supplier S4 can be inserted in network model that does not supply any part as a new record occurrence with a single pointer from S4 to itself. This is not possible in case of hierarchical model. Similarly a new part can be inserted who does not supplied by any supplier.

Consider another case if supplier S 1 now starts supplying P3 part with quantity 100, then a new connector containing the 100 as supplied quantity is added in to the model and the pointer of S1 and P3 are modified as shown in the below. We can summarize that there is no insert anomalies in network model as in hierarchical model.

 

Update Operation: Unlike hierarchical model, where updation was carried out by search and had many inconsistency problems, in a network model updating a record is a much easier process. We can change the city of S I from Qadian to Jalandhar without search or inconsistency problems because the city for S1 appears at just one place in the network model. Similarly, same operation is performed to change the any attribute of part.

                        Description: Description: Update Operation

Delete operation: If we wish to delete the information of any part say PI, then that record occurrence can be deleted by removing the corresponding pointers and connectors, without affecting the supplier who supplies that part i.e. P1, the model is modified as shown. Similarly, same operation is performed to delete the information of supplier.

                Description: Description: Delete Operation

In order to delete the shipment information, the connector for that shipment and its corresponding pointers are removed without affecting supplier and part information.

For example, if supplier SI stops the supply of part PI with 250 quantity the model is modified as shown below without affecting P1 and S1 information.

                           Description: Description: Modification on Deletion Operation

Retrieval Operation: Record retrieval methods for network model are symmetric but complex. In order to understand this considers the following example queries: