Information about Acid



In computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction.

An example of a transaction is a transfer of funds from one account to another, even though it might consist of multiple individual operations (such as debiting one account and crediting another).

Atomicity

Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. The transfer of funds can be completed or it can fail for a multitude of reasons, but atomicity guarantees that one account won't be debited if the other is not credited as well.

Consistency

Consistency refers to the database being in a legal state when the transaction begins and when it ends. This means that a transaction cannot break the rules, or integrity constraints, of the database. If an integrity constraint states that all accounts must have a positive balance, then any transaction violating this rule will be aborted.

Isolation

Isolation refers to the ability of the application to make operations in a transaction appear isolated from all other operations. This means that no operation outside the transaction can ever see the data in an intermediate state; a bank manager can see the transferred funds on one account or the other, but never on both — even if he ran his query while the transfer was still being processed. More formally, isolation means the transaction history (or schedule) is serializable. For performance reasons, this ability is the most often relaxed constraint.

Durability

Durability refers to the guarantee that once the user has been notified of success, the transaction will persist, and not be undone. This means it will survive system failure, and that the database system has checked the integrity constraints and won't need to abort the transaction. Many databases implement durability by writing all transactions into a log that can be played back to recreate the system state right before the failure. A transaction can only be deemed committed after it is safely in the log.

Implementation

Implementing the ACID properties correctly is not simple. Processing a transaction often requires a number of small changes to be made, including updating indices that are used by the system to speed up searches. This sequence of operations is subject to failure for a number of reasons; for instance, the system may have no room left on its disk drives, or it may have used up its allocated CPU time.

ACID suggests that the database be able to perform all of these operations at once. In fact this is difficult to arrange. There are two popular families of techniques: write ahead logging and shadow paging. In both cases, locks must be acquired on all information that is updated, and depending on the implementation, on all data that is being read. In write ahead logging, atomicity is guaranteed by ensuring that information about all changes is written to a log before it is written to the database. That allows the database to return to a consistent state in the event of a crash. In shadowing, updates are applied to a copy of the database, and the new copy is activated when the transaction commits. The copy refers to unchanged parts of the old version of the database, rather than being an entire duplicate.

Until recently almost all databases relied upon locking to provide ACID capabilities. This means that a lock must always be acquired before processing data in a database, even on read operations. Maintaining a large number of locks, however, results in substantial overhead as well as hurting concurrency. If user A is running a transaction that has read a row of data that user B wants to modify, for example, user B must wait until user A's transaction is finished.

An alternative to locking is multiversion concurrency control, in which the database maintains separate copies of any data that is modified. This allows users to read data without acquiring any locks. Going back to the example of user A and user B, when user A's transaction gets to data that user B has modified, the database is able to retrieve the exact version of that data that existed when user A started their transaction. This ensures that user A gets a consistent view of the database even if other users are changing data that user A needs to read. A natural implementation of this idea results in a relaxation of the isolation property, namely snapshot isolation.

It is difficult to guarantee ACID properties in a network environment. Network connections might fail, or two users might want to use the same part of the database at the same time.

Two-phase commit is typically applied in distributed transactions to ensure that each participant in the transaction agrees on whether the transaction should be committed or not.

Care must be taken when running transactions in parallel. Two phase locking is typically applied to guarantee full isolation.

See also

References












Acids and bases:
Acid-base reaction theories
pH
Self-ionization of water
Buffer solutions
Systematic naming
Redox reactions
Electrochemistry
Acids: Bases:
An acid (often represented by the generic formula HA [H+A-]) is traditionally considered any chemical compound that, when dissolved in water, gives a solution with a pH less than 7.0. That approximates the modern definition of Johannes Nicolaus Brønsted and Martin Lowry, who independently defined an acid as a compound which donates a hydrogen ion (H+) to another compound (called a base). Common examples include acetic acid (in vinegar) and sulfuric acid (used in car batteries). Acid/base systems are different from redox reactions in that there is no change in oxidation state. Generally, acids have the following properties:
  • Taste:Acids often taste sour
  • Touch: Strong or concentrated acids often produce a stinging feeling on mucous membranes
  • Reactivity: Strong acids react aggressively with or corrode many metals
  • Electrical conductivity: Acids, while not usually ionic compounds, are electrolytes
  • Acids turn moist blue litmus paper red

