Skip to content

A level-based roadmap to master relational databases with PostgreSQL. Practice schema design, normalization, real-world SQL, and transactions using Docker. Great for backend developers.

License

Notifications You must be signed in to change notification settings

AhmedDiaab/practical-dbms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Database Roadmap Practice

This repository contains structured practice material for learning databases β€” organized by levels for backend developers. Each folder includes examples, exercises, and real-world challenges with SQL and NoSQL.

🧭 Levels Overview

Level Importance
Fundamentals βœ… Mandatory
Schema Design βœ… Mandatory
Querying Deep Dive βœ… Mandatory
Advanced SQL βœ… Mandatory
Indexing & Query Optimization βœ… Mandatory
Transactions & Concurrency βœ… Mandatory
Views, Functions, and Triggers βœ… Mandatory
Security & Permissions βœ… Mandatory
NoSQL Fundamentals 🟑 Optional
Capstone Projects & Practice βœ… Mandatory

πŸ’‘ How to Use

Each level has its own directory:

  • schema-design/ β†’ Schema definitions, constraints, normalization
  • querying-deep-dive/ β†’ JOINs, GROUP BY, CTEs, subqueries
  • advanced-sql/ β†’ Window functions, recursive CTEs, pivoting
  • indexing-optimization/ β†’ EXPLAIN plans, performance fixes
  • transactions-concurrency/ β†’ Isolation levels, locking, race conditions
  • views-functions-triggers/ β†’ Reusable logic via SQL
  • security-permissions/ β†’ GRANT/REVOKE, RLS, injection prevention
  • nosql-fundamentals/ β†’ MongoDB & Redis basics
  • capstone-projects/ β†’ Real-world builds (e-commerce, LMS, etc.)

πŸ›  Setup

This project assumes PostgreSQL is installed.

You can run it using Docker:

docker-compose up -d

Edit .env.example with credentials and copy to .env

πŸ“¦ Sample Seed Database

A small e-commerce schema and seed data are included in schema-design/.

psql -U postgres -d practice_db < schema-design/schema.sql
psql -U postgres -d practice_db < schema-design/seed.sql

πŸ§ͺ Practice Tips

  • Document your SQL logic in each folder
  • Use EXPLAIN ANALYZE to benchmark
  • Try refactoring poor queries into optimal versions
  • Extend capstone projects into full-stack apps

Feel free to clone, fork, and contribute. Let’s master databases step-by-step

About

A level-based roadmap to master relational databases with PostgreSQL. Practice schema design, normalization, real-world SQL, and transactions using Docker. Great for backend developers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published