David has over 40 years of industry experience in software development and information technology and a bachelor of computer science
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.
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.
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.
Why One Over the Other?
So when would you use one type of database over the other? This is an interesting question because both look like they would be similar. But that is not the case. For specific, important operations, they each take center stage.
If your application requires a lot of searching or requires the collection to be sorted, then you would choose a hierarchical database. Elements are stored based on their relationship to one another, so these operations are faster in this type of database. However, if your application adds a lot of new elements, then you would choose a relational database. When a new element is added, it is stored at the end of the table. This makes adding elements very fast.
To recap, a database is a collection of information centered on a particular theme. A hierarchical database stores information based on its relationship to the information around it. This structure is known as a tree. This makes searching and sorted output fast. Relational databases store information in table form, which makes adding fast. Each has particular uses, and works well in specific applications.
To unlock this lesson you must be a Study.com Member.
Create your account
Register to view this lesson
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
Already a member? Log InBack