Definitions

The word "acid" comes from the Latin acidus meaning "sour," but in chemistry the term acid has a more specific meaning. There are four common ways to define an acid:
  • Arrhenius: According to this definition developed by the Swedish chemist Svante Arrhenius, an acid is a substance that increases the concentration of hydronium ion (H3O+) when dissolved in water, while bases are substances that increase the concentration of hydroxide ions (OH-). This definition limits acids and bases to substances that can dissolve in water. Around 1800, many French chemists, including Antoine Lavoisier, incorrectly believed that all acids contained oxygen. Indeed the modern German word for oxygen is Sauerstoff (lit. sour substance), as is the Afrikaans word for oxygen suurstof, with the same meaning. English chemists, including Sir Humphry Davy at the same time believed all acids contained hydrogen. Arrhenius used this belief to develop this definition of acid.
  • Brønsted-Lowry: According to this definition, an acid is a proton (hydrogen nucleus) donor and a base is a proton acceptor. The acid is said to be dissociated after the proton is donated. An acid and the corresponding base are referred to as conjugate acid-base pairs. Brønsted and Lowry independently formulated this definition, which includes water-insoluble substances not in the Arrhenius definition.
  • solvent-system definition: According to this definition, an acid is a substance that, when dissolved in an autodissociating solvent, increases the concentration of the solvonium cations, such as H3O+ in water, NH4+ in liquid ammonia, NO+ in liquid N2O4, SbCl2+ in SbCl3, etc. Base is defined as the substance that increases the concentration of the solvate anions, respectively OH-, NH2-, NO3-, or SbCl4-. This definition extends acid-base reactions to nonaqueous systems and even some aprotic systems, where no hydrogen nuclei are involved in the reactions. This definition is not absolute, a compound acting as acid in one solvent may act as a base in another.
  • Lewis: According to this definition developed by Gilbert N. Lewis, an acid is an electron-pair acceptor and a base is an electron-pair donor. (These are frequently referred to as "Lewis acids" and "Lewis bases," and are electrophiles and nucleophiles, respectively, in organic chemistry; Lewis bases are also ligands in coordination chemistry.) Lewis acids include substances with no transferable protons (ie H+ hydrogen ions), such as iron(III) chloride, and hence the Lewis definition of an acid has wider application than the Brønsted-Lowry definition. The Lewis definition can also be explained with molecular orbital theory. In general, an acid can receive an electron pair in its lowest unoccupied orbital (LUMO) from the highest occupied orbital (HOMO) of a base. That is, the HOMO from the base and the LUMO from the acid combine to a bonding molecular orbital.
Although not the most general theory, the Brønsted-Lowry definition is the most widely used definition. The strength of an acid may be understood by this definition by the stability of hydronium and the solvated conjugate base upon dissociation. Increasing or decreasing stability of the conjugate base will increase or decrease the acidity of a compound. This concept of acidity is used frequently for organic acids such as carboxylic acid. The molecular orbital description, where the unfilled proton orbital overlaps with a lone pair, is connected to the Lewis definition.

Properties

Strong acids and many concentrated acids are dangerous, causing severe burns for even minor contact. They are said to be corrosive. Generally, acid burns are treated by rinsing the affected area abundantly with running water (15 minutes) and followed up with immediate medical attention. In the case of highly concentrated acids, the acid should first be wiped off as much as possible, otherwise the exothermic mixing of the acid and the water could cause severe thermal burns. Acids may also be dangerous for reasons not related to their acidity, see an appropriate MSDS for more specific information.

Bronsted-Lowry Acids:
  • Are generally sour in taste
  • Turn blue litmus red
  • Turn methyl orange red
  • Do not change the colour of a solution of phenolphthalein, a common pH indicator (remains colourless)
  • Will react with metals to produce a salt and hydrogen
  • Will react with metal carbonates to produce water, CO2 and a salt
  • Will react with a base to produce a salt and water
  • Will react with a metal oxide to produce water and a salt
  • Will conduct electricity only in aqueous solutions
  • Will produce hydronium (H3O+) ions when dissolved in aqueous media
  • Will denature proteins

Nomenclature

