🎁 New User? Get 20% off your first purchase with code NEWUSER20 · ⚡ Instant download · 🔒 Secure checkout Register Now →
Menu

Categories

Databases Intermediate

What is Transaction?

A sequence of database operations that are treated as a single unit — either all succeed or all are rolled back.

Transactions ensure data consistency through ACID properties: Atomicity (all or nothing), Consistency (valid state transitions), Isolation (concurrent transactions don't interfere), and Durability (committed data persists).

Commands include BEGIN/START TRANSACTION, COMMIT (save changes), and ROLLBACK (undo changes). Isolation levels (READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE) balance consistency and performance.

Related Terms

Query Optimization
The process of improving database query performance through indexing, query rewriting, and schema design techniques.
Row-Level Security (RLS)
A database feature that restricts which rows a user can access in a table based on security policies.
Database Constraint
Rules enforced by the database to maintain data integrity, including NOT NULL, UNIQUE, CHECK, PRIMARY KEY, and FOREIGN KEY.
JSONB
PostgreSQL's binary JSON data type that stores JSON documents with indexing, querying, and manipulation capabilities.
Database Sharding
A horizontal scaling strategy that distributes data across multiple database servers based on a partition key.
Write-Ahead Log (WAL)
A technique where changes are first written to a log before being applied to the database, ensuring crash recovery and data integrity.
View All Databases Terms →