<s>
A	O
database	B-General_Concept
transaction	I-General_Concept
symbolizes	O
a	O
unit	B-General_Concept
of	I-General_Concept
work	I-General_Concept
,	O
performed	O
within	O
a	O
database	B-Application
management	I-Application
system	I-Application
(	O
or	O
similar	O
system	O
)	O
against	O
a	O
database	O
,	O
that	O
is	O
treated	O
in	O
a	O
coherent	O
and	O
reliable	O
way	O
independent	O
of	O
other	O
transactions	O
.	O
</s>
<s>
To	O
provide	O
reliable	O
units	O
of	O
work	O
that	O
allow	O
correct	O
recovery	O
from	O
failures	O
and	O
keep	O
a	O
database	O
consistent	B-General_Concept
even	O
in	O
cases	O
of	O
system	O
failure	O
.	O
</s>
<s>
In	O
a	O
database	B-Application
management	I-Application
system	I-Application
,	O
a	O
transaction	O
is	O
a	O
single	O
unit	O
of	O
logic	O
or	O
work	O
,	O
sometimes	O
made	O
up	O
of	O
multiple	O
operations	O
.	O
</s>
<s>
Any	O
logical	O
calculation	O
done	O
in	O
a	O
consistent	B-General_Concept
mode	O
in	O
a	O
database	O
is	O
known	O
as	O
a	O
transaction	O
.	O
</s>
<s>
A	O
database	B-General_Concept
transaction	I-General_Concept
,	O
by	O
definition	O
,	O
must	O
be	O
atomic	B-General_Concept
(	O
it	O
must	O
either	O
be	O
complete	O
in	O
its	O
entirety	O
or	O
have	O
no	O
effect	O
whatsoever	O
)	O
,	O
consistent	B-General_Concept
(	O
it	O
must	O
conform	O
to	O
existing	O
constraints	O
in	O
the	O
database	O
)	O
,	O
isolated	B-General_Concept
(	O
it	O
must	O
not	O
affect	O
other	O
transactions	O
)	O
and	O
durable	B-General_Concept
(	O
it	O
must	O
get	O
written	O
to	O
persistent	O
storage	O
)	O
.	O
</s>
<s>
Database	O
practitioners	O
often	O
refer	O
to	O
these	O
properties	O
of	O
database	B-General_Concept
transactions	I-General_Concept
using	O
the	O
acronym	O
ACID	O
.	O
</s>
<s>
Databases	B-Application
and	O
other	O
data	O
stores	O
which	O
treat	O
the	O
integrity	O
of	O
data	O
as	O
paramount	O
often	O
include	O
the	O
ability	O
to	O
handle	O
transactions	O
to	O
maintain	O
the	O
integrity	O
of	O
data	O
.	O
</s>
<s>
When	O
this	O
happens	O
it	O
is	O
often	O
important	O
to	O
ensure	O
that	O
all	O
such	O
processing	O
leaves	O
the	O
database	O
or	O
data	O
store	O
in	O
a	O
consistent	B-General_Concept
state	O
.	O
</s>
<s>
By	O
treating	O
the	O
recording	O
of	O
multiple	O
entries	O
as	O
an	O
atomic	B-General_Concept
transactional	O
unit	B-General_Concept
of	I-General_Concept
work	I-General_Concept
the	O
system	O
maintains	O
the	O
integrity	O
of	O
the	O
data	O
recorded	O
.	O
</s>
<s>
A	O
transactional	O
database	O
is	O
a	O
DBMS	B-General_Concept
that	O
provides	O
the	O
ACID	B-Operating_System
properties	I-Operating_System
for	O
a	O
bracketed	O
set	O
of	O
database	O
operations	O
(	O
begin-commit	O
)	O
.	O
</s>
<s>
Transactions	O
also	O
ensure	O
that	O
the	O
effect	O
of	O
concurrent	O
transactions	O
satisfies	O
certain	O
guarantees	O
,	O
known	O
as	O
isolation	B-General_Concept
level	I-General_Concept
.	O
</s>
<s>
The	O
highest	O
isolation	B-General_Concept
level	I-General_Concept
is	O
serializability	B-Operating_System
,	O
which	O
guarantees	O
that	O
the	O
effect	O
of	O
concurrent	O
transactions	O
is	O
equivalent	O
to	O
their	O
serial	O
(	O
i.e.	O
</s>
<s>
Most	O
relational	B-Application
database	I-Application
management	I-Application
systems	I-Application
support	O
transactions	O
.	O
</s>
<s>
NoSQL	B-General_Concept
databases	B-Application
prioritize	O
scalability	O
along	O
with	O
supporting	O
transactions	O
in	O
order	O
to	O
guarantee	O
data	B-General_Concept
consistency	I-General_Concept
in	O
the	O
event	O
of	O
concurrent	O
updates	O
and	O
accesses	O
.	O
</s>
<s>
In	O
a	O
database	B-Application
system	I-Application
,	O
a	O
transaction	O
might	O
consist	O
of	O
one	O
or	O
more	O
data-manipulation	O
statements	O
and	O
queries	O
,	O
each	O
reading	O
and/or	O
writing	O
information	O
in	O
the	O
database	O
.	O
</s>
<s>
Users	O
of	O
database	B-Application
systems	I-Application
consider	O
consistency	B-General_Concept
and	O
integrity	O
of	O
data	O
as	O
highly	O
important	O
.	O
</s>
<s>
A	O
simple	O
transaction	O
is	O
usually	O
issued	O
to	O
the	O
database	B-Application
system	I-Application
in	O
a	O
language	O
like	O
SQL	B-Language
wrapped	O
in	O
a	O
transaction	O
,	O
using	O
a	O
pattern	O
similar	O
to	O
the	O
following	O
:	O
</s>
<s>
If	O
no	O
error	O
occurs	O
,	O
then	O
commit	B-Language
the	O
transaction	O
.	O
</s>
<s>
A	O
transaction	O
commit	B-Language
operation	O
persists	O
all	O
the	O
results	O
of	O
data	O
manipulations	O
within	O
the	O
scope	O
of	O
the	O
transaction	O
to	O
the	O
database	O
.	O
</s>
<s>
A	O
transaction	O
rollback	B-Application
operation	O
does	O
not	O
persist	O
the	O
partial	O
results	O
of	O
data	O
manipulations	O
within	O
the	O
scope	O
of	O
the	O
transaction	O
to	O
the	O
database	O
.	O
</s>
<s>
Internally	O
,	O
multi-user	O
databases	B-Application
store	O
and	O
process	O
transactions	O
,	O
often	O
by	O
using	O
a	O
transaction	O
ID	O
or	O
XID	O
.	O
</s>
<s>
Another	O
type	O
of	O
transaction	O
is	O
the	O
compensating	B-General_Concept
transaction	I-General_Concept
.	O
</s>
<s>
Transactions	O
are	O
available	O
in	O
most	O
SQL	B-Language
database	I-Language
implementations	O
,	O
though	O
with	O
varying	O
levels	O
of	O
robustness	O
.	O
</s>
<s>
For	O
example	O
,	O
MySQL	B-Application
began	O
supporting	O
transactions	O
from	O
early	O
version	O
3.23	O
,	O
but	O
the	O
InnoDB	B-Language
storage	O
engine	O
was	O
not	O
default	O
before	O
version	O
5.5	O
.	O
</s>
<s>
The	O
earlier	O
available	O
storage	O
engine	O
,	O
MyISAM	B-Language
does	O
not	O
support	O
transactions	O
.	O
</s>
<s>
A	O
transaction	O
is	O
typically	O
started	O
using	O
the	O
command	O
BEGIN	O
(	O
although	O
the	O
SQL	B-Language
standard	O
specifies	O
START	B-General_Concept
TRANSACTION	I-General_Concept
)	O
.	O
</s>
<s>
When	O
the	O
system	O
processes	O
a	O
COMMIT	B-Language
statement	O
,	O
the	O
transaction	O
ends	O
with	O
successful	O
completion	O
.	O
</s>
<s>
A	O
ROLLBACK	B-Application
statement	O
can	O
also	O
end	O
the	O
transaction	O
,	O
undoing	O
any	O
work	O
performed	O
since	O
BEGIN	O
.	O
</s>
<s>
If	O
autocommit	B-General_Concept
was	O
disabled	O
with	O
the	O
start	O
of	O
a	O
transaction	O
,	O
autocommit	B-General_Concept
will	O
also	O
be	O
re-enabled	O
with	O
the	O
end	O
of	O
the	O
transaction	O
.	O
</s>
<s>
One	O
can	O
set	O
the	O
isolation	B-General_Concept
level	I-General_Concept
for	O
individual	O
transactional	O
operations	O
as	O
well	O
as	O
globally	O
.	O
</s>
<s>
Relational	O
databases	B-Application
are	O
traditionally	O
composed	O
of	O
tables	O
with	O
fixed-size	O
fields	O
and	O
records	O
.	O
</s>
<s>
Object	O
databases	B-Application
comprise	O
variable-sized	O
blobs	B-General_Concept
,	O
possibly	O
serializable	B-Application
or	O
incorporating	O
a	O
mime-type	B-Application
.	O
</s>
<s>
The	O
fundamental	O
similarities	O
between	O
Relational	O
and	O
Object	O
databases	B-Application
are	O
the	O
start	O
and	O
the	O
commit	B-Language
or	O
rollback	B-Application
.	O
</s>
<s>
Once	O
the	O
transaction	O
is	O
fully	O
defined	O
,	O
changes	O
are	O
committed	O
or	O
rolled	O
back	O
atomically	B-General_Concept
,	O
such	O
that	O
at	O
the	O
end	O
of	O
the	O
transaction	O
there	O
is	O
no	O
inconsistency	B-General_Concept
.	O
</s>
<s>
Database	B-Application
systems	I-Application
implement	O
distributed	B-General_Concept
transactions	I-General_Concept
as	O
transactions	O
accessing	O
data	O
over	O
multiple	O
nodes	O
.	O
</s>
<s>
A	O
distributed	B-General_Concept
transaction	I-General_Concept
enforces	O
the	O
ACID	B-Operating_System
properties	I-Operating_System
over	O
multiple	O
nodes	O
,	O
and	O
might	O
include	O
systems	O
such	O
as	O
databases	B-Application
,	O
storage	O
managers	O
,	O
file	O
systems	O
,	O
messaging	O
systems	O
,	O
and	O
other	O
data	O
managers	O
.	O
</s>
<s>
In	O
a	O
distributed	B-General_Concept
transaction	I-General_Concept
there	O
is	O
typically	O
an	O
entity	O
coordinating	O
all	O
the	O
process	O
to	O
ensure	O
that	O
all	O
parts	O
of	O
the	O
transaction	O
are	O
applied	O
to	O
all	O
relevant	O
systems	O
.	O
</s>
<s>
The	O
Namesys	O
Reiser4	B-Application
filesystem	O
for	O
Linux	B-Application
supports	O
transactions	O
,	O
and	O
as	O
of	O
Microsoft	B-Application
Windows	I-Application
Vista	I-Application
,	O
the	O
Microsoft	O
NTFS	B-Application
filesystem	O
supports	O
distributed	B-General_Concept
transactions	I-General_Concept
across	O
networks	O
.	O
</s>
