Database

Transaction

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

In Depth

A database transaction is a logical unit of work consisting of one or more operations (reads, inserts, updates, deletes) that are executed as an indivisible whole. Transactions follow ACID properties: they are Atomic (all-or-nothing), Consistent (maintain data integrity), Isolated (concurrent transactions don't interfere), and Durable (committed changes persist). Transactions begin with BEGIN or START TRANSACTION, and end with COMMIT (save changes) or ROLLBACK (undo changes). Savepoints allow partial rollbacks within a transaction. Transaction isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable) control how concurrent transactions interact, balancing consistency against performance.

How AI for Database Helps

AI for Database generates read-only queries by default, ensuring your data is never accidentally modified during analysis.

Related Terms

Ready to try AI for Database?

Query your database in plain English. No SQL required. Start free today.