In the classical naming system, acids are named according to their anions. That ionic suffix is dropped and replaced with a new suffix (and sometimes prefix), according to the table below. For example, HCl has chloride as its anion, so the -ide suffix makes it take the form hydrochloric acid. In the IUPAC naming system, "aqueous" is simply added to the name of the ionic compound. Thus, for hydrogen chloride, the IUPAC name would be aqueous hydrogen chloride.

Classical naming system:
Anion Prefix Anion Suffix Acid Prefix Acid Suffix Example
perateperic acidperchloric acid (HClO4)
ateic acidchloric acid (HClO3)
iteous acidchlorous acid (HClO2)
hypoitehypoous acidhypochlorous acid (HClO)
idehydroic acidhydrochloric acid (HCl)

Chemical characteristics

In water the following equilibrium occurs between a weak acid (HA) and water, which acts as a base:

HA(aq) + H2O H3O+(aq) + A-(aq)

The acidity constant (or acid dissociation constant) is the equilibrium constant for the reaction of HA with water:



Strong acids have large Ka values (i.e. the reaction equilibrium lies far to the right; the acid is almost completely dissociated to H3O+ and A-). Strong acids include the heavier hydrohalic acids: hydrochloric acid (HCl), hydrobromic acid (HBr), and hydroiodic acid (HI). (However, hydrofluoric acid, HF, is relatively weak.) For example, the Ka value for hydrochloric acid (HCl) is 107.

Weak acids have small Ka values (i.e. at equilibrium significant amounts of HA and A exist together in solution; modest levels of H3O+ are present; the acid is only partially dissociated). For example, the Ka value for acetic acid is 1.8 x 10-5. Most organic acids are weak acids. Oxoacids, which tend to contain central atoms in high oxidation states surrounded by oxygen may be quite strong or weak. Nitric acid, sulfuric acid, and perchloric acid are all strong acids, whereas nitrous acid, sulfurous acid and hypochlorous acid are all weak.

Note on terms used:
  • The terms "hydrogen ion" and "proton" are used interchangeably; both refer to H+.
  • In aqueous solution, the water is protonated to form hydronium ion, H3O+(aq). This is often abbreviated as H+(aq) even though the symbol is not chemically correct.
  • The strength of an acid is measured by its acid dissociation constant (Ka) or equivalently its pKa (pKa= - log(Ka)).
  • The pH of a solution is a measurement of the concentration of hydronium. This will depend on the concentration and nature of acids and bases in solution.

Polyprotic acids

Polyprotic acids are able to donate more than one proton per acid molecule, in contrast to monoprotic acids that only donate one proton per molecule. Specific types of polyprotic acids have more specific names, such as diprotic acid (two potential protons to donate) and triprotic acid (three potential protons to donate).

A monoprotic acid can undergo one dissociation (sometimes called ionization) as follows and simply has one acid dissociation constant as shown above:

::::HA(aq) + H2O(l) H3O+(aq) + A(aq)         Ka


A diprotic acid (here symbolized by H2A) can undergo one or two dissociations depending on the pH. Each dissociation has its own dissociation constant, Ka1 and Ka2.

::::H2A(aq) + H2O(l) H3O+(aq) + HA(aq)       Ka1


::::HA(aq) + H2O(l) H3O+(aq) + A2−(aq)       Ka2


The first dissociation constant is typically greater than the second; i.e., Ka1 > Ka2 . For example, sulfuric acid (H2SO4) can donate one proton to form the bisulfate anion (HSO4), for which Ka1 is very large; then it can donate a second proton to form the sulfate anion (SO42−), wherein the Ka2 is intermediate strength. The large Ka1 for the first dissociation makes sulfuric a strong acid. In a similar manner, the weak unstable carbonic acid (H2CO3) can lose one proton to form bicarbonate anion (HCO3) and lose a second to form carbonate anion (CO32−). Both Ka values are small, but Ka1 > Ka2 .

A triprotic acid (H3A) can undergo one, two, or three dissociations and has three dissociation constants, where Ka1 > Ka2 > Ka3 .

::::H3A(aq) + H2O(l) H3O+(aq) + H2A(aq)        Ka1


::::H2A(aq) + H2O(l) H3O+(aq) + HA2−(aq)       Ka2


