1. Hierarchical Data Model :
Hierarchical data model is the oldest type of data model. It was developed by IBM in 1968. It organizes data in tree-like structure. Hierarchical model consists of following :
- It contains nodes which are connected by branches.
- Topmost node is called root node.
- If there are multiple nodes appear at top level, then these can be called as root segments.
- Each node has exactly one parent.
- One parent may have many child.
In the above figure, Electronics is 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. Relational Data Model :
Relational data model was developed by E.F. Codd in 1970. Their are no physical links as they are in hierarchical data model. Following are properties of relational data model :
- Data is represented in form of table only.
- It deals only with data not with physical structure.
- It provides information regarding metadata.
- At the intersection of row and column there will be only one value for tuple.
- It provides a way to handle queries with ease.
Difference between Hierarchical and Relational Data Model :
|Hierarchical Data Model||Relational Data Model|
|In this model, to store data hierarchy method is used. It is oldest method and not in use today.||It is the most flexible and efficient database model. It is most used database in today.|
|It implements 1:1 and 1:n.||In addition to 1:1 and 1:n it also implements many to many relationships.|
|To organize records, it uses tree structure.||To organize records, it uses table.|
|More chances of complexity.||No chance of complexity.|
|There is lack of declarative query facility.||It provides facility of declarative query facility using SQL.|
|Records are linked with help of pointers.||Records are linked with help of rows and columns.|
|Insertion anomaly exits in this model i.e. child node cannot be inserted without parent node.||There is no insertion anomaly.|
|Deletion anomaly exists in this model i.e. it is difficult to delete parent node.||There is no deletion anomaly.|
|It is used to access data which is complex and asymmetric.||It is used to access data which is complex and symmetric.|
|This model lacks data independence.||This model provides data independence.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Hierarchical, Network and Relational Data Model
- Difference between Hierarchical and Network Data Model
- Difference between E-R Model and Relational Model in DBMS
- Difference between Relational model and Document Model
- Difference between Network and Relational data model
- Difference between Relational Algebra and Relational Calculus
- Difference between Tuple Relational Calculus (TRC) and Domain Relational Calculus (DRC)
- Mapping from ER Model to Relational Model
- Difference between Simultaneous and Hierarchical Access Memory Organisations
- Difference between Waterfall Model and Spiral Model
- Difference between Waterfall model and Incremental model
- Difference between V-model and Waterfall model
- Difference between RAD Model and Waterfall Model
- Difference between Agile Model and V-Model
- Difference between Bottom-Up Model and Top-Down Model
- Difference between Prototype Model and Spiral Model
- Difference between Shared Memory Model and Message Passing Model in IPC
- Difference between Spiral model and Incremental model
- Difference between Prototype Model and RAD Model
- Difference between RAD Model and Incremental Model
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.