Repository navigation
v7.0.0 — Master SQL and Database for AI World
🗄️ Master SQL and Database for AI World — Complete
The SQL and Database section is now stable and available.
What's Inside
- 15 structured modules covering SQL from basics to AI engineering
- Full PostgreSQL curriculum with real databases, schemas, and queries
- Python integration with psycopg2, SQLAlchemy, and FastAPI
- pgvector and RAG for AI-powered database applications
- Hands-on notebooks with 60+ rows of sample data and 7 tables
Modules
- Setup and Datasets — PostgreSQL install, psql cheat sheet, sample database
- SQL Introduction — What SQL is, DBMS vs RDBMS, command types (DDL, DML, DQL, DCL, TCL)
- Database Fundamentals — Tables, rows, columns, keys, data types, constraints
- SELECT and Filtering — SELECT, WHERE, operators, ORDER BY, LIMIT, NULL handling, pagination
- Aggregations and GROUP BY — COUNT, SUM, AVG, GROUP BY, HAVING, CASE, FILTER
- JOINs — INNER, LEFT, RIGHT, FULL, CROSS, SELF, anti-joins, row explosion pitfalls
- Subqueries and CTEs — Correlated subqueries, EXISTS, IN, CTEs, UNION, INTERSECT, EXCEPT
- Advanced SQL — Window functions, recursive CTEs, ROLLUP/CUBE, LATERAL, JSONB, arrays, full-text search
- Transactions and Concurrency — INSERT/UPDATE/DELETE, upsert, ACID, isolation levels, MVCC, locks, deadlocks
- Indexes and Performance — Index types, composite, partial, covering, EXPLAIN ANALYZE
- Database Design — ER modeling, normalization (1NF-BCNF), denormalization, foreign key actions
- Advanced Database — Views, materialized views, functions, procedures, triggers, roles, row-level security, SQL injection
- Database Architecture — OLTP vs OLAP, data warehousing, partitioning, replication, sharding, backup, CAP
- SQL and Python — psycopg, Pandas with SQL, SQLAlchemy, Alembic migrations, FastAPI integration
- SQL for AI Engineering — Text-to-SQL, SQL agents, safe SQL execution, pgvector, hybrid search, RAG
What You'll Master
| Skill | Covered In |
|---|---|
| Writing complex queries | Modules 04-07 |
| Optimizing performance | Module 10 |
| Designing databases | Module 11 |
| Building production schemas | Module 12 |
| Connecting Python to SQL | Module 14 |
| Using pgvector for AI | Module 15 |
| Text-to-SQL and SQL agents | Module 15 |
| RAG with database storage | Module 15 |
Reference Book Included
- MySQL Handbook Tutorials PDF
Contributors
Special thanks to everyone who contributed queries, notebooks, and improvements to this section.
🎯 What's Next
Cloud DevOps and System Design section is in progress.