Difference between Hierarchical, Network and Relational Data Model
1. Hierarchical Data Model:
Hierarchical data model is the oldest type of the data model. It was developed by IBM in 1968. It organizes data in the tree-like structure. Hierarchical model consists of the following :
- It contains nodes which are connected by branches.
- The topmost node is called the root node.
- If there are multiple nodes appear at the top level, then these can be called as root segments.
- Each node has exactly one parent.
- One parent may have many child.
Figure – Hierarchical Data Model
In the above figure, Electronics is the root node which has two children i.e. Televisions and Portable Electronics. These two has further children for which they act as parent. For example: Television has children as Tube, LCD and Plasma, for these three Television act as parent. It follows one to many relationship.
2. Network Data Model:
It is the advance version of the hierarchical data model. To organize data it uses directed graphs instead of the tree-structure. In this child can have more than one parent. It uses the concept of the two data structures i.e. Records and Sets.
Figure – Network Data Model
In the above figure, Project is the root node which has two children i.e. Project 1 and Project 2. Project 1 has 3 children and Project 2 has 2 children. Total there are 5 children i.e Department A, Department B and Department C, they are network related children as we said that this model can have more than one parent. So, for the Department B and Department C have two parents i.e. Project 1 and Project 2.
3. Relational Data Model:
The relational data model was developed by E.F. Codd in 1970. There are no physical links as they are in the hierarchical data model. Following are the properties of the relational data model :
- Data is represented in the form of table only.
- It deals only with the data not with the physical structure.
- It provides information regarding metadata.
- At the intersection of row and column there will be only one value for the tuple.
- It provides a way to handle the queries with ease.
Figure – Relational Data Model
Difference between Hierarchical, Network and Relational Data Model:
|S. No.||Hierarchical Data Model||Network Data Model||Relational Data Model|
|1.||In this model, to store data hierarchy method is used. It is the oldest method and not in use today.||It organizes records to one another through links or pointers.||It organizes records in the form of table and relationship between tables are set using common fields.|
|2.||To organize records, it uses tree structure.||It organizes records in the form of directed graphs.||It organizes records in the form of tables.|
|3.||It implements 1:1 and 1:n relations.||In addition to 1:1 and 1:n it also implements many to many relationships.||In addition to 1:1 and 1:n it also implements many to many relationships.|
|4.||Pointers are used to establish relationships among records physically.||A linked list is used to establish a relationship among records physically.||The logical representation is used with rows and columns to depict relationship among records.|
|5.||Insertion anomaly exits in this model i.e. child node cannot be inserted without the parent node.||There is no insertion anomaly.||There is no insertion anomaly.|
|6.||Deletion anomaly exists in this model i.e. it is difficult to delete the parent node.||There is no deletion anomaly.||There is no deletion anomaly.|
|7.||Update leads to inconsistency problems because of the existence of multiple instances of a child record.||No such problem as only one instance of records exist.||Updating a record is easy and simple with the process of normalization, the redundant data gets removed.|
|8.||This model lacks data independence.||There is partial data independence in this model.||This model provides data independence.|
|9.||No such facility for querying database is supported.||No such facility for querying database is supported.||SQL-based declarative querying is supported.|
|10.||It is used to access the data which is complex and asymmetric.||It is used to access the data which is complex and symmetric.||It is used to access the data which is complex and symmetric.|
|11.||Difficult to design a database because of its complexity.||Difficult to design a database and manipulate a database because of its complexity. Hence, it imposes a burden on the programmer.||It is easy to comprehend due to concealed physical level details from end-users.|
|12.||It is less flexible.||It is flexible as compared to the hierarchical model.||It is flexible as compared to the hierarchical model.|
|13.||&XML and XAML use this model.||VAX-DBMS, DMS-1100 of UNIVAC and SUPRADBMS’s use this model.||It is mostly used in real world applications. Oracle, SQL.|
Please Login to comment...