Database Management
Design and manage databases for schools, NGOs, and businesses using SQL and modern tools.
Prerequisites
No prior experience required β open to beginners.
Certificate
Awarded by Rescue Academy on successful completion of the program's assessments and final project.
Learn Online β Live Classes
Register, receive your schedule, and join live instructor-led Database Management classes on Zoom. Assignments, instructor feedback, and a certificate on completion.
Learn In Person
Attend Database Management classes in person in Juba with hands-on labs, instructor mentorship, and a certificate on completion.
What You'll Learn
- Database concepts: tables, keys, relationships
- SQL basics: SELECT, WHERE, JOIN
- Data integrity: primary keys, constraints
- CRUD operations and reporting queries
- Backup basics and simple database security
Curriculum
Beginner
Full lessons available belowModule 1: Database Fundamentals & SQL Basics
Learning objectives
- Understand relational databases and write basic SQL
Lessons
- Tables, Rows & Columns
- SELECT, INSERT, UPDATE, DELETE
Module 2: Querying & Filtering Data
Learning objectives
- Filter and sort query results
Lessons
- WHERE, ORDER BY & LIMIT
- Combining Conditions
Module 3: Joins & Table Relationships
Learning objectives
- Design and query related tables
Lessons
- Primary & Foreign Keys
- INNER & LEFT JOIN
Module 4: Aggregation & Reporting
Learning objectives
- Summarize data for reports
Lessons
- GROUP BY & Aggregate Functions
- Building a Simple Report Query
Module 5: Indexing, Performance & Database Security
Learning objectives
- Apply basic performance and security practices
Lessons
- Indexes & Query Performance
- Basic Access Control & Security
Intermediate
Outline β full lessons coming soonModule 1: Database Design
Learning objectives
- Design a normalized database schema
Lessons
- Entity-Relationship Diagrams
- Normalization Basics
Module 2: Subqueries & Views
Learning objectives
- Use subqueries and views for complex queries
Lessons
- Writing Subqueries
- Creating & Using Views
Module 3: Transactions & Data Integrity
Learning objectives
- Keep data consistent under concurrent use
Lessons
- Transactions & ACID Basics
- Constraints & Data Validation
Module 4: Working with a Database from Code
Learning objectives
- Connect an application to a database
Lessons
- Database Drivers/Connectors
- Basic CRUD from an App
Module 5: Intermediate Project
Learning objectives
- Design and build a working database-backed system
Lessons
- Planning a Database Project
- Build & Test It
Advanced
Outline β full lessons coming soonModule 1: Database Administration
Learning objectives
- Perform basic DB admin tasks
Lessons
- Backups & Restores
- User & Permission Management
Module 2: Performance Tuning
Learning objectives
- Diagnose and fix slow queries
Lessons
- Query Execution Plans
- Advanced Indexing Strategies
Module 3: NoSQL Concepts
Learning objectives
- Understand when NoSQL fits better than SQL
Lessons
- SQL vs NoSQL
- Basic Document Database Concepts
Module 4: Data Security & Compliance
Learning objectives
- Apply stronger security and privacy practices
Lessons
- Encryption Basics
- Data Privacy Considerations
Module 5: Capstone Project
Learning objectives
- Design, build, and secure a complete database system
Lessons
- Planning the Capstone
- Build, Secure & Present
Full Lessons β Beginner Level
1. Database Fundamentals & SQL Basics (MySQL & PostgreSQL)
A relational database stores data in tables (like spreadsheets) with rows (records) and columns (fields). SQL (Structured Query Language) is the universal language for interacting with databases. Popular database systems include MySQL (open-source, widely used in web apps) and PostgreSQL (advanced features, great for complex queries).
- A table has a fixed schema: each column has a name and a data type (
INT,VARCHAR,DATE). SELECT * FROM studentsretrieves all columns and rows from thestudentstable.- Use
WHEREto filter:SELECT * FROM students WHERE city = 'Juba'; - Always end SQL statements with a semicolon (
;) β the standard in both MySQL and PostgreSQL.
π‘ Practical Skill: Install MySQL Workbench (GUI for MySQL) or
pgAdmin (GUI for PostgreSQL). Practice in the terminal with mysql> or psql>.
Both are free and run on Windows, macOS, and Linux.
Try it Yourself β Creating a Table & Inserting Data
SQL (MySQL / PostgreSQL)
-- Create a new database
CREATE DATABASE rescue_academy;
-- Use the database
USE rescue_academy; -- MySQL
-- \c rescue_academy -- PostgreSQL alternative
-- Create a students table
CREATE TABLE students (
id INT PRIMARY KEY AUTO_INCREMENT, -- SERIAL in PostgreSQL
name VARCHAR(100) NOT NULL,
age INT,
city VARCHAR(50),
program VARCHAR(100)
);
-- Insert sample data
INSERT INTO students (name, age, city, program)
VALUES
('Grace', 22, 'Juba', 'Database Management'),
('John', 24, 'Malakal', 'Web Development'),
('Amina', 21, 'Wau', 'Data Science');
-- Query: show all students
SELECT * FROM students;
2. Querying & Filtering Data
The SELECT statement is the most common SQL command. You can filter rows with
WHERE, sort with ORDER BY, and limit results
with LIMIT (MySQL/PostgreSQL) or TOP (SQL Server). Filtering is essential
for generating reports and finding specific records in large datasets.
SELECT name, program FROM students WHERE age > 21;β filters students older than 21.ORDER BY age DESCβ sorts from oldest to youngest.LIMIT 3β returns only the first 3 rows.- Use
LIKEfor pattern matching:WHERE city LIKE 'J%'finds cities starting with "J".
π‘ Practical Skill: Use MySQL Workbench or pgAdmin to
visually build queries. Export results to CSV for reports. Track your schema changes with Git
by saving SQL scripts as .sql files.
Try it Yourself β Filtering & Sorting Records
SQL (MySQL / PostgreSQL)
-- Find all students from Juba
SELECT name, program, age
FROM students
WHERE city = 'Juba';
-- Sort students by age (youngest first)
SELECT name, age, city
FROM students
ORDER BY age ASC;
-- Find the top 2 oldest students
SELECT name, age, program
FROM students
ORDER BY age DESC
LIMIT 2;
-- Pattern search: students whose name starts with 'G'
SELECT * FROM students
WHERE name LIKE 'G%';
-- Output: Grace, 22, Juba, Database Management
3. Joins & Table Relationships
Databases use relationships to connect tables via foreign keys. A
JOIN combines rows from two or more tables based on a related column. The most common
type is INNER JOIN, which returns only matching rows. This is how you link students to
their enrolled courses, orders to customers, or projects to teams.
- A primary key (e.g.,
student_id) uniquely identifies each row in a table. - A foreign key (e.g.,
student_idin theenrollmentstable) references the primary key of another table. INNER JOINreturns only rows with matching keys in both tables.LEFT JOINreturns all rows from the left table, even if no match exists on the right.
π‘ Practical Skill: Design your database on paper first β draw Entity-Relationship Diagrams (ERDs) using tools like draw.io or MySQL Workbench. A clear schema prevents data duplication and keeps your queries fast.
Try it Yourself β Joining Students with Enrollments
SQL (MySQL / PostgreSQL)
-- Create a related enrollments table
CREATE TABLE enrollments (
enrollment_id INT PRIMARY KEY AUTO_INCREMENT,
student_id INT,
course VARCHAR(100),
enrollment_date DATE,
FOREIGN KEY (student_id) REFERENCES students(id)
);
-- Insert enrollment data
INSERT INTO enrollments (student_id, course, enrollment_date)
VALUES
(1, 'Database Management', '2026-01-15'),
(1, 'SQL Advanced', '2026-02-01'),
(2, 'Web Development', '2026-01-20'),
(3, 'Data Science', '2026-01-25');
-- INNER JOIN: show student names with their courses
SELECT s.name, e.course, e.enrollment_date
FROM students s
INNER JOIN enrollments e ON s.id = e.student_id
ORDER BY s.name;
-- Output: Grace (Database Management, 2026-01-15)
-- Output: Grace (SQL Advanced, 2026-02-01)
-- Output: John (Web Development, 2026-01-20)
-- Output: Amina (Data Science, 2026-01-25)
-- LEFT JOIN: show ALL students even if not enrolled
SELECT s.name, e.course
FROM students s
LEFT JOIN enrollments e ON s.id = e.student_id;
4. Aggregation & Reporting
Aggregate functions perform calculations across multiple rows and return a single value.
COUNT(), SUM(), AVG(), MIN(), and MAX()
are the building blocks of business reports. Combined with GROUP BY, you can summarize data
by category β like counting students per program or calculating average age per city.
COUNT(*)counts all rows in a group.AVG(age)calculates the average age.GROUP BY programgroups results by each unique program name.- Use
HAVING(notWHERE) to filter after aggregation.
π‘ Practical Skill: Build reports that NGOs and businesses need β e.g., "Number of beneficiaries per region" or "Total monthly expenses." Use MySQL Workbench to export query results to Excel for further analysis.
Try it Yourself β Aggregate Reports
SQL (MySQL / PostgreSQL)
-- Count total students
SELECT COUNT(*) AS total_students FROM students;
-- Average age of all students
SELECT AVG(age) AS average_age FROM students;
-- Count students per program
SELECT program, COUNT(*) AS student_count
FROM students
GROUP BY program;
-- Average age per city (only cities with at least 1 student)
SELECT city, AVG(age) AS avg_age, COUNT(*) AS count
FROM students
GROUP BY city
HAVING COUNT(*) >= 1
ORDER BY avg_age DESC;
-- Find the oldest student overall
SELECT name, age FROM students
WHERE age = (SELECT MAX(age) FROM students);
5. Indexing, Performance & Database Security
As your database grows, queries can become slow. Indexes are special lookup tables that the database search engine can use to speed up data retrieval. Think of an index like a book's table of contents. Database security involves user permissions, backups, and protecting against SQL injection β one of the most common web vulnerabilities.
- Create an index:
CREATE INDEX idx_city ON students(city);β speeds up queries filtering by city. - Never concatenate user input directly into SQL β use parameterized queries (prepared statements).
- Backup your database regularly:
mysqldump -u root rescue_academy > backup.sql - Grant least-privilege permissions:
GRANT SELECT ON rescue_academy.* TO 'readonly_user';
π‘ Practical Skill: Schedule automated backups with cron (Linux) or Task Scheduler (Windows). Use MySQL Workbench or pgAdmin to manage users and permissions visually. Always test backups by restoring to a staging server.
Try it Yourself β Indexing & Security Best Practices
SQL (MySQL / PostgreSQL)
-- Create an index to speed up city-based searches
CREATE INDEX idx_students_city ON students(city);
-- Show index usage (MySQL)
EXPLAIN SELECT * FROM students WHERE city = 'Juba';
-- PostgreSQL: EXPLAIN ANALYZE SELECT ...
-- Create a read-only user for reporting
-- MySQL:
CREATE USER 'reporter'@'localhost' IDENTIFIED BY 'secure_password';
GRANT SELECT ON rescue_academy.* TO 'reporter'@'localhost';
-- PostgreSQL:
-- CREATE USER reporter WITH PASSWORD 'secure_password';
-- GRANT CONNECT ON DATABASE rescue_academy TO reporter;
-- GRANT SELECT ON ALL TABLES IN SCHEMA public TO reporter;
-- Parameterized query example (pseudo-code in Python/Java)
-- Python: cursor.execute("SELECT * FROM students WHERE city = %s", (user_input,))
-- Java: PreparedStatement stmt = conn.prepareStatement("SELECT * FROM students WHERE city = ?");
-- Backup command (run in terminal, not inside SQL prompt)
-- mysqldump -u root -p rescue_academy > rescue_academy_backup.sql
-- pg_dump -U postgres rescue_academy > rescue_academy_backup.sql
Quick Quiz β Database Management Basics
Tools & Technologies
- MySQL
- Git
- Microsoft Excel
Career Opportunities
- Junior web or software developer
- Freelance developer for local businesses and NGOs
- IT/software role in a company or government office
Practical Projects
- Design and populate a relational database for a real organization (e.g. an NGO's beneficiary records)
- Write a set of reporting queries answering real business questions from a sample dataset