🎁 New User? Get 20% off your first purchase with code NEWUSER20 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

Crosstab Query
A query that transforms rows into columns, creating a pivot table view of aggregated data.
Schema
The structure definition of a database including tables, columns, data types, relationships, indexes, and constraints.
Window Function
An SQL function that performs calculations across a set of rows related to the current row without collapsing the result set.
ORM (Object-Relational Mapping)
A technique that lets you interact with a database using object-oriented code instead of writing raw SQL queries.
Database Connection Pooling
A technique that maintains a cache of database connections for reuse, reducing the overhead of creating new connections.
Trigger
A database object that automatically executes a specified function when certain events (INSERT, UPDATE, DELETE) occur on a table.
View All Databases Terms →