Database Transaction - Purpose

Purpose

Databases and other data stores which treat the integrity of data as paramount often include the ability to handle transactions to maintain the integrity of data. A single transaction consists of one or more independent units of work, each reading and/or writing information to a database or other data store. When this happens it is often important to ensure that all such processing leaves the database or data store in a consistent state.

Examples from double-entry accounting systems often illustrate the concept of transactions. In double-entry accounting every debit requires the recording of an associated credit. If one writes a check for €100 to buy groceries, a transactional double-entry accounting system must record the following two entries to cover the single transaction:

  1. Debit €100 to Groceries Expense Account
  2. Credit €100 to Checking Account

A transactional system would make both entries pass or both entries would fail. By treating the recording of multiple entries as an atomic transactional unit of work the system maintains the integrity of the data recorded. In other words, nobody ends up with a situation in which a debit is recorded but no associated credit is recorded, or vice versa.

Read more about this topic:  Database Transaction

Famous quotes containing the word purpose:

    Let our hearts, as subtle masters do,
    Stir up their servants to an act of rage
    And after seem to chide ‘em. This shall make
    Our purpose necessary, and not envious;
    Which so appearing to the common eyes,
    We shall be called purgers, not murderers.
    William Shakespeare (1564–1616)

    Language, the machine of the poet, is best fitted for his purpose in its rudest state. Nations, like individuals, first perceive, and then abstract. They advance from particular images to general terms. Hence the vocabulary of an enlightened society is philosophical, that of a half-civilised people is poetical.
    Thomas Babington Macaulay (1800–1859)

    To me the sole hope of human salvation lies in teaching Man to regard himself as an experiment in the realization of God, to regard his hands as God’s hand, his brain as God’s brain, his purpose as God’s purpose. He must regard God as a helpless Longing, which longed him into existence by its desperate need for an executive organ.
    George Bernard Shaw (1856–1950)