Data Hierarchy 101

Kofi Amanfo II
We Are Orb
Published in
4 min readApr 21, 2017

Its all about data again and we move from bit to database this time, wait !. Let’s go from database to bit. Shall we ?

In the world we live in, we all know things are made up of things. Its all about building blocks everywhere. Constituents moving around in a single form on the surface of the earth. One example is the human body. Look at the human body. The human body is made up of systems, a system is made up of organs , an organ is made up of tissues, a tissue is made up of cells and so on. Now you see here, you are made up of stuffs which are in turn made up of stuffs.

In the technology world, things are moved by data. So it is important to understand what data is , and what is makes up data. For to truly understand something in a whole, we must first understand its parts.

Data hierarchy refers to the systematic organization of data, often in a hierarchical form. Data organization involves characters, fields, records, files and so on — Wikipedia

Data comes in many forms, and the more you organize data, the more meaning you can derive from data. Like a Lego, several Lego bricksdon’t really give meaning but when you bring the Lego bricks together, they can form really meaningful and delightful objects.

Data in its utmost whole is normally called a database. A database is a collection of files, a file is made up of records, a record is made up of fields, a field is made up of characters, a character is made up of bytes and a byte is made up of bits (bit is short form for binary digit). When data is organized into a database, it becomes easy to access and manipulate. The most popular database form is the relational database. Next in line is the noSQL database.

I am going to breakdown these two types of database using real life examples.

Relational Database

In a relational database, data is stored in files called tables. The table consists of records which are made up of fields. The table spreads the fields and maps them to the records in a column and row format. This helps for easy access, sorting and manipulation of the database. Fields make up the columns in the table and records make up the rows. This helps to build easy relations in order to find records easily. Its an SQL thing.
As an example, consider yourself in a company. The company has an employee database. In the database we have a table called Employee Information. As the table suggests, it is made up of information of each employee in the company. Information like first name , last name and date of birth of each employee.
Let’s say you are an employee named Jude Annan born on 14/12/1901. This is your record in the database and we can group your record into fields. The fields we can get are First Name, Last Name and Date Of Birth. Let’s keep our head down on one field to make it simple. In the First Name field, we have Jude. Let’s break down Jude. Jude is made up of characters. The characters are “J”, “u”, “d”, “e”. Each character is made up of a byte. So let’s break down “J” into bytes then. When “J” is broken into bytes you get
00000000 01001010 when you break this byte you get bits, a bit is either a
0 or 1.

Now you see what we did there, we broke the data down to bits. This is the Data Hierarchy. Each level of organization has its own meaning, but when dealing with large records of data, being on top of the hierarchy is a plus for easy access and manipulation of the data,

NoSQL Database

NoSQL means not only SQL. This means data can be stored in other different ways like tree structures, graphs, and so on to make it more accessible and easy to manipulate. It means you are not restricted to using tables for structuring your data anymore and you are not plagued by the limitations of relational databases anymore.
Oh and data hierarchy is similar to Relational Database when jumping to the records stage.

For The OOP Lovers

In programming the objects way, objects are modeled in a record manner.
Example in code form.

class Employee:
def __init__(first_name, last_name, birthday):
self.first_name = first_name
self.last_name = last_name
self.birthday = birthday

def save(self):
""" code to save to database """
# code goes here
pass

# To create Employee object and save to Database
employee1 = Employee("Jude" , "Annan", "14-02-1901")
employee1.first_name # Jude
employee1.last_name # Annan
employee1.birthday # 14-02-1901
employee1.save() # save persistently

If you found this helpful kindly click on the ❤ to recommend to your friends.

--

--

Kofi Amanfo II
We Are Orb

Software Engineer & Researcher in Blockchain, Design and Artificial Intelligence