::::HA2−(aq) + H2O(l) H3O+(aq) + A3−(aq)         Ka3


An inorganic example of a triprotic acid is orthophosphoric acid (H3PO4), usually just called phosphoric acid. All three protons can be successively lost to yield H2PO4, then HPO42−, and finally PO43− , the orthophosphate ion, usually just called phosphate. An organic example of a triprotic acid is citric acid, which can successively lose three protons to finally form the citrate ion. Even though the positions of the protons on the original molecule may be equivalent, the successive Ka values will differ since it is energetically less favorable to lose a proton if the conjugate base is more negatively charged.

Neutralization

Neutralization is the reaction between an acid and a base, producing a salt and water; for example, hydrochloric acid and sodium hydroxide form sodium chloride and water:

:HCl(aq) + NaOH(aq) → H2O(l) + NaCl(aq)


Neutralization is the basis of titration, where a pH indicator shows equivalence point when the equivalent number of moles of a base have been added to an acid. It is often wrongly assumed that neutralization should result in a solution with pH 7.0, which is only the case with similar acid and base strengths during a reaction.

Weak acid/weak base equilibria

In order to lose a proton, it is necessary that the pH of the system rise above the pKa of the protonated acid. The decreased concentration of H+ in that basic solution shifts the equilibrium towards the conjugate base form (the deprotonated form of the acid). In lower-pH (more acidic) solutions, there is a high enough H+ concentration in the solution to cause the acid to remain in its protonated form, or to protonate its conjugate base (the deprotonated form).

Solutions of weak acids and salts of their conjugate bases form buffer solutions.

Applications of acids

There are numerous uses for acids. Acids are often used to remove rust and other corrosion from metals in a process known as pickling. They may be used as an electrolyte in a wet cell battery, such as sulfuric acid in a car battery. In humans and many other animals, hydrochloric acid is a part of the gastric acid secreted within the stomach to help hydrolyze proteins and polysaccharides, as well as converting the inactive pro-enzyme, pepsinogen into the enzyme, pepsin. Acids are used as catalysts; for example, sulfuric acid is used in very large quantities in the alkylation process to produce gasoline.

Common Acids

Mineral Acids

(The following three are also known as the bench acids) Other acids include:

