Hello, young data explorer! Welcome to your very first module in the Certified PostgreSQL Expert course. In this module, you will learn what a database is, why databases are important, and how PostgreSQL fits into the picture. You do not need to know anything about computers or programming before reading this. We will start from the very beginning. Think of this module as your first step into a world where information is stored neatly, safely, and can be found in seconds.
Have you ever made a list of your friends' phone numbers? Or kept a record of your football scores? Or written down your school timetable? If yes, then you have already created a simple database. A database is just a place where we keep information in an organised way. But a computer database is much more powerful. It can hold millions of records. It can find any record in less than a second. It can keep your information safe from thieves. It can even let many people use the same information at the same time.
This module is written especially for beginners. We will use very simple words. When we must use a big word, we will explain it in a way that a 13-year-old can understand. We will use stories, examples from Nigeria, examples from school, and examples from home. We will also use pictures made from keyboard characters (called ASCII art) to help you see what we mean. By the end of this module, you will know:
This module is long because it is a complete chapter, not just short notes. Take your time. Read one lesson at a time. Do the exercises. Ask questions. Talk to your parents or teachers about what you learn. Are you ready? Let us begin!
After finishing this module, you should be able to:
Chika was a 13-year-old girl who lived in Enugu, Nigeria. She loved school. She loved her friends. She loved mathematics. But one day, something terrible happened. The school's exam scores went missing.
The teacher had written all the scores in a big notebook. But a rat ate the notebook. The teacher was very sad. She did not know who scored what. The students were worried. Their parents were worried. Everyone waited for days. No one knew their results.
Chika's uncle worked at a bank in Lagos. He heard about the problem. He said, "This would not happen if the school used a database."
Chika was confused. "What is a database?" she asked.
Her uncle explained, "A database is a special place where we keep information on a computer. It keeps the information safe. It keeps it organised. And it can find any information in seconds. If the school used a database, the rat could not eat the scores. The scores would be safe forever."
Chika was amazed. She decided to learn everything she could about databases. She wanted to help her school. She wanted to help her community. She wanted to become a database expert.
Moral of the story: Databases keep information safe and organised. Anyone can learn to use them.
Data is information. It is facts. It is numbers. It is words. It is anything you can write down or store.
Data is everywhere. Your name is data. Your age is data. Your school is data. Your favourite food is data. Without data, we cannot remember things. We cannot plan. We cannot make decisions.
Imagine you have a box of pencils. Each pencil is a piece of data. If you want to count the pencils, you need to look at each one. Data is like those pencils. It is the small pieces of information that we collect and use.
When you write your name on a test paper, your name is data.
In school, your teacher writes your scores in a mark book. Those scores are data.
At home, your parents may write a shopping list. The items on the list are data.
In a Nigerian market, a trader writes down the prices of goods. Those prices are data.
DATA:
[ NAME: CHIKA ]
[ AGE: 13 ]
[ SCHOOL: ENUGU GRAMMAR ]
[ FAVOURITE FOOD: JOLLOF RICE ]
|
V
[ INFORMATION ABOUT CHIKA ]
Data is information. It is facts, numbers, and words. We use data every day at home, in school, and in the market.
You learned what data is. You saw examples from home, school, and Nigeria. Now you know that data is all around you.
A database is a place where we store data in an organised way. It keeps the data safe. It keeps the data neat. It helps us find the data quickly.
Without a database, data can get lost. It can get mixed up. It can be stolen. A database keeps data safe and easy to find.
Imagine your school bag. If you throw everything inside, you cannot find your pencil. But if you have different pockets for different things, you can find anything quickly. A database is like a very organised school bag for data.
A bank uses a database to store customer names, account numbers, and balances.
A school uses a database to store student names, classes, and exam scores.
A family can use a database to store birthdays, phone numbers, and shopping lists.
In a Nigerian hospital, a database stores patient names, illnesses, and treatments.
DATABASE: [ STUDENT TABLE ] +----+----------+-------+ | ID | NAME | SCORE | +----+----------+-------+ | 1 | CHIKA | 85 | | 2 | EMEKA | 90 | | 3 | NGOZI | 78 | +----+----------+-------+
A database is a place where we store data in an organised way. It keeps data safe and easy to find.
You learned what a database is. You saw examples from home, school, and Nigeria. Now you know that a database is like an organised school bag for data.
Paper records are written on paper. Database records are stored on a computer. Databases are better because they are faster, safer, and easier to search.
Paper can be lost. Paper can be eaten by rats. Paper can be burned in a fire. A database can be backed up. It can be copied. It can be stored in many places.
Imagine you have a notebook with your friends' phone numbers. If you lose the notebook, you lose all the numbers. But if you store the numbers in a database, you can find them even if you lose your phone.
A bank stores customer information in a database. Even if a fire burns the bank building, the data is safe.
A school stores exam scores in a database. The scores cannot be eaten by rats.
A family stores important documents in a database. They can find them quickly.
In a Nigerian market, traders can use a database to track sales. They can see what sells best.
| Feature | Paper Records | Database |
|---|---|---|
| Speed of search | Slow | Very fast |
| Safety | Can be lost or damaged | Can be backed up |
| Space needed | Lots of space | Very little space |
| Many users | Only one person at a time | Many people at the same time |
| Cost | Paper and ink | Computer and electricity |
| Accuracy | Can have writing errors | Can check for errors |
PAPER RECORDS:
[ NOTEBOOK ] --> [ CAN BE LOST ]
|
V
[ DATA IS GONE ]
DATABASE:
[ COMPUTER ] --> [ BACKED UP ]
|
V
[ DATA IS SAFE ]
Databases are better than paper. They are faster, safer, and easier to search.
You learned why databases are better than paper. You saw a comparison table. Now you know that databases keep data safe.
A database management system (DBMS) is a software program. It helps you create a database. It helps you store data. It helps you find data. It helps you keep data safe.
Without a DBMS, you would have to write every detail yourself. A DBMS does the hard work for you. It keeps everything organised.
Imagine you have a big library. You need a librarian to organise the books. A DBMS is like the librarian. It organises your data.
A bank uses a DBMS to store customer information. The DBMS keeps the data safe.
A school uses a DBMS to store student scores. The DBMS helps teachers find scores quickly.
A family uses a DBMS to store recipes. The DBMS helps them find recipes quickly.
In a Nigerian bank, a DBMS is used to store customer accounts. The DBMS keeps the data safe from thieves.
DBMS:
[ USER ] --> [ DBMS ] --> [ DATABASE ]
|
V
[ ORGANISES DATA ]
[ KEEPS DATA SAFE ]
[ FINDS DATA QUICKLY ]
A DBMS is a software program that helps you manage a database. It keeps data organised and safe.
You learned what a DBMS is. You saw examples from home, school, and Nigeria. Now you know that a DBMS is like a librarian for your data.
PostgreSQL is a type of DBMS. It is a very powerful database management system. It is free to use. It is used by many companies around the world.
PostgreSQL is powerful. It can handle large amounts of data. It is safe. It is reliable. It is used by banks, governments, and big companies.
Imagine you have a toolbox. Different tools do different jobs. PostgreSQL is like a very good toolbox for data. It has many tools. It can help you store, find, and protect your data.
Instagram uses PostgreSQL to store user information and photos.
A school can use PostgreSQL to store student records.
A family can use PostgreSQL to store important documents.
In a Nigerian bank, PostgreSQL can be used to store customer accounts. It keeps the data safe and easy to find.
PostgreSQL:
[ DATABASE ] --> [ POSTGRESQL ] --> [ SAFE DATA ]
| |
V V
[ STORE DATA ] [ FIND DATA QUICKLY ]
|
V
[ USE DATA FOR DECISIONS ]
PostgreSQL is a powerful DBMS. It is free. It is used by many companies.
You learned what PostgreSQL is. You saw examples from home, school, and Nigeria. Now you know that PostgreSQL is a powerful tool for managing data.
PostgreSQL is special because it is open source. Open source means it is free. Anyone can use it. Anyone can study it. Anyone can improve it. It is also very reliable and very powerful.
Many companies cannot afford expensive databases. PostgreSQL gives them a powerful database for free. This helps small businesses and schools in Nigeria and around the world.
Imagine you want to play football. You need a ball. Some balls are very expensive. Some balls are cheap. PostgreSQL is like a very good ball that is free. Everyone can play with it.
A small business in Lagos can use PostgreSQL for free. They do not need to pay for expensive software.
A school can use PostgreSQL for free. They can store all student records.
A family can use PostgreSQL for free. They can store recipes and contacts.
In a Nigerian hospital, PostgreSQL can be used to store patient records. The hospital does not need to pay for expensive software.
| Feature | What It Means |
|---|---|
| Open source | Free to use and study |
| Reliable | Works well for a long time |
| Powerful | Can handle large amounts of data |
| Secure | Keeps data safe from thieves |
| Fast | Finds data in seconds |
| Many users | Many people can use it at once |
WHY POSTGRESQL IS SPECIAL:
[ OPEN SOURCE ] --> [ FREE TO USE ]
|
V
[ RELIABLE ] --> [ WORKS WELL ]
|
V
[ POWERFUL ] --> [ HANDLES BIG DATA ]
|
V
[ SECURE ] --> [ KEEPS DATA SAFE ]
PostgreSQL is special because it is open source, reliable, powerful, and secure.
You learned why PostgreSQL is special. You saw a table of features. Now you know that PostgreSQL is a great choice for storing data.
A table is a way to organise data in a database. It looks like a grid. It has rows and columns. Each row is a record. Each column is a field.
Tables keep data neat. They make it easy to find data. They make it easy to add new data.
Imagine you have a class register. The register has rows for each student. It has columns for name, age, and score. A database table is like that register.
A bank has a table for customers. Each row is a customer. Each column is a detail.
A school has a table for students. Each row is a student. Each column is a detail.
A family has a table for birthdays. Each row is a person. Each column is a detail.
In a Nigerian market, a trader has a table for goods. Each row is a good. Each column is a detail.
TABLE: +----+----------+-------+ | ID | NAME | SCORE | +----+----------+-------+ | 1 | CHIKA | 85 | | 2 | EMEKA | 90 | | 3 | NGOZI | 78 | +----+----------+-------+ (rows and columns)
A table is a grid of rows and columns. It keeps data neat and organised.
You learned what a table is. You saw examples from home, school, and Nigeria. Now you know that tables keep data neat.
A row is a line in a table. It goes from left to right. A column is a line in a table. It goes from top to bottom. A record is the data in one row. It is one complete piece of information.
Rows and columns help you find data. Records help you understand data. Without them, data would be a mess.
Imagine a class register. Each student has a line. That line is a row. The line contains the student's record. The columns are the details: name, age, and score.
In a bank table, each row is a customer. Each row is a record.
In a school table, each row is a student. Each row is a record.
In a family table, each row is a person. Each row is a record.
In a Nigerian market, each row is a good. Each row is a record.
ROWS AND COLUMNS: +----+----------+-------+ | ID | NAME | SCORE | <-- column headers +----+----------+-------+ | 1 | CHIKA | 85 | <-- row 1 (record 1) | 2 | EMEKA | 90 | <-- row 2 (record 2) | 3 | NGOZI | 78 | <-- row 3 (record 3) +----+----------+-------+
Rows go left to right. Columns go top to bottom. A record is the data in one row.
You learned about rows, columns, and records. You saw examples from home, school, and Nigeria. Now you know how tables are organised.
A primary key is a special column in a table. It gives each row a unique name or number. No two rows can have the same primary key.
A primary key helps you find a specific row. It stops confusion. It keeps data accurate.
Imagine your school gives every student a unique number. That number is like a primary key. No two students have the same number.
In a bank, every customer has a unique account number. That is a primary key.
In a school, every student has a unique admission number. That is a primary key.
In a family, every person has a unique name. That can be a primary key.
In a Nigerian bank, every customer has a unique account number. That is a primary key.
PRIMARY KEY: +----+----------+-------+ | ID | NAME | SCORE | +----+----------+-------+ | 1 | CHIKA | 85 | <-- ID is primary key | 2 | EMEKA | 90 | | 3 | NGOZI | 78 | +----+----------+-------+ (each ID is unique)
A primary key is a unique column. It gives each row a unique name or number.
You learned what a primary key is. You saw examples from home, school, and Nigeria. Now you know that primary keys stop confusion.
SQL stands for Structured Query Language. It is a language we use to talk to databases. We use SQL to ask questions. We use SQL to give commands.
SQL is how we get data from a database. Without SQL, we cannot ask the database for information.
Imagine you have a magic book. You can ask the book questions. The book answers you. SQL is like the words you use to ask the book questions.
A bank uses SQL to find a customer's account balance.
A school uses SQL to find a student's exam score.
A family uses SQL to find a recipe for jollof rice.
In a Nigerian bank, SQL is used to find customer accounts. The bank can find any account in seconds.
SQL:
[ USER ] --> [ SQL ] --> [ DATABASE ]
|
V
[ "FIND STUDENT CHIKA" ]
|
V
[ DATABASE ANSWERS ]
SQL is a language we use to talk to databases. We use it to ask questions and give commands.
You learned what SQL is. You saw examples from home, school, and Nigeria. Now you know that SQL is how we talk to databases.
A query is a question you ask a database. You use SQL to write a query. The database answers your query.
Queries help you find data. Queries help you understand data. Without queries, you cannot use a database.
Imagine you are in a library. You ask the librarian for a book. The librarian finds the book. A query is like asking the librarian.
A bank asks the database: "Show me all customers with a balance above 1000."
A school asks the database: "Show me all students with a score above 80."
A family asks the database: "Show me all birthdays in December."
In a Nigerian bank, a query is used to find all customers in Lagos.
QUERY:
[ USER WRITES QUERY: "FIND STUDENTS WITH SCORE > 80" ]
|
V
[ DATABASE SEARCHES ]
|
V
[ DATABASE RETURNS RESULTS ]
|
V
[ USER SEES STUDENTS: CHIKA, EMEKA ]
A query is a question you ask a database. The database answers your query.
You learned what a query is. You saw examples from home, school, and Nigeria. Now you know that queries help you find data.
PostgreSQL stores data on a computer's hard drive. It stores data in files. It keeps the files organised. It uses tables to keep data neat.
Understanding how data is stored helps you use PostgreSQL better. It helps you keep your data safe.
Imagine you have a big cupboard. You put your clothes in different drawers. PostgreSQL is like that cupboard. It puts data in different tables.
A bank's database is stored on a computer. The computer is in a secure room.
A school's database is stored on a computer. The computer is in the office.
A family's database is stored on a home computer.
In a Nigerian bank, the database is stored on a secure computer. The bank uses PostgreSQL to keep the data safe.
HOW POSTGRESQL STORES DATA:
[ COMPUTER HARD DRIVE ]
|
V
[ POSTGRESQL FILES ]
|
V
[ TABLES WITH ROWS AND COLUMNS ]
|
V
[ DATA IS SAFE AND ORGANISED ]
PostgreSQL stores data on a computer's hard drive. It keeps data in tables. It keeps data safe and organised.
You learned how PostgreSQL stores data. You saw examples from home, school, and Nigeria. Now you know that PostgreSQL keeps data safe.
Databases are everywhere. They are in banks, schools, hospitals, and markets. They help people store and find information quickly.
Knowing where databases are used helps you understand their value. It helps you see how you can use databases in your own life.
Imagine you walk into a bank. The bank uses a database to find your account. Imagine you walk into a hospital. The hospital uses a database to find your records. Databases are everywhere.
A supermarket uses a database to track what products are in stock.
A school uses a database to track student attendance.
A family uses a database to track their budget.
In a Nigerian market, a trader uses a database to track sales. The trader knows which goods sell best.
| Place | What the Database Stores |
|---|---|
| Bank | Customer names, account numbers, balances |
| School | Student names, classes, scores |
| Hospital | Patient names, illnesses, treatments |
| Market | Goods, prices, sales |
| Library | Book titles, authors, borrowers |
| Government | Citizen names, addresses, taxes |
DATABASES ARE EVERYWHERE:
[ BANK ] [ SCHOOL ] [ HOSPITAL ] [ MARKET ]
| | | |
V V V V
[ STORE AND FIND DATA QUICKLY ]
Databases are everywhere. They are in banks, schools, hospitals, and markets.
You learned about real-life databases. You saw a table of examples. Now you know that databases help people every day.
A database thinker is someone who thinks about data. They ask questions like: "How can I store this data?" and "How can I find it quickly?"
If you think like a database expert, you can solve problems. You can help your school, your family, and your community.
Imagine you are playing a game of chess. A good chess player thinks about the next move. A database thinker thinks about how to organise data.
Before you store data, ask: "What columns do I need? What is my primary key?"
Before you store student scores, ask: "How will I find a student's score quickly?"
Before you store family birthdays, ask: "How will I remember everyone's birthday?"
Before you store market sales, ask: "How will I know which goods sell best?"
THINK LIKE A DATABASE EXPERT:
[ ASK: "WHAT DATA DO I HAVE?" ]
|
V
[ ASK: "HOW SHOULD I ORGANISE IT?" ]
|
V
[ ASK: "HOW WILL I FIND IT QUICKLY?" ]
|
V
[ DESIGN A TABLE ]
|
V
[ STORE DATA SAFELY ]
A database thinker thinks about how to store and find data. You can become a database thinker by asking good questions.
You learned how to become a database thinker. You saw examples from home, school, and Nigeria. Now you can start thinking like a database expert.
PostgreSQL is a powerful database management system. It is free to use. It is used by many companies. You can install it on your computer.
Learning PostgreSQL can help you get a good job. Many companies need people who know PostgreSQL.
Imagine you want to learn to play a musical instrument. PostgreSQL is like a guitar. You can learn to play it. You can make beautiful music with data.
A company in Lagos uses PostgreSQL to store customer data.
A school uses PostgreSQL to store student records.
A family uses PostgreSQL to store recipes.
In a Nigerian bank, PostgreSQL is used to store customer accounts. The bank can find any account in seconds.
YOUR FIRST LOOK AT POSTGRESQL:
[ INSTALL POSTGRESQL ]
|
V
[ CREATE A DATABASE ]
|
V
[ CREATE A TABLE ]
|
V
[ ADD DATA ]
|
V
[ RUN A QUERY ]
|
V
[ SEE RESULTS! ๐ ]
PostgreSQL is a powerful database management system. You can install it and learn to use it.
You learned about PostgreSQL. You saw examples from home, school, and Nigeria. Now you are ready to start using PostgreSQL.
| Word | Simple Definition |
|---|---|
| Data | Information. Facts, numbers, and words. |
| Database | A place where we store data in an organised way. |
| DBMS | Database Management System. Software that manages a database. |
| PostgreSQL | A powerful, free database management system. |
| Table | A grid of rows and columns in a database. |
| Row | A line in a table that goes left to right. |
| Column | A line in a table that goes top to bottom. |
| Record | The data in one row of a table. |
| Primary key | A unique column that gives each row a unique name or number. |
| SQL | Structured Query Language. A language for talking to databases. |
| Query | A question you ask a database. |
| Open source | Free to use, study, and improve. |
DATA
|
V
[ STORED IN A DATABASE ]
|
V
[ ORGANISED IN TABLES ]
|
V
[ QUERIED WITH SQL ]
|
V
INFORMATION!
1960s: First databases created. 1970s: SQL invented. 1980s: PostgreSQL created at Berkeley. 1990s: Databases become common in businesses. 2000s: Open source databases grow. 2010s: Databases used in social media and apps. 2020s: Databases used everywhere. 2025: You are learning PostgreSQL!
TABLE: STUDENTS +----+----------+-------+ | ID | NAME | SCORE | <-- column headers +----+----------+-------+ | 1 | CHIKA | 85 | <-- row 1 (record 1) | 2 | EMEKA | 90 | <-- row 2 (record 2) | 3 | NGOZI | 78 | <-- row 3 (record 3) +----+----------+-------+ (primary key = ID)
| Feature | Paper Records | Database |
|---|---|---|
| Speed of search | Slow | Very fast |
| Safety | Can be lost or damaged | Can be backed up |
| Space needed | Lots of space | Very little space |
| Many users | Only one person at a time | Many people at the same time |
| Cost | Paper and ink | Computer and electricity |
| Accuracy | Can have writing errors | Can check for errors |
| Feature | PostgreSQL | MySQL | SQLite |
|---|---|---|---|
| Cost | Free | Free | Free |
| Power | Very powerful | Powerful | Simple |
| Best for | Large apps | Websites | Small apps |
| Security | Very strong | Strong | Basic |
| Users | Many at once | Many at once | One at a time |
In this module, you learned the basics of databases and PostgreSQL. You learned that data is information. You learned that a database is a place where we store data in an organised way. You learned that a DBMS is software that manages a database. You learned that PostgreSQL is a powerful, free DBMS used by many companies.
You learned about tables. Tables have rows and columns. Rows go left to right. Columns go top to bottom. A record is the data in one row. A primary key is a unique column that gives each row a unique name or number.
You learned about SQL. SQL is a language we use to talk to databases. A query is a question you ask a database. You also learned that databases are everywhere: in banks, schools, hospitals, and markets.
You learned how to become a database thinker. You ask questions like: "What data do I have?" and "How should I organise it?" You learned about PostgreSQL and why it is special. It is open source, reliable, powerful, and secure.
Now you are ready to move on to Module 2, where you will learn how to install PostgreSQL and create your first database. But before you go, make sure you understand the key takeaways below.
Match the word in Column A with the correct definition in Column B.
| Column A | Column B |
|---|---|
| 1. Data | A. A place where we store data in an organised way |
| 2. Database | B. A language for talking to databases |
| 3. Table | C. Information. Facts, numbers, and words |
| 4. Primary key | D. A grid of rows and columns |
| 5. SQL | E. A unique column that gives each row a unique name |
| 6. Query | F. A powerful, free database management system |
| 7. PostgreSQL | G. A question you ask a database |
Answers: 1-C, 2-A, 3-D, 4-E, 5-B, 6-G, 7-F
Title: Design a Class Register
Instructions: In groups of 3 or 4, design a class register as a database table.
List the columns you need. Choose a primary key. Add 5 rows of data.
Present your table to the class.
Example:
Columns: ID, Name, Age, Score
Primary key: ID
Rows: 1, Chika, 13, 85; 2, Emeka, 13, 90; 3, Ngozi, 12, 78; 4, Tunde, 14, 92; 5, Fatima, 13, 88.
Title: My First Database Plan
Instructions: Write a short plan for a database you would like to create.
List at least 5 columns. Choose a primary key. Explain what the database will store.
Example:
Database: My Friends
Columns: ID, Name, Age, Phone, Favourite Food
Primary key: ID
What it stores: Information about my friends.
Title: Build a Paper Database
Materials: Paper, pen, ruler.
Steps:
Assignment: For one week, look for databases in your daily life. Keep a diary. Each day, write down:
At the end of the week, write a short report. Share it with your teacher or parent.
In Module 2, you will learn how to install PostgreSQL on your computer. You will learn how to create your first database. You will learn how to create tables and add data. You will learn how to run simple queries.
Before you start Module 2, make sure you understand everything in this module. Practice organising information at home and school. Think about how databases are used in your community. When you are ready, turn the page and continue your journey to becoming a Certified PostgreSQL Expert!
End of Module 1.