Operation (computer science)

from Wikipedia, the free encyclopedia

In computer science, an operation is the smallest processing step of a transaction in a transaction system to change a database .

Example for illustration

The account management of a bank is based on a database (transaction system) and processes many thousands of requests every day: withdrawals, deposits, account setups, account closures, lending, ... (transactions) . Each of these requests in turn consists of a fixed sequence of processing steps (operations) :

Transaktion „Betrag abheben“
1.   Lies das Guthaben des Kontos.
2.   Ist das Guthaben größer als der abzuhebende Betrag, dann
3.      ziehe vom Guthaben den abzuhebenden Betrag ab,
4.      schreibe das neue Guthaben ins Saldo und
5.      beende die Transaktion,
6.   ansonsten
7.      brich die Transaktion ab.

The task of the transaction system is to process as many transactions as possible as quickly as possible without errors occurring. Although all parts of the instructions are important for account management, only those operations that influence the database are important for the transaction system - in this case:

  • reading (read) from 1,
  • the write from 4.,
  • the end (commit) from 5. and
  • the abort from 7.

Formal basics

The formal foundations of transaction systems are based on the two basic operations

  • r (x) - read , the reading of a data element x
  • w (x) - write , the assignment of a value to a data element x
  • c - commit , the completion of a transaction
  • a - abort , the cancellation of a transaction

In the case of non-static databases - i.e. those whose database can be expanded or reduced - also appear:

  • insert, the insertion of a new data element, and
  • delete, the removal of an existing data element.