<s>
In	O
the	O
field	O
of	O
databases	B-Application
in	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
transaction	B-General_Concept
log	I-General_Concept
(	O
also	O
transaction	B-General_Concept
journal	I-General_Concept
,	O
database	B-General_Concept
log	I-General_Concept
,	O
binary	B-General_Concept
log	I-General_Concept
or	O
audit	O
trail	O
)	O
is	O
a	O
history	O
of	O
actions	O
executed	O
by	O
a	O
database	B-Application
management	I-Application
system	I-Application
used	O
to	O
guarantee	O
ACID	O
properties	O
over	O
crashes	B-General_Concept
or	O
hardware	O
failures	O
.	O
</s>
<s>
Physically	O
,	O
a	O
log	O
is	O
a	O
file	B-Operating_System
listing	O
changes	O
to	O
the	O
database	O
,	O
stored	O
in	O
a	O
stable	O
storage	O
format	O
.	O
</s>
<s>
If	O
,	O
after	O
a	O
start	O
,	O
the	O
database	O
is	O
found	O
in	O
an	O
inconsistent	B-General_Concept
state	O
or	O
not	O
been	O
shut	O
down	O
properly	O
,	O
the	O
database	B-Application
management	I-Application
system	I-Application
reviews	O
the	O
database	B-General_Concept
logs	I-General_Concept
for	O
uncommitted	B-Language
transactions	O
and	O
rolls	B-Application
back	I-Application
the	O
changes	O
made	O
by	O
these	O
transactions	O
.	O
</s>
<s>
Both	O
are	O
done	O
to	O
ensure	O
atomicity	B-General_Concept
and	O
durability	B-General_Concept
of	O
transactions	O
.	O
</s>
<s>
This	O
term	O
is	O
not	O
to	O
be	O
confused	O
with	O
other	O
,	O
human-readable	O
logs	B-Application
that	O
a	O
database	B-Application
management	I-Application
system	I-Application
usually	O
provides	O
.	O
</s>
<s>
In	O
database	B-Application
management	I-Application
systems	I-Application
,	O
a	O
journal	O
is	O
the	O
record	O
of	O
data	O
altered	O
by	O
a	O
given	O
process	O
.	O
</s>
<s>
A	O
database	B-General_Concept
log	I-General_Concept
record	O
is	O
made	O
up	O
of	O
:	O
</s>
<s>
Log	B-General_Concept
Sequence	I-General_Concept
Number	I-General_Concept
(	O
LSN	O
)	O
:	O
A	O
unique	O
ID	O
for	O
a	O
log	O
record	O
.	O
</s>
<s>
With	O
LSNs	O
,	O
logs	B-Application
can	O
be	O
recovered	O
in	O
constant	O
time	O
.	O
</s>
<s>
Most	O
LSNs	O
are	O
assigned	O
in	O
monotonically	O
increasing	O
order	O
,	O
which	O
is	O
useful	O
in	O
recovery	O
algorithms	O
,	O
like	O
ARIES	B-Algorithm
.	O
</s>
<s>
This	O
implies	O
database	B-General_Concept
logs	I-General_Concept
are	O
constructed	O
in	O
linked	B-Data_Structure
list	I-Data_Structure
form	O
.	O
</s>
<s>
Transaction	B-General_Concept
ID	O
number	O
:	O
A	O
reference	O
to	O
the	O
database	B-General_Concept
transaction	I-General_Concept
generating	O
the	O
log	O
record	O
.	O
</s>
<s>
Type	O
:	O
Describes	O
the	O
type	O
of	O
database	B-General_Concept
log	I-General_Concept
record	O
.	O
</s>
<s>
Some	O
databases	B-Application
may	O
have	O
logs	B-Application
which	O
include	O
one	O
or	O
both	O
images	O
.	O
</s>
<s>
Compensation	O
Log	O
Record	O
(	O
CLR	O
)	O
notes	O
the	O
rollback	B-Application
of	O
a	O
particular	O
change	O
to	O
the	O
database	O
.	O
</s>
<s>
undoNextLSN	O
:	O
This	O
field	O
contains	O
the	O
LSN	O
of	O
the	O
next	O
log	O
record	O
that	O
is	O
to	O
be	O
undone	O
for	O
transaction	B-General_Concept
that	O
wrote	O
the	O
last	O
Update	O
Log	O
.	O
</s>
<s>
Commit	O
Record	O
notes	O
a	O
decision	O
to	O
commit	O
a	O
transaction	B-General_Concept
.	O
</s>
<s>
Abort	O
Record	O
notes	O
a	O
decision	O
to	O
abort	O
and	O
hence	O
roll	O
back	O
a	O
transaction	B-General_Concept
.	O
</s>
<s>
If	O
all	O
dirty	O
pages	O
are	O
flushed	O
while	O
creating	O
the	O
checkpoint	O
(	O
as	O
in	O
PostgreSQL	B-Application
)	O
,	O
it	O
might	O
contain	O
:	O
</s>
<s>
undoLSN	O
:	O
This	O
is	O
a	O
reference	O
to	O
the	O
oldest	O
log	O
record	O
of	O
the	O
oldest	O
in-progress	O
transaction	B-General_Concept
.	O
</s>
<s>
Completion	O
Record	O
notes	O
that	O
all	O
work	O
has	O
been	O
done	O
for	O
this	O
particular	O
transaction	B-General_Concept
.	O
</s>
