İstanbul escort bayan sivas escort samsun escort bayan sakarya escort Muğla escort Mersin escort Escort malatya Escort konya Kocaeli Escort Kayseri Escort izmir escort bayan hatay bayan escort antep Escort bayan eskişehir escort bayan erzurum escort bayan elazığ escort diyarbakır escort escort bayan Çanakkale Bursa Escort bayan Balıkesir escort aydın Escort Antalya Escort ankara bayan escort Adana Escort bayan

Saturday, May 18, 2024
HomeAcademicTransaction Control in DBMS - An introduction with examples

Transaction Control in DBMS – An introduction with examples

A transaction in a database management system (DBMS) is a piece of work done on a database. Because a transaction is an atomic unit, it can either be completed entirely or not at all. Desirable properties of Transaction in DBMS are commonly known as ACID properties.

The process known as transaction control enables you to govern how transactions affect your database. It enables you to either roll back the changes made during a transaction in the event of an error or commit the changes made during a transaction to the database.

Here I present you some examples of how transaction control is used in a DBMS:

  1. Transferring money from one bank account to another:

You can think of this as a two-step process:

  • Step 1: Deduct the money from the source account
  • Step 2: Add the money to the destination account

To make sure that the accounts remain in a consistent state, you would want to roll back the transaction if either of these stages fails.

  1. Updating a customer’s address in a database:

Consider updating a database with a customer’s address. There may be numerous tables where the address needs to be updated (e.g., the “customers” table and the “orders” table). To keep the database in a consistent state if one of the updates fails, you would want to roll back the transaction.

  1. Printing a report:

Consider printing a report that requires data queries from several different tables. You may want to roll back the transaction if the query fails for any reason in order to prevent the report from being generated with inaccurate or missing data.

These are just a few instances of how a DBMS uses transaction control.

Happy Learning!

datasagarhttp://www.DataSagar.com
The author of this blog post is a technology fellow, an IT entrepreneur, and Educator in Kathmandu Nepal. With his keen interest in Data Science and Business Intelligence, he writes on random topics occasionally in the DataSagar blog.
RELATED ARTICLES
- Advertisment -

Most Popular