Hello again, future Data Architect! In Module 1, you learned what data is and why it is important. Now, we are going to explore where data is stored and how it is organised. Just like you have different places to store your things โ a drawer for clothes, a shelf for books, and a box for toys โ computers have different places to store data.
In this module, you will learn about databases, data lakes, and data warehouses. These are like special containers that hold data. You will also learn about different ways to organise data so that it is easy to find and use.
Let's begin with a story that will help you understand these ideas!
After this module, you will be able to:
Chidi loved collecting toys. He had cars, action figures, and building blocks. But his room was a mess โ toys were everywhere! He could never find what he wanted.
His mother said: โChidi, you need to organise your toys. Use different boxes for different types of toys.โ
Chidi got three boxes:
Now, Chidi could find any toy quickly. Each box was like a database โ it stored similar things together. Inside each box, the toys were organised โ for example, cars were arranged by colour.
Just like Chidi's toy boxes, computers store data in special containers. Some containers are like databases (organised, structured), some are like data lakes (a big pool of raw data), and some are like data warehouses (organised for analysis).
Let's explore these containers!
Definition: A database is a collection of data that is organised so that it can be easily accessed, managed, and updated.
Why is it important? Without databases, we would have to search through piles of data to find what we need.
Simple explanation: A database is like a giant, organised filing cabinet. Each drawer has files, and each file has papers with data.
Realโlife example: A school's student database stores the names, ages, and grades of all students.
School example: Your school uses a database to keep track of attendance.
Home example: Your phone's contact list is a small database.
Nigerian example: The NIN database stores information for millions of Nigerians.
Illustration:
+---------------------+
| Database |
+---------------------+
| Student Name | Age |
+---------------------+
| Ada | 10 |
| Chidi | 12 |
+---------------------+
Mini summary: A database is an organised collection of data that is easy to access and update.
Definition: A table is a way to organise data in rows and columns โ like a spreadsheet.
Why is it important? Tables make it easy to see relationships between different pieces of data.
Simple explanation: Think of a table like a grid. Each row is a record (a single item), and each column is a field (a type of information).
Realโlife example: A teacher's gradebook โ each row is a student, and each column is a subject.
School example: A timetable โ rows are periods, columns are days of the week.
Home example: A chore chart โ rows are chores, columns are days of the week.
Nigerian example: A market price list โ rows are items, columns are prices from different sellers.
Illustration:
+---------------------+----------------+----------------+
| Name | Age | Class |
+---------------------+----------------+----------------+
| Ada | 10 | Primary 5 |
| Chidi | 12 | JSS 1 |
+---------------------+----------------+----------------+
Mini summary: A table organises data in rows and columns.
Definition: A relational database stores data in tables that are connected to each other through relationships.
Why is it important? It allows us to link data from different tables โ like linking a student to their classes.
Simple explanation: Imagine you have two tables: one for students and one for classes. A relational database can link a student to the classes they are taking.
Realโlife example: A hospital database links patients to their doctors.
School example: A school database links students to their teachers.
Home example: A family database links parents to their children.
Nigerian example: A bank database links customers to their accounts.
Illustration:
+------------------+ +------------------+
| Students | | Classes |
+------------------+ +------------------+
| ID | Name | | ID | Subject |
+------------------+ +------------------+
| 1 | Ada | | 1 | Math |
| 2 | Chidi | | 2 | Science |
+------------------+ +------------------+
| |
+----------+-----------------+
|
v
+-------------------------------------+
| Student_Classes (links them) |
+-------------------------------------+
| Student_ID | Class_ID |
+-------------------------------------+
| 1 | 1 |
| 2 | 2 |
+-------------------------------------+
Mini summary: Relational databases connect tables using relationships.
Definition: SQL (Structured Query Language) is a special language used to talk to databases and get the data you need.
Why is it important? SQL is the most common way to interact with databases โ it's like the language of data.
Simple explanation: SQL is like asking a librarian for a book โ you say "I want all books by this author" and the librarian (database) brings them to you.
Realโlife example: When you search for a product on a website, the website uses SQL to find it in the database.
School example: A teacher uses SQL to find all students who scored above 80.
Home example: You use SQL to find all movies you watched last month.
Nigerian example: A bank uses SQL to find all transactions for a customer.
Illustration:
SQL Command:
SELECT * FROM Students WHERE Age > 10;
(This asks the database to give you all students older than 10.)
Mini summary: SQL is the language we use to ask databases for data.
Definition: NoSQL databases are databases that do not use the traditional table format โ they can store data in documents, keyโvalue pairs, or graphs.
Why is it important? NoSQL databases are great for storing large amounts of unstructured data โ like social media posts.
Simple explanation: While relational databases are like a filing cabinet, NoSQL databases are like a big box where you can throw different types of items.
Realโlife example: Facebook uses NoSQL databases to store posts, photos, and comments.
School example: A school might use NoSQL to store student portfolios with different types of files.
Home example: A smart home might use NoSQL to store data from different sensors.
Nigerian example: A fintech app might use NoSQL to store transaction data.
Illustration:
NoSQL Document:
{
"name": "Ada",
"age": 10,
"subjects": ["Math", "Science"],
"address": {"city": "Lagos", "state": "Lagos"}
}
Mini summary: NoSQL databases are flexible and can store many types of data.
Definition: A data lake is a large storage place where you can keep raw data in its original format โ like a giant pool of data.
Why is it important? Data lakes let you store all your data without having to organise it first. You can decide how to use it later.
Simple explanation: Imagine a big lake where you can throw all your toys โ cars, dolls, blocks โ without sorting them. Later, you can dive in and pick out what you need.
Realโlife example: A company might store all its logs, customer data, and sensor data in a data lake.
School example: A school might store all student records, teacher notes, and photos in a data lake.
Home example: You might store all your family photos and videos in a data lake.
Nigerian example: The NIN system might use a data lake to store different types of citizen data.
Illustration:
+---------------------+
| Data Lake |
+---------------------+
| Raw Data |
| - Logs |
| - Images |
| - Documents |
| - Sensor data |
+---------------------+
Mini summary: A data lake stores raw data in its original form.
Definition: A data warehouse is a large storage place that holds organised, processed data that is ready for analysis and reporting.
Why is it important? Data warehouses make it easy to run reports and answer business questions.
Simple explanation: A data warehouse is like a library โ the books are organised, catalogued, and ready to be read.
Realโlife example: A retail company uses a data warehouse to analyse sales trends.
School example: A school uses a data warehouse to analyse student performance over time.
Home example: You might use a data warehouse to track your spending habits.
Nigerian example: A bank uses a data warehouse to analyse customer transactions and detect fraud.
Illustration:
+---------------------+
| Data Warehouse |
+---------------------+
| Organised Data |
| - Sales reports |
| - Customer data |
| - Financial data |
+---------------------+
Mini summary: A data warehouse stores organised, processed data for analysis.
Definition: Data lakes store raw data; data warehouses store processed, organised data.
Why is it important? Choosing the right one depends on what you need to do with the data.
Simple explanation: A data lake is like a messy room where you throw everything. A data warehouse is like a tidy room where everything is in its place.
Realโlife example: A company uses a data lake to store all raw data, and a data warehouse to store cleaned, organised data for analysis.
School example: A school stores all student records in a data lake, and uses a data warehouse to generate report cards.
Home example: You store all family photos in a data lake, and use a data warehouse to create a photo album.
Nigerian example: A bank stores all transaction logs in a data lake, and uses a data warehouse to generate monthly statements.
Illustration:
+------------------+ +------------------+
| Data Lake | | Data Warehouse |
| (Raw Data) | | (Processed Data)|
+------------------+ +------------------+
| - Logs | -> | - Reports |
| - Images | | - Analytics |
| - Sensor data | | - Dashboards |
+------------------+ +------------------+
Mini summary: Data lakes store raw data; data warehouses store organised, processed data.
Definition: A lakehouse is a new type of storage that combines the best of data lakes and data warehouses โ raw data storage with organised querying.
Why is it important? It gives you the flexibility of a data lake and the performance of a data warehouse.
Simple explanation: A lakehouse is like having a big room where you can throw everything, but also have shelves and labels to find things quickly.
Realโlife example: A modern company might use a lakehouse to store all their data and run fast analytics.
School example: A school might use a lakehouse to store student data and quickly generate reports.
Home example: You might use a lakehouse to store all your digital files and quickly search for anything.
Nigerian example: A fintech company might use a lakehouse to store transaction data and run real-time analytics.
Illustration:
+---------------------+
| Lakehouse |
+---------------------+
| Raw Data (like lake)|
| +----------------+ |
| | Organised (like | |
| | warehouse) | |
| +----------------+ |
+---------------------+
Mini summary: A lakehouse combines the features of data lakes and data warehouses.
Definition: Data in tables is organised into rows and columns. Rows are records (single items), and columns are fields (types of information).
Why is it important? This structure makes it easy to find, sort, and filter data.
Simple explanation: Rows are like people standing in a line; columns are like different pieces of information about each person.
Realโlife example: A spreadsheet with names in rows and scores in columns.
School example: A class register โ rows are students, columns are attendance days.
Home example: A family budget โ rows are expenses, columns are months.
Nigerian example: A market inventory โ rows are items, columns are prices and quantities.
Illustration:
+----------+----------+----------+
| Name | Age | Grade | โ Columns
+----------+----------+----------+
| Ada | 10 | A | โ Row
| Chidi | 12 | B | โ Row
+----------+----------+----------+
Mini summary: Data is organised in rows (records) and columns (fields).
Definition: A primary key is a unique identifier for each row in a table. A foreign key is a link to a primary key in another table.
Why is it important? They help connect tables in a relational database.
Simple explanation: A primary key is like a student's ID number โ it's unique for each student. A foreign key is like the class ID that links a student to their class.
Realโlife example: A hospital has patient IDs (primary keys) and doctor IDs (foreign keys).
School example: A student ID is a primary key, and the teacher ID in the class table is a foreign key.
Home example: A family tree โ each person has a unique ID (primary key), and children link to parents (foreign keys).
Nigerian example: NIN is a primary key for citizens, and a bank account number can be a foreign key.
Illustration:
Students Table
+----------+----------+----------+
| ID (PK) | Name | Class_ID |
+----------+----------+----------+
| 1 | Ada | 101 |
| 2 | Chidi | 102 |
+----------+----------+----------+
Classes Table
+----------+----------+----------+
| ID (PK) | Class | Teacher |
+----------+----------+----------+
| 101 | Math | Mr. A |
| 102 | Science | Ms. B |
+----------+----------+----------+
Mini summary: Primary keys identify rows; foreign keys link tables.
Definition: A backup is a copy of data that can be used if the original data is lost or damaged.
Why is it important? Without backups, you could lose all your data โ forever!
Simple explanation: A backup is like making a photocopy of your homework โ if you lose the original, you still have a copy.
Realโlife example: Companies make daily backups of their data to protect against disasters.
School example: Your teacher makes copies of important documents.
Home example: You save your photos to the cloud as a backup.
Nigerian example: Banks make backups of customer data to prevent loss.
Illustration:
+------------------+ +------------------+
| Original Data | -- | Backup Copy |
+------------------+ +------------------+
| - Database | --> | - Database |
| - Files | | - Files |
+------------------+ +------------------+
Mini summary: Backups are copies of data to protect against loss.
Definition: Archiving means moving old data that is not used often to a special storage area for long-term keeping.
Why is it important? It keeps your main database fast and organised, while still keeping important old data.
Simple explanation: Archiving is like putting your old toys in a box in the attic โ you don't need them every day, but you want to keep them.
Realโlife example: A bank archives old transaction data after 5 years.
School example: A school archives old student records after they graduate.
Home example: You archive old photos that you don't look at often.
Nigerian example: The NIN system archives old citizen records.
Illustration:
+------------------+ +------------------+
| Active Data | -- | Archived Data |
+------------------+ +------------------+
| - Recent sales | --> | - Old sales |
| - Current users | | - Old users |
+------------------+ +------------------+
Mini summary: Archiving is moving old data to long-term storage.
Definition: Cloud storage is a way to store data on remote servers that are accessible over the internet.
Why is it important? It allows you to access your data from anywhere and ensures it is safe and backed up.
Simple explanation: Cloud storage is like a giant, secure warehouse for your data, managed by a company like Google, Amazon, or Microsoft.
Realโlife example: Google Drive, iCloud, and OneDrive are all cloud storage services.
School example: A school stores assignments and projects in the cloud.
Home example: You store your photos in the cloud so you can see them on any device.
Nigerian example: Many Nigerian companies use cloud services like AWS and Azure.
Illustration:
Your Device โ Internet โ Cloud Storage
(Phone) โ (Wi-Fi) โ (Google Drive)
Mini summary: Cloud storage stores data on remote servers accessible via the internet.
Definition: A modern data architecture often uses a combination of databases, data lakes, and data warehouses.
Why is it important? Different types of data need different types of storage.
Simple explanation: You don't store all your things in one box โ you use different boxes for different items. Similarly, data architects use different storage systems for different data.
Realโlife example: A company uses a database for daily transactions, a data lake for raw logs, and a data warehouse for reporting.
School example: A school uses a database for student records, a data lake for all documents, and a data warehouse for performance analysis.
Home example: You use a database for your contacts, a data lake for all your files, and a data warehouse for your budget analysis.
Nigerian example: A fintech uses a database for transactions, a data lake for all logs, and a data warehouse for business intelligence.
Illustration:
+-------------------------------------+
| Modern Data Architecture |
+-------------------------------------+
| +--------+ +--------+ +------+|
| | Database| |Data Lake| |DW ||
| |(OLTP) | |(Raw) | |(Analytics)|
| +--------+ +--------+ +------+|
+-------------------------------------+
Mini summary: A complete data architecture uses different storage systems for different needs.
| Word | Simple Definition |
|---|---|
| Database | An organised collection of data. |
| Table | Data organised in rows and columns. |
| Relational Database | A database with tables connected by relationships. |
| SQL | A language used to talk to databases. |
| NoSQL | A database that stores data without tables. |
| Data Lake | A storage place for raw data. |
| Data Warehouse | A storage place for processed, organised data. |
| Lakehouse | A combination of a data lake and a data warehouse. |
| Primary Key | A unique identifier for a row. |
| Foreign Key | A link to a primary key in another table. |
| Backup | A copy of data for protection. |
| Archive | Old data stored for long-term keeping. |
| Cloud Storage | Data stored on remote servers over the internet. |
This module introduces the key storage concepts in data architecture. Use plenty of visual aids โ tables, diagrams, and comparisons. Encourage students to think about data storage in their daily lives โ contacts, photos, documents. The goal is to build a solid understanding of databases, data lakes, and data warehouses.
Encourage your child to think about how data is stored in their daily lives โ in phones, in the cloud, in notebooks. Discuss the difference between organised storage (warehouse) and raw storage (lake). Help them understand the importance of backups and archiving.
| Feature | Database | Data Lake | Data Warehouse |
|---|---|---|---|
| Data Type | Structured | Raw, unstructured | Processed, structured |
| Use Case | Transactions | Storage, exploration | Analytics, reporting |
| Example | MySQL | Amazon S3 | Snowflake |
+----------+----------+----------+----------+
| ID (PK) | Name | Age | Grade |
+----------+----------+----------+----------+
| 1 | Ada | 10 | A |
| 2 | Chidi | 12 | B |
| 3 | Kofi | 11 | A |
+----------+----------+----------+----------+
+------------------+ +------------------+
| Data Lake | | Data Warehouse |
| (Raw Data) | | (Organised Data)|
+------------------+ +------------------+
| - All data | -> | - Clean data |
| - No structure | | - Structured |
| - Cheap storage | | - Optimized |
+------------------+ +------------------+
You have completed Module 2 โ "Storing Data"! You now know about databases, data lakes, and data warehouses. You understand how data is organised in tables and how SQL is used to communicate with databases. You also learned about backups and archiving.
These concepts are the foundation of data architecture. Data architects choose the right storage system based on the type of data and what it will be used for.
Great work โ you are now ready for Module 3!
| Term | Definition |
|---|---|
| 1. Database | A. Stores raw data |
| 2. Data Lake | B. An organised collection of data |
| 3. Data Warehouse | C. A language to query databases |
| 4. SQL | D. Stores processed data |
| 5. Primary Key | E. A unique identifier for a row |
Answers: 1โB, 2โA, 3โD, 4โC, 5โE
Scenario 1: A school wants to store student data. They need a system to track grades, attendance, and contact information. What type of storage would you recommend? Why?
Scenario 2: A company has large amounts of raw data from sensors. They want to store it and later analyse it. What type of storage would you recommend? Why?
In groups, design a data storage plan for a Nigerian business โ e.g., a bank, a market, or a school. Decide what types of data they need to store, and choose the best storage systems (database, data lake, data warehouse) for each type. Present your plan to the class.
Think about a personal project โ e.g., tracking your expenses or organising your photos. Design a data storage plan for your project. Include a database, a data lake, and a data warehouse if needed. Write down your plan and explain your choices.
Design a Database for a School: Create a database with tables for students, teachers, and classes. Define primary keys, foreign keys, and relationships. Write a simple SQL query to find all students in a specific class.
Create a data storage plan for a small business โ e.g., a retail shop. Include a database for sales, a data lake for logs, and a data warehouse for analytics. Explain why you chose each system.
Design a complete data architecture for a Nigerian fintech company. Include databases for transactions, data lakes for logs, and data warehouses for analytics. Also include backup and archiving strategies. Present your design in detail.
FillโinโtheโBlank: 1. database, 2. rows, 3. relational, 4. SQL, 5. data lake, 6. data warehouse, 7. lakehouse, 8. primary, 9. foreign, 10. backup.
True/False: 1F, 2T, 3F, 4T, 5F, 6F, 7F, 8T, 9T, 10T.
Multiple Choice: 1B, 2B, 3A, 4B, 5A, 6A, 7B, 8A, 9B, 10A, 11A, 12B, 13C, 14B, 15B.
In Module 3, you will learn about data modeling โ how to design the structure of your data. You will learn about Entity-Relationship Diagrams (ERDs), normalization, and different types of schemas. To prepare, think about how you would organise data for a project โ what tables would you need, and how would they be connected?
Excellent work, future Data Architect! See you in Module 3!