From the course: MySQL Advanced Topics
Unlock this course with a free trial
Join today to access over 24,300 courses taught by industry experts.
What are transactions? - MySQL Tutorial
From the course: MySQL Advanced Topics
What are transactions?
- [Bill] Hi, I'm Bill Wyman. In database terminology, a transaction is a group of operations that are handled as one unit of work. In practice, this means that you may have many operations, and if any one operation fails, the entire group of operations is treated as failed, and the database is restored to its state before the group of operations began. For example, imagine a financial application where several tables need to be updated for a given transaction. If any of these operations fails, corresponding data in the other tables would be out of sync and invalid. By combining all of these actions into a single transaction, the state of the database will be automatically rolled back to a valid state if any of the individual operations fails. Transactions are also used to ensure that concurrent operations result in a state as if they were handled separately and sequentially. In other words, if your database is used by many clients at the same time, and they're all conducting similar…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.