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:

    A major misunderstanding of child rearing has been the idea that meeting a child’s needs is an end in itself, for the purpose of the child’s mental health. Mothers have not understood that this is but one step in social development, the goal of which is to help a child begin to consider others. As a result, they often have not considered their children but have instead allowed their children’s reality to take precedence, out of a fear of damaging them emotionally.
    Elaine Heffner (20th century)

    With the breakdown of the traditional institutions which convey values, more of the burdens and responsibility for transmitting values fall upon parental shoulders, and it is getting harder all the time both to embody the virtues we hope to teach our children and to find for ourselves the ideals and values that will give our own lives purpose and direction.
    Neil Kurshan (20th century)

    Natural selection, the blind, unconscious, automatic process which Darwin discovered, and which we now know is the explanation for the existence and apparently purposeful form of all life, has no purpose in mind. It has no mind and no mind’s eye. It does not plan for the future. It has no vision, no foresight, no sight at all. If it can be said to play the role of the watchmaker in nature, it is the blind watchmaker.
    Richard Dawkins (b. 1941)