(Misc) (Sulfonic acids)
  • Methanesulfonic acid (aka mesylic acid) (MeSO3H)
  • Ethanesulfonic acid (aka esylic acid) (EtSO3H)
  • Benzenesulfonic acid (aka besylic acid) (PhSO3H)
  • Toluenesulfonic acid (aka tosylic acid, or (C6H4(CH3)(SO3H))

References

See also

Chemistry
Environment

External links

Acid may also refer to:

In music:
  • Acid house, a subgenre of house music
  • Acid jazz, a musical genre
  • ACID Pro, an audio editor
  • Acid punk, a style of punk music
  • Acid rap, a form of psychedelic, trippy hip hop music.

..... Click the link for more information.
Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems.
..... Click the link for more information.
A database transaction is a unit of interaction with a database management system or similar system that is treated in a coherent and reliable way independent of other transactions.
..... Click the link for more information.
database is a structured collection of records or data that is stored in a computer system so that a computer program or person using a query language can consult it to answer queries. The records retrieved in answer to queries are information that can be used to make decisions.
..... Click the link for more information.
In database systems, atomicity is one of the ACID transaction properties. An atomic transaction is a series of database operations which either all occur, or all do not occur ("fail", although failure is not considered catastrophic).
..... Click the link for more information.
A database management system (DBMS) is computer software designed for the purpose of managing databases. Typical examples of DBMSs include Oracle, DB2, Microsoft Access, Microsoft SQL Server, PostgreSQL, MySQL, FileMaker and Sybase Adaptive Server Enterprise.
..... Click the link for more information.
In database systems, a consistent transaction is one that does not violate any integrity constraints during its execution. If a transaction leaves the database in an illegal state, it is aborted and an error is reported.

Consistency is one of the ACID properties.
..... Click the link for more information.
Integrity constraints are used to ensure accuracy and consistency of data in a relational database. Data integrity is handled in a relational database through the concept of referential integrity. There are many types of integrity constraints that play a role in referential integrity.
..... Click the link for more information.
In database systems, isolation is a property that the changes made by an operation are not visible to other simultaneous operations on the system until its completion. This is one of the ACID (Atomicity, Consistency, Isolation, Durability) properties.
..... Click the link for more information.
In the field of databases, a schedule is a list of actions, (i.e. reading, writing, aborting, committing), from a set of transactions.

Here is a sample schedule:



In this example, Schedule D is the set of 3 transactions T1, T2, T3.
..... Click the link for more information.
serializable, has the Serializability property, if its outcome (the resulting database state, the values of the database's data) is equal to the outcome of its transactions executed sequentially without overlapping.
..... Click the link for more information.
In database systems, durability is the ACID property that guarantees that transactions that are successfully committed will survive permanently and will not be undone by system failure.
..... Click the link for more information.
A database system or DBS is a system or software designed to manage a database, and run operations on the data requested by numerous clients. Typical examples of DBS use include accounting, human resources and customer support systems.
..... Click the link for more information.
In the field of databases in computer science, a transaction log (also database log or binary log) is a history of actions executed by a database management system to guarantee ACID properties over crashes or hardware failures.
..... Click the link for more information.
A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records.
..... Click the link for more information.
In computer science, write ahead logging (WAL) is a family of techniques for providing atomicity and durability (two of the ACID properties) in database systems.

In a system using WAL, all modifications are written to a log before they are applied to the database.
..... Click the link for more information.
In computer science, shadow paging is a technique for providing atomicity and durability (two of the ACID properties) in database systems.

A page in this context refers to a unit of physical storage (probably on a hard disk), of the order of to bytes.
..... Click the link for more information.
In computer science, a lock is a synchronization mechanism for enforcing limits on access to a resource in an environment where there are many threads of execution. Locks are one way of enforcing concurrency control policies.
..... Click the link for more information.
In computer science, in the field of databases, multiversion concurrency control (abbreviated MCC or MVCC) is a concurrency control method commonly used by database management systems to provide concurrent access to the database.
..... Click the link for more information.
In databases, snapshot isolation is a guarantee that all reads made in a transaction will see a consistent snapshot of the database, and the transaction itself will successfully commit only if no updates it has made conflict with any concurrent updates made since that snapshot.
..... Click the link for more information.
In computer networking and databases, the two-phase commit protocol is a distributed algorithm that lets all nodes in a distributed system agree to commit a transaction. The protocol results in either all nodes committing the transaction or aborting, even in the case of network
..... Click the link for more information.
A distributed transaction is an operations bundle, in which two or more network hosts are involved. Usually, hosts provide transactional resources, while the transaction manager
..... Click the link for more information.
Parallel computing is the simultaneous execution of some combination of multiple instances of programmed instructions and data on multiple processors in order to obtain results faster.
..... Click the link for more information.
In Databases and Transaction processing, Two phase locking, (2PL) is a concurrency control locking protocol, mechanism, that guarantees Serializability. It is also the name of a class (set) of transaction schedules.
..... Click the link for more information.
The Open Systems Interconnection (usually abbreviated to OSI) was an effort to standardize networking that was started in 1982 by the International Organization for Standardization (ISO), along with the ITU-T.
..... Click the link for more information.
James Nicholas "Jim" Gray

Born 1944

Nationality American
Field Computer Science
Institutions IBM
Tandem Computers
DEC
Microsoft
..... Click the link for more information.
Tandem Computers was an early manufacturer of fault tolerant computer systems, marketed to the growing number of transaction processing customers who used them for ATMs, banks, stock exchanges and other similar needs.
..... Click the link for more information.
A database management system (DBMS) is computer software designed for the purpose of managing databases. Typical examples of DBMSs include Oracle, DB2, Microsoft Access, Microsoft SQL Server, PostgreSQL, MySQL, FileMaker and Sybase Adaptive Server Enterprise.
..... Click the link for more information.
database is a structured collection of records or data that is stored in a computer system so that a computer program or person using a query language can consult it to answer queries. The records retrieved in answer to queries are information that can be used to make decisions.
..... Click the link for more information.
A data model is not just a way of structuring data: it also defines a set of operations that can be performed on the data. The relational model, for example, defines operations such as select, project, and join.
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter