What Is data model?
A data model is a collection of concepts that can be used to describe the structure of the data base including data types, relationships and constraints that should apply on the data.
Why Data modeling is important?
The goal of the data model is make sure that all data objects required by the database are understood completely and represented accurately. This is because the data model uses easily understood notations and natural languages which can be viewed and verified as correct by end users. The data model should be detail enough to be used by the database designers for building the physical data bases. the information contained in data model is used to define the relational tables, primary keys and other information.
Hierarchical Data model
Network Data model
Hierarchical Data model:
The first data model was developed by Rockwell and IBM in the 1970s. It is known as the hierarchical model.
The hierarchical database is a collection of records that is logically organized to conform to the upside-down tree (hierarchical) structure. Within the hierarchy, the top layer (the root) is perceived as the parent of the segment directly beneath it. While this model represents 1: M relationships well, it does not represent M:N relationships.
In this model each entity has only one parent but can have several children. At the top of hierarchy there is only one entity which is called Root.
Network data model?
It was developed in 1969 by the CODASYL Consortium.The network model was created to represent complex data more effectively than the hierarchical model could, to improve database performance, and to impose a database standard. Or we can say that in network model entities are organized in a graph, in which some entities can be accessed through several paths.
In many respects the network model resembles the hierarchical model. For example, as in the hierarchical model, the user perceives the network database as a collection of records in 1:M relationships. However, unlike the hierarchical model, the network model allows a record to have more than one parent or multiple parents. This feature allows the network model to handle complex (M: M) relationships between two or more entities.
Different between hierarchical model and network model :
1. The hierarchical data model is have relationships like 1:1 and 1:M
But the network model is allow to support M:M relationship.
When we go through the structure of hierarchical data model we can identify that it used a method for storing data in a database that looks like a family tree with one root and a no. o f branches . But in network data model we can identify multiple braches or we can say that in HDM only one-to-one or on-to-many relationship can be exit but in NDM many-to-many relationship can be exit.
2. The hierarchical data model is based on parent child relationship
But in NDM a record can