Study for the SQL Basics Test. Improve your knowledge with multiple choice questions and detailed explanations. Prepare effectively to master SQL concepts!

Multiple Choice

Which property ensures that a transaction is fully completed or fully rolled back?

Atomicity means that a transaction is all-or-nothing: either every operation within the transaction is applied and the transaction commits, or none are applied and the system rolls back to the previous state. This guarantees that a partially completed operation can't leave the database in an inconsistent state. For example, in a money-transfer scenario, either both the debit and the credit happen, or neither happens. The other properties handle different concerns—Consistency ensures rules and constraints stay valid, Isolation prevents interactions between concurrent transactions from causing confusion, and Durability ensures that once a transaction commits, its changes survive crashes. But atomicity is the one that guarantees the whole transaction completes or is completely undone.

Atomicity means that a transaction is all-or-nothing: either every operation within the transaction is applied and the transaction commits, or none are applied and the system rolls back to the previous state. This guarantees that a partially completed operation can't leave the database in an inconsistent state. For example, in a money-transfer scenario, either both the debit and the credit happen, or neither happens. The other properties handle different concerns—Consistency ensures rules and constraints stay valid, Isolation prevents interactions between concurrent transactions from causing confusion, and Durability ensures that once a transaction commits, its changes survive crashes. But atomicity is the one that guarantees the whole transaction completes or is completely undone.