Have you ever wondered how schools store students' names, examination scores, and attendance records? How does a supermarket remember the products it sells and the amount of money customers pay?
These activities often involve databases. A database helps people organise, store, manage, and retrieve information. In this module, you will learn what databases are, how they work, and why they are important when working with data and dashboards.
By the end of this module, you should be able to:
A database is an organised collection of information that can be stored, accessed, updated, and managed using a computer system.
Imagine a school with 1,000 students. The school needs to keep records of every student's name, age, class, examination scores, and attendance. Keeping all this information in notebooks would be difficult.
Instead, the school can use a database to store the information electronically. This makes it easier to search for a student's record, update information, and prepare reports.
Simple definition: A database is like a digital filing cabinet that keeps information organised.
You probably use services that depend on databases without even realising it.
Schools use databases to store student information such as:
Banks use databases to manage customer information and financial records. These may include:
A supermarket in Ibadan can use a database to manage:
Hospitals use databases to organise patient appointments, medical records, and other important information. Such information must be protected from unauthorised access.
One common way to organise information in a database is by using tables. A table stores related information in rows and columns.
Let's look at an example of a student database.
| Student ID | Student Name | Class | Score |
|---|---|---|---|
| ST001 | Adebayo | JSS 2 | 85 |
| ST002 | Chinonso | JSS 2 | 78 |
| ST003 | Fatima | JSS 3 | 92 |
| ST004 | Samuel | JSS 1 | 74 |
There are four important parts to understand:
A field is one category of information stored in a database table. For example, Student Name, Student ID, Class, and Score are fields in our student database.
A primary key is a field used to identify each record uniquely in a database table.
In our student table, Student ID can serve as the primary key because every student has a different identification number.
Example:
Even if two students have the same name, their Student IDs can help the school identify them correctly.
Databases can be organised in different ways depending on how information needs to be stored and accessed.
A relational database stores information in tables that can be connected using related fields.
For example, a school may have one table for students and another table for examination results. Both tables can be connected using Student ID.
A document database stores information in document-like formats. It is useful when information does not always follow the same table structure.
A cloud database is hosted on cloud computing infrastructure. It can allow authorised users and applications to access information over the internet.
Programs such as Microsoft Excel and Google Sheets can organise information in rows and columns. They are useful for small data tasks, although they are not the same as full database management systems.
A Database Management System, also called a DBMS, is software used to create, organise, manage, and access databases.
Think of a database as a digital storehouse. The DBMS is the software that helps people manage what is inside it.
Examples of database management systems include:
For example, a website can use MySQL to store user accounts, course information, examination results, and other records.
Databases are important in data analysis because they help organisations store large amounts of information in an organised way.
A data analyst can retrieve information from a database, study it, calculate important figures, and display the results on a dashboard.
Example: A school performance dashboard
This shows how databases, data analysis, and dashboards work together.
Imagine that you are helping a school in Lagos organise its student records.
Your task is to design a simple database table containing information about five students.
Your table should include these fields:
Example table:
| Student ID | Student Name | Age | Class | Score |
|---|---|---|---|---|
| ST001 | David | 13 | JSS 2 | 80 |
| ST002 | Mary | 12 | JSS 1 | 75 |
| ST003 | Daniel | 14 | JSS 3 | 90 |
| ST004 | Aisha | 13 | JSS 2 | 85 |
| ST005 | Peter | 12 | JSS 1 | 70 |
Answer these questions:
In this module, you have learned that:
Test your understanding by answering these questions:
You have completed Module 7: Introduction to Databases. You now understand how information is stored and organised in databases, and how databases support data analysis and dashboard creation.
In the next module, you will bring together what you have learned about dashboards, charts, KPIs, and data to complete a practical dashboard project.