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:
- Debit €100 to Groceries Expense Account
- 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:
“As the purpose of comedy is to correct the vices of men, I see no reason why anyone should be exempt.”
—Molière [Jean Baptiste Poquelin] (16221673)
“Man, her last work, who seemed so fair,
Such splendid purpose in his eyes,
Who rolled the psalm to wintry skies,
Who built him fanes of fruitless prayer,
Who trusted God was love indeed
And love Creations final law
Though Nature, red in tooth and claw
With ravine, shrieked against his creed”
—Alfred Tennyson (18091892)
“I envy neither the heart nor the head of any legislator who has been born to an inheritance of privileges, who has behind him ages of education, dominion, civilization, and Christianity, if he stands opposed to the passage of a national education bill, whose purpose is to secure education to the children of those who were born under the shadow of institutions which made it a crime to read.”
—Frances Ellen Watkins Harper (18251911)