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.
| 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 |
Each level has its own directory:
schema-design/β Schema definitions, constraints, normalizationquerying-deep-dive/β JOINs, GROUP BY, CTEs, subqueriesadvanced-sql/β Window functions, recursive CTEs, pivotingindexing-optimization/β EXPLAIN plans, performance fixestransactions-concurrency/β Isolation levels, locking, race conditionsviews-functions-triggers/β Reusable logic via SQLsecurity-permissions/β GRANT/REVOKE, RLS, injection preventionnosql-fundamentals/β MongoDB & Redis basicscapstone-projects/β Real-world builds (e-commerce, LMS, etc.)
This project assumes PostgreSQL is installed.
You can run it using Docker:
docker-compose up -dEdit
.env.examplewith credentials and copy to.env
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- Document your SQL logic in each folder
- Use
EXPLAIN ANALYZEto 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