hierarchical database model is a data model in which the data are organized into a tree-like structure. The data are stored as records which are connected to one another through links. A record is a collectionof fields, with each field containing only one value. The type of a record defines which fields the record contains.The hierarchical database model mandates that each child record has only one parent, whereas each parent record can have one or more child records. In order to retrieve data from a hierarchical database the whole tree needs to be traversed starting from the root node. This model is recognized as the first database model created by IBM in the 1960sAn organization could store employee information in a table that contains attributes/columns such as employee number, first name, last name, and department number. The organization provides each employee with computer hardware as needed, but computer equipment may only be used by the employee to which it is assigned. The organization could store the computer hardware information in a separate table that includes each part's serial number, type, and the employee that uses it. The tables might look like this:employee tableEmpNo First NameLast NameDept. Num100MahwishFaki10-L101HamadhHashim 10-L102NirunAr20-B103Chaaya Sandakelum20-Bcomputer tableSerial NumTypeUser EmpNo3009734-4Computer1003-23-283742Monitor1002-22-723423Monitor100232342 Printer 100In this model, the employee data table represents the "parent" part of the hierarchy, while the computertable represents the "child" part of the hierarchy. In contrast to tree structures usually found in computer software algorithms, in this model the children point to the parents. As shown, each employee
may possess several pieces of computer equipment, but each individual piece of computer equipment may have only one employee owner.Consider the following structure:EmpNo DesignationReportsTo10Director20Senior Manager1030Typist2040Programmer20In this, the "child" is the same type as the "parent". The hierarchy stating EmpNo 10 is boss of 20, and 30and 40 each report to 20 is represented by the "ReportsTo" column. In Relational database terms, the ReportsTo column is a foreign key referencing the EmpNo column. If the "child" data type were different, it would be in a different table, but there would still be a foreign key referencing the EmpNo column of the employees table.