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 −
An example of the hierarchical model using relational databases is as follows −
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.