Hierarchical Database vs. Relational Database

Instructor: David Gloag

David has over 40 years of industry experience in software development and information technology and a bachelor of computer science

In this lesson, we'll take a look at hierarchical and relational databases, their organization, and why we might use them. At the end of this lesson, you should have a basic understanding of these interesting technologies. Updated: 07/17/2021

Data Is Everywhere!

We live in an information age. Each day, we are inundated with information from all directions. News reports tell us what is happening in the world, advertisements try to persuade us to purchase various items, and we receive things like bank statements and bills in the mail. If you think this amounts to information overload, you'd be right. So, if it is for us, how do the sources get a handle on it? Well, to put it simply, they use an interesting technology called a database.

What Is a Database?

A database is a collection of information centered on a particular theme. Many examples of this exist behind the scenes of our daily lives. News reports are stored in a database for searching and categorization before they are added to a telecast. Advertising information is stored in a database before a marketing whiz uses it to determine the focus group for a campaign. And account information is stored in a database before it makes it onto your monthly statement. But to make the information useful, it must be organized in a meaningful way.

Hierarchical Database

A hierarchical database is a set of tables organized in the form of a parent-child relationship. Each set of parents can have a relationship with any number of children. However, each child can have a relationship with only one set of parents. A hierarchical database model is a one-to-many relationship. Think of an upside-down tree with the root at the top. To retrieve data from the database, the entire tree has to be traversed starting from the root downwards. A prime example is the org chart for your company. At the top is your CEO. Below that person are the Vice-Presidents, and so on down the line. This type of structure is known as a 'tree'. Each box is an element in the database, and is focused on a particular person. The information for that person is stored based on its relationship to the elements around it.

Example of a hierarchical model.

Relational Database

In contrast, a relational database organizes information in the form of a table or tables. Think of this like the phone list for your company. The list will have the person's name, their extension, and possibly their department. Each row of the table is an element in the database, and is focused on a particular person. This is similar to a hierarchical database, but the information for a particular person is stored in a table, where the position is based on when it was created.

Relational models are good for adding on new elements
relational model

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it now
Create an account to start this course today
Used by over 30 million students worldwide
Create an account