From the course: CompTIA Data Systems (DSO-001) Cert Prep

Unlock this course with a free trial

Join today to access over 24,000 courses taught by industry experts.

Transactions and the ACID model

Transactions and the ACID model

- [Instructor] Database transactions are sequences of one or more SQL statements that need to execute together as a single unit. Every SQL statement must succeed within a transaction or the entire transaction fails. If any statement within a transaction fails, the entire transaction is reverted or rolled back to its original state. Rolling a transaction back means that the database undoes any changes made by the SQL statements within the transaction. You can work with transactions by using a language called, Transaction Control Language, or TCL. The most commonly used TCL commands are begin transaction, which starts a new transaction, commit, which saves the changes made by the statements in the current transaction and ends the transaction. Rollback, which undoes the changes made by the statements in the current transaction and ends the transaction, and save point, which establishes a marker within an ongoing transaction, allowing for a partial rollback to this marker instead of…

Contents