Transactions - what is it? Database transaction

A transaction is a set of specific actions that are performed by a user or program to access or modify a database. Before you understand the transaction - what it is, you need to understand the essence of this process. The main point of the process is that actions must be either completely completed or canceled.

Each database transaction must translate it from one state that is consistent to another. It is assumed that in the process, consistency may be violated.

Many people wonder, transactions - what is it. This is a unit of work that is performed in the database. It can be part of a general algorithm, a separate command, or a program as a whole.

unable to complete transaction




How should the transaction end?

There are two ways to complete it:

  • , , , (commit).
  • , , . , . "" (roll back). , . , , .
    transactions what is it




, begin transaction, commit, roll back.





ACID, , :

  • Atomic, . – , , .
  • Coordination, . , .
  • Insulativity, . , , . , , .
  • Duration, . , , . .

. , – . . .

database transaction




:

  • . , .
  • . . , . - , . , . , .
  • . , . .

. . , .





, . , . , , . , .

, . .

cancel transaction




:

  • ;
  • , ;
  • ;
  • .
    transaction error




?

, . , , . , , , .

transaction lock




When calculating in stores on a means of payment, customers think: transactions - what is it and what are they for? Operations with a bank card, such as cash withdrawals, deposits or transfers, are called a transaction. This concept is also used in payment card transactions at retail outlets.

Making a payment by credit card, not every client thinks about what processes are happening at this time. Although this knowledge is quite important, since it is about money and its security.

So, transactions - what is it when calculating in a store? This operation consists of several stages that are interconnected.

– (), , (), . , . , . .

, -. . , . .

, . , .

. , , , .

: ? , .




All Articles