- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Hierarchical Data Model
A hierarchical data model was one of the earliest data models. This model was a file based model build like a tree. In this tree, parent could be associated to multiple child nodes, but a child node could have only one parent.
In the case of directories and files, it could be said that a single directory further contained multiple files or directories, those directories then contained more files and so on.
This can be represented as −
Example
An example of the hierarchical model using relational databases is as follows −
<Employee>
Emp_Number | Emp_Name | Emp_Designation | Emp_Salary |
1 | Brad | Writer | 60000 |
2 | Tom | Software Engineer | 15000 |
3 | Kevin | Secretary | 70000 |
<Computer>
Serial_Number | Type | Emp_Number |
A100001 | PC | 1 |
B930002 | PC | 2 |
C101703 | PC | 3 |
In the example given above, the Employee table is the parent table and the Computer table is the child. The computer table points to the employee table as it specifies which employee is using which computer.
Disadvantages of Hierarchical model
- In the hierarchical model, one to many relationships can easily be displayed as one parent node has multiple child nodes. But it is much more complicated to show many to many relationships using this model.
- The hierarchical model is rigid and not very flexible. If another node or relationship needs to be added to the model, it may disrupt the whole existing structure.
Advertisements