Skip to content

🔍 SQL Mastery

Từ Query Cơ bản đến Performance Tuning Chuyên sâu

Bộ tài liệu SQL duy nhất đi từ query anatomy đến execution plan internals, với real-world performance tuning case studies. Mỗi concept kèm "Gotcha" section phân tích lỗi thường gặp ở production.

ModulesLessonsDuration
52035–50 giờ

📋 Overview

Learning Outcomes

  • ✅ Viết complex queries: subqueries, CTEs, recursive queries
  • ✅ Master window functions: ROW_NUMBER, RANK, LAG/LEAD, running totals
  • ✅ Đọc và tối ưu execution plans (EXPLAIN ANALYZE)
  • ✅ Thiết kế indexing strategy cho real-world workloads
  • ✅ Hiểu ACID properties và isolation levels ở production depth
  • ✅ Thiết kế database schema: normalization, denormalization trade-offs
  • ✅ Debug và fix performance bottlenecks với systematic approach

Prerequisites

  • Hiểu khái niệm database: table, row, column, primary key
  • Đã viết ít nhất SELECT/INSERT/UPDATE/DELETE cơ bản
  • Nắm cơ bản về data types (integer, varchar, date)

🗺️ Suggested Roadmaps


📚 Curriculum Tree

⚠️ Curriculum Index Preview: Đây là bản preview cấu trúc curriculum — hiển thị danh sách module, lesson titles, và exercise types. Nội dung bài học đầy đủ (lecture notes, code examples, exercises có lời giải) nằm trong Premium Pack.

bundle-sql--mod-01: SQL Foundations & Query Anatomy (4 lessons)
Logical Query Processing Order

FROM → WHERE → GROUP BY → HAVING → SELECT → ORDER BY — tại sao thứ tự quan trọng

Exercise Types:

  • 🎯 ScenarioChoice
  • 🧩 Parsons

⏱️ ~40 phút · 📊 beginner

JOIN Deep Dive: INNER, LEFT, RIGHT, FULL, CROSS

Venn diagrams sai lầm, NULL behavior, performance implications

Exercise Types:

  • 🔍 SpotTheBug
  • 🎯 ScenarioChoice

⏱️ ~50 phút · 📊 beginner

Subqueries vs CTEs vs Derived Tables

Khi nào dùng gì, materialization behavior, recursive CTE

Exercise Types:

  • 🧩 Parsons
  • 🎯 ScenarioChoice

⏱️ ~45 phút · 📊 intermediate

NULL Semantics & Three-Valued Logic

COALESCE, NULLIF, IS DISTINCT FROM — traps và best practices

Exercise Types:

  • 🔍 SpotTheBug
  • 🎯 ScenarioChoice

⏱️ ~35 phút · 📊 beginner

bundle-sql--mod-02: Window Functions & Advanced Queries (4 lessons)
Window Function Fundamentals

OVER clause, PARTITION BY, ORDER BY, frame specification syntax

Exercise Types:

  • 🧩 Parsons
  • 🎯 ScenarioChoice

⏱️ ~50 phút · 📊 intermediate

Ranking Functions & Running Totals

ROW_NUMBER vs RANK vs DENSE_RANK, cumulative aggregates

Exercise Types:

  • 🧩 Parsons
  • 🔍 SpotTheBug

⏱️ ~45 phút · 📊 intermediate

LAG/LEAD & Gap Analysis

Time series analysis, session detection, funnel analytics

Exercise Types:

  • 🧩 Parsons
  • 🎯 ScenarioChoice

⏱️ ~50 phút · 📊 intermediate

PIVOT, UNPIVOT & Conditional Aggregation

Dynamic pivot, CASE-based aggregation, crosstab patterns

Exercise Types:

  • 🧩 Parsons
  • 🔍 SpotTheBug

⏱️ ~45 phút · 📊 advanced

bundle-sql--mod-03: Indexing & Query Optimization (4 lessons)
B-Tree Index Internals

Page structure, key ordering, composite index column order matters

Exercise Types:

  • 🎯 ScenarioChoice
  • 🏗️ ArchitectureDragDrop

⏱️ ~55 phút · 📊 intermediate

Covering Indexes & Index-Only Scans

INCLUDE columns, visibility map, when covering wins

Exercise Types:

  • 🔍 SpotTheBug
  • 🎯 ScenarioChoice

⏱️ ~45 phút · 📊 advanced

EXPLAIN ANALYZE Masterclass

Reading execution plans, Seq Scan vs Index Scan, join strategies

Exercise Types:

  • 🔍 SpotTheBug
  • 🎯 ScenarioChoice

⏱️ ~60 phút · 📊 advanced

Query Anti-Patterns & Rewrites

Sargability, implicit conversions, OR expansion, pagination traps

Exercise Types:

  • 🔍 SpotTheBug
  • 🧩 Parsons

⏱️ ~50 phút · 📊 advanced

bundle-sql--mod-04: Transactions, Concurrency & ACID (4 lessons)
ACID Properties & Isolation Levels

Read committed, repeatable read, serializable — phantom reads explained

Exercise Types:

  • 🎯 ScenarioChoice
  • 🔍 SpotTheBug

⏱️ ~50 phút · 📊 intermediate

MVCC Internals (PostgreSQL Focus)

Transaction IDs, tuple visibility, vacuum, bloat prevention

Exercise Types:

  • 🎯 ScenarioChoice
  • 🏗️ ArchitectureDragDrop

⏱️ ~55 phút · 📊 advanced

Locking Strategies & Deadlock Prevention

Row-level locks, advisory locks, lock ordering, timeout strategies

Exercise Types:

  • 🔍 SpotTheBug
  • 🎯 ScenarioChoice

⏱️ ~50 phút · 📊 advanced

Write-Ahead Logging & Crash Recovery

WAL mechanics, checkpoint tuning, point-in-time recovery

Exercise Types:

  • 🎯 ScenarioChoice
  • 🏗️ ArchitectureDragDrop

⏱️ ~45 phút · 📊 expert

bundle-sql--mod-05: Database Design & Modeling (4 lessons)
Normalization: 1NF → BCNF → 5NF

Functional dependencies, decomposition, khi nào dừng normalize

Exercise Types:

  • 🎯 ScenarioChoice
  • 🏗️ ArchitectureDragDrop

⏱️ ~55 phút · 📊 intermediate

Denormalization Strategies

Materialized views, summary tables, event sourcing vs CRUD

Exercise Types:

  • 🏗️ ArchitectureDragDrop
  • 🎯 ScenarioChoice

⏱️ ~45 phút · 📊 advanced

Schema Migration Best Practices

Zero-downtime migrations, expand-contract, backward compatibility

Exercise Types:

  • 🎯 ScenarioChoice
  • 🔍 SpotTheBug

⏱️ ~50 phút · 📊 advanced

Real-World Modeling: E-Commerce & Analytics

Star schema, snowflake, slowly changing dimensions

Exercise Types:

  • 🏗️ ArchitectureDragDrop
  • 🎯 ScenarioChoice

⏱️ ~55 phút · 📊 advanced


📦 What You Get

  • PDF lecture notes (28 bài, kèm query examples)
  • Obsidian vault với SQL cheat sheets & pattern library
  • Practice datasets (PostgreSQL dump files)
  • Performance tuning checklist templates

Lifetime updates: PostgreSQL & MySQL version-specific notes được cập nhật theo major releases.


Câu hỏi thường gặp

Quy trình mua hàng như thế nào?

Bạn nhắn tin qua Messenger với bundle muốn mua. Đội ngũ PENALGO sẽ xác nhận đơn hàng, hướng dẫn thanh toán qua chuyển khoản ngân hàng, và gửi link Google Drive chứa tài liệu trong vòng 24 giờ sau khi xác nhận thanh toán.

Tài liệu được giao dưới dạng gì?

Mỗi bundle bao gồm: PDF lecture notes (full diagrams), Obsidian vault (backlinks & graph view), code templates theo ngôn ngữ, và toàn bộ được đóng gói trong Google Drive ZIP. Bạn nhận link tải một lần và sở hữu vĩnh viễn.

Chính sách cập nhật tài liệu ra sao?

Lifetime updates — mỗi phiên bản mới được gửi qua email đăng ký kèm changelog chi tiết. Tối thiểu 2 lần cập nhật mỗi năm cho mỗi bundle, bổ sung case studies mới và cập nhật theo phiên bản công nghệ.

Tôi có thể hoàn tiền không?

Hoàn tiền 100% trong vòng 24 giờ kể từ khi nhận tài liệu, không cần lý do. Sau 24 giờ, do tính chất digital của sản phẩm, chính sách hoàn tiền không còn áp dụng.

Nên mua bundle nào trước?

Tuỳ mục tiêu: Chuẩn bị phỏng vấn → bắt đầu với Algorithms & Data Structures Core. Muốn lên senior → System Design Universe. Chuyển sang DevOps → Docker Masterclass + Infrastructure & DevOps. Xem mục Roadmaps để tìm lộ trình phù hợp nhất với career path của bạn.

Roadmap hoạt động như thế nào?

Mỗi roadmap là một lộ trình học tập được thiết kế cho một mục tiêu nghề nghiệp cụ thể. Roadmap gợi ý thứ tự học các module từ nhiều bundle khác nhau, kèm milestone checkpoints để tự đánh giá tiến độ. Roadmap là hướng dẫn — bạn vẫn cần mua bundle tương ứng để truy cập nội dung.

Curriculum Tree trên web hiển thị gì?

Curriculum Tree là bản preview cấu trúc module/lesson — cho thấy phạm vi và độ sâu của mỗi bundle. Đây là metadata (tiêu đề, mục tiêu, tags), không phải nội dung bài học đầy đủ. Nội dung chi tiết nằm trong Premium Pack khi bạn mua.

Tài liệu có phù hợp với người mới bắt đầu không?

Mỗi bundle ghi rõ prerequisites (yêu cầu đầu vào) — kiểm tra trước khi mua. Đa phần bundle yêu cầu kiến thức nền tảng cơ bản. Nếu bạn đã nắm vững prerequisites, tài liệu sẽ đưa bạn từ intermediate lên production-grade level.

Tôi có thể xem trước nội dung bài học không?

Curriculum Tree trên web cho phép bạn xem danh sách module, lesson titles, mục tiêu, và exercise types. Đây là preview đủ để đánh giá scope và depth. Nội dung bài học đầy đủ (lecture notes, code examples, exercises) chỉ có trong Premium Pack.

Hỗ trợ kỹ thuật khi gặp vấn đề với tài liệu?

Liên hệ qua Messenger hoặc email hỗ trợ. Đội ngũ phản hồi trong vòng 24 giờ (ngày làm việc). Hỗ trợ bao gồm: vấn đề tải file, lỗi format, câu hỏi về nội dung, và gợi ý lộ trình học tập.

Có giảm giá khi mua nhiều bundle không?

Có chính sách combo khi mua từ 3 bundle trở lên. Nhắn tin qua Messenger để nhận báo giá combo phù hợp với mục tiêu học tập của bạn.


💬 Mua ngay

Xin chào! Tôi quan tâm đến bundle "SQL Mastery" (bundle-sql). Tôi muốn biết thêm thông tin và cách mua.

💬 Mua qua Messenger

Nội dung đầy đủ được giao trong Premium Pack qua Google Drive.


Quay lại Premium Vault · Xem Roadmaps

Cập nhật lần cuối: