🐘 PostgreSQL & SQL — Complete Notes

Mental Model First: Every section opens with the “why” before the “how”


Table of Contents

  1. Mental Model: How PostgreSQL Works Internally
  2. Data Types — Choosing Right
  3. DDL — Schema Design Patterns
  4. DML — CRUD with Edge Cases
  5. Joins — Visual Mental Model
  6. Aggregations & GROUP BY
  7. Subqueries & CTEs
  8. Window Functions
  9. Indexes — The Performance Engine
  10. EXPLAIN & Query Planning
  11. Transactions & Isolation Levels
  12. Constraints & Data Integrity
  13. Views, Materialized Views & Functions
  14. Partitioning
  15. JSON & JSONB
  16. Performance Tuning Checklist