Welcome to the SQL Zero to Hero Roadmap! This repository is designed to take you from the absolute basics of databases to advanced queries and real-world database design. It contains a structured, phase-wise learning path complete with theoretical notes and practical SQL scripts.
The learning materials are divided into 18 systematic folders, culminating in 4 real-world projects:
SQL-Learning/
├── 01-Database-Basics/ # Intro to DBs, Tables, Primary & Foreign Keys
├── 02-DDL-Commands/ # CREATE, ALTER, DROP, TRUNCATE
├── 03-DML-Commands/ # INSERT, UPDATE, DELETE
├── 04-Select-Queries/ # SELECT, WHERE, ORDER BY, LIMIT
├── 05-Operators/ # Comparison, Logical, BETWEEN, IN, LIKE
├── 06-Aggregate-Functions/ # COUNT, SUM, AVG, MIN, MAX
├── 07-GROUPING/ # GROUP BY, HAVING
├── 08-JOINS/ # INNER, LEFT, RIGHT, FULL, SELF
├── 09-Subquery/ # Single Row, Multiple Row, Correlated
├── 10-Set-Operations/ # UNION, INTERSECT, EXCEPT
├── 11-Database-Relationships/# 1:1, 1:N, N:M
├── 12-Constraints/ # PK, FK, UNIQUE, NOT NULL, CHECK
├── 13-Indexes/ # Single & Composite Indexes
├── 14-Views/ # Virtual Tables
├── 15-Transactions/ # BEGIN, COMMIT, ROLLBACK
├── 16-PostgreSQL/ # JSONB, UUID, ENUM, ARRAY, CTE, Window Functions
├── 17-Optimization/ # EXPLAIN, ANALYZE, Query Tuning
├── 18-Real-Projects/ # Capstone Projects (Library, Student, E-Commerce, ERP)
└── datasets/ # Sample datasets for practice
Here is your structured learning roadmap to master SQL step-by-step:
শিখবে:
- Database কী, Table কী
- Row, Column
- Primary Key, Foreign Key
Practice:
CREATE DATABASE school_db;
CREATE TABLE students (
id SERIAL PRIMARY KEY,
name VARCHAR(100)
);শিখবে: INSERT, SELECT, UPDATE, DELETE
Practice:
INSERT INTO students(name) VALUES('Atul');
SELECT * FROM students;শিখবে: WHERE, LIKE, IN, BETWEEN, ORDER BY, LIMIT
Practice:
SELECT * FROM students WHERE age > 18;শিখবে: COUNT(), SUM(), AVG(), MIN(), MAX()
Practice:
SELECT AVG(gpa) FROM students;Practice:
SELECT department, COUNT(*)
FROM students
GROUP BY department;শিখবে: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN
Practice:
SELECT s.name, d.department_name
FROM students s
INNER JOIN departments d ON s.department_id = d.id;শিখবে: One To One, One To Many, Many To Many
💡 Pro Tip: এটা BrainCampus-এর মতো Project-এর জন্য খুব গুরুত্বপূর্ণ।
শিখবে: Subquery, CTE, Window Functions, Views
শিখবে: JSONB, UUID, ENUM, ARRAY, Triggers, Functions
💡 Pro Tip: BrainCampus-এর মতো Multi-Tenant System-এ এগুলো অনেক কাজে লাগবে।
শিখবে: Index, Explain, Analyze, Query Optimization
⚠️ Note: ১ লাখ Student হলে Query Slow কেন হচ্ছে সেটা বুঝতে এই ফেজটি জরুরি।
এই ৪টা Project Database নিজে Design করবে:
- Student Management System
- Library Management System
- E-Commerce Database
- School ERP Database
শেষে School ERP Database-এ যে বিষয়গুলো থাকবে: Schools, Sessions, Semesters, Students, Teachers, Results, Attendance, Fees, Exams.
Happy Querying! 🎉