Module 09 of 14

Transactions & Concurrency

Lessons

About This Module

Imagine moving money between two accounts: the withdrawal succeeds but the deposit fails. Without protection, the data is now wrong. A transaction groups several statements into one all-or-nothing unit, using BEGIN, COMMIT, and ROLLBACK, and the ACID guarantees — atomicity, consistency, isolation, and durability — explain what a database promises you.

Real systems also have many users at once. You'll learn what can go wrong when transactions overlap — dirty, non-repeatable, and phantom reads — and how isolation levels trade safety against speed. You'll also see how locking works and what causes deadlocks, where two transactions wait on each other forever.

Work through the lessons in order, then continue on to Database Design.

Lessons

6 videos
01

Relational Database ACID Transactions (Explained by Example)

Hussein Nasser walks through what a transaction is and each of the ACID properties using concrete examples.

02

Advanced SQL — Transactions Explained

A focused explanation of how transactions group statements together and why that matters for data integrity.

03

MySQL Data Transaction (COMMIT & ROLLBACK) — Explained

A hands-on MySQL demonstration of starting a transaction, then making changes permanent with COMMIT or undoing them with ROLLBACK.

04

Database Isolation Levels Explained (Dirty, Phantom, Lost Update)

Explains the problems that overlapping transactions can cause and how each isolation level prevents them.

05

Isolation Levels in a DBMS — Step-By-Step Guide — Advanced SQL

A step-by-step look at the standard isolation levels and what each one allows or prevents.

06

Database Deadlocks Easily Explained

A clear explanation of how deadlocks happen when transactions hold locks that each other needs, and why databases have to break them.