<s>
H2	B-Language
is	O
a	O
relational	B-Application
database	I-Application
management	I-Application
system	I-Application
written	O
in	O
Java	B-Language
.	O
</s>
<s>
It	O
can	O
be	O
embedded	O
in	O
Java	B-Language
applications	O
or	O
run	O
in	O
client-server	O
mode	O
.	O
</s>
<s>
The	O
software	O
is	O
available	O
as	O
open	B-Application
source	I-Application
software	I-Application
Mozilla	B-License
Public	I-License
License	I-License
2.0	I-License
or	O
the	O
original	O
Eclipse	B-License
Public	I-License
License	I-License
.	O
</s>
<s>
The	O
development	O
of	O
the	O
H2	B-Language
database	O
engine	O
started	O
in	O
May	O
2004	O
,	O
and	O
first	O
published	O
in	O
December	O
2005	O
.	O
</s>
<s>
He	O
also	O
developed	O
the	O
Java	B-Language
database	O
engine	O
Hypersonic	B-Application
SQL	I-Application
.	O
</s>
<s>
In	O
2001	O
,	O
the	O
Hypersonic	B-Application
SQL	I-Application
project	O
was	O
stopped	O
,	O
and	O
the	O
HSQLDB	B-Application
Group	O
was	O
formed	O
to	O
continue	O
work	O
on	O
the	O
Hypersonic	B-Application
SQL	I-Application
code	O
.	O
</s>
<s>
The	O
name	O
H2	B-Language
stands	O
for	O
Hypersonic	O
2	O
,	O
however	O
H2	B-Language
Does	O
not	O
share	O
code	O
with	O
Hypersonic	B-Application
SQL	I-Application
or	O
HSQLDB	B-Application
.	O
</s>
<s>
H2	B-Language
is	O
built	O
from	O
scratch	O
.	O
</s>
<s>
A	O
subset	O
of	O
the	O
SQL	B-Language
(	O
Structured	B-Language
Query	I-Language
Language	I-Language
)	O
standard	O
is	O
supported	O
.	O
</s>
<s>
The	O
main	O
programming	O
APIs	O
are	O
SQL	B-Language
and	O
JDBC	B-Language
,	O
however	O
the	O
database	O
also	O
supports	O
using	O
the	O
PostgreSQL	B-Application
ODBC	B-Application
driver	O
by	O
acting	O
like	O
a	O
PostgreSQL	B-Application
server	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
create	O
both	O
in-memory	B-General_Concept
tables	O
,	O
as	O
well	O
as	O
disk-based	O
tables	O
.	O
</s>
<s>
Index	O
types	O
are	O
hash	O
table	O
and	O
tree	O
for	O
in-memory	B-General_Concept
tables	O
,	O
and	O
b-tree	B-Architecture
for	O
disk-based	O
tables	O
.	O
</s>
<s>
All	O
data	O
manipulation	O
operations	O
are	O
transactional	B-General_Concept
.	O
</s>
<s>
Table	O
level	O
locking	O
and	O
multiversion	B-Operating_System
concurrency	I-Operating_System
control	I-Operating_System
are	O
implemented	O
.	O
</s>
<s>
The	O
2-phase	B-General_Concept
commit	I-General_Concept
protocol	O
is	O
supported	O
as	O
well	O
,	O
but	O
no	O
standard	O
API	O
for	O
distributed	O
transactions	O
is	O
implemented	O
.	O
</s>
<s>
The	O
security	O
features	O
of	O
the	O
database	O
are	O
:	O
role	O
based	O
access	O
rights	O
,	O
encryption	O
of	O
the	O
password	O
using	O
SHA-256	B-Algorithm
and	O
data	O
using	O
the	O
AES	B-Algorithm
or	O
the	O
Tiny	O
Encryption	O
Algorithm	O
,	O
XTEA	B-Algorithm
.	O
</s>
<s>
SSL	B-Protocol
/	O
TLS	B-Protocol
connections	O
are	O
supported	O
in	O
the	O
client-server	O
mode	O
,	O
as	O
well	O
as	O
when	O
using	O
the	O
console	O
application	O
.	O
</s>
<s>
The	O
database	O
supports	O
protection	O
against	O
SQL	B-Language
injection	I-Language
by	O
enforcing	O
the	O
use	O
of	O
parameterized	O
statements	O
.	O
</s>
<s>
In	O
H2	B-Language
,	O
this	O
feature	O
is	O
called	O
'	O
disabling	O
literals	O
 '	O
.	O
</s>
<s>
Two	O
full	B-Application
text	I-Application
search	I-Application
implementations	O
are	O
included	O
,	O
a	O
native	O
implementation	O
and	O
one	O
using	O
Lucene	B-Language
.	O
</s>
<s>
Since	O
version	O
1.1.111	O
,	O
H2	B-Language
in-memory	B-General_Concept
database	I-General_Concept
can	O
run	O
inside	O
the	O
Google	B-Application
App	I-Application
Engine	I-Application
.	O
</s>
<s>
The	O
H2	B-Language
documentation	O
explains	O
in	O
detail	O
several	O
ways	O
in	O
which	O
problems	O
in	O
underlying	O
hardware	O
and	O
in	O
particular	O
power	O
systems	O
can	O
impact	O
durability	B-General_Concept
of	O
relational	O
databases	O
.	O
</s>
<s>
According	O
to	O
the	O
H2	B-Language
documentation	O
,	O
such	O
problems	O
are	O
related	O
not	O
only	O
to	O
the	O
DB	O
engine	O
design	O
,	O
but	O
also	O
to	O
the	O
storage	O
caching	O
mechanism	O
.	O
</s>
<s>
Administrators	O
have	O
then	O
to	O
assess	O
the	O
common	O
trade	O
off	O
between	O
speed	O
and	O
data	B-General_Concept
loss	I-General_Concept
risks	O
in	O
the	O
context	O
of	O
the	O
business	O
requirements	O
and	O
must	O
carefully	O
consider	O
the	O
design	O
of	O
the	O
power	O
supply	O
and	O
UPS	O
of	O
critical	O
servers	O
.	O
</s>
<s>
It	O
is	O
possible	O
in	O
some	O
cases	O
to	O
force	O
the	O
storage	O
to	O
write	O
cache	O
frequently	O
or	O
even	O
immediately	O
using	O
fsync	B-Language
which	O
slows	O
the	O
writing	O
process	O
or	O
one	O
can	O
accept	O
that	O
caching	O
in	O
the	O
device	O
buffer	O
introduces	O
some	O
risk	O
of	O
data	B-General_Concept
loss	I-General_Concept
in	O
case	O
of	O
power	O
failure	O
.	O
</s>
<s>
The	O
effectiveness	O
of	O
using	O
fsync	B-Language
is	O
limited	O
by	O
the	O
fact	O
that	O
many	O
HDD	O
have	O
write	B-Device
caching	I-Device
enabled	O
by	O
factory	O
default	O
in	O
which	O
case	O
there	O
is	O
nothing	O
about	O
the	O
design	O
or	O
settings	O
of	O
the	O
database	O
nor	O
OS	O
level	O
commands	O
that	O
will	O
be	O
able	O
to	O
eliminate	O
the	O
chance	O
of	O
lost	O
or	O
inconsistent	O
data	O
in	O
the	O
event	O
of	O
a	O
sudden	O
power	O
failure	O
.	O
</s>
<s>
The	O
H2	B-Language
documentation	O
makes	O
an	O
effort	O
to	O
describe	O
in	O
detail	O
potential	O
problems	O
with	O
durability	B-General_Concept
(	O
part	O
of	O
ACID	O
)	O
resulting	O
from	O
the	O
potential	O
data	B-General_Concept
loss	I-General_Concept
of	O
committed	B-General_Concept
transactions	I-General_Concept
in	O
case	O
of	O
a	O
power	O
failure	O
.	O
</s>
<s>
Considering	O
the	O
hardware	O
limitations	O
regarding	O
preservation	O
of	O
data	O
in	O
the	O
event	O
of	O
sudden	O
power	O
loss	O
and	O
the	O
ineffectiveness	O
of	O
approaches	O
commonly	O
employed	O
by	O
developers	O
to	O
prevent	O
these	O
sorts	O
of	O
losses	O
,	O
many	O
database	O
engines	O
do	O
not	O
by	O
default	O
call	O
FileDescriptor.sync( )	O
nor	O
FileChannel.force( )	O
nor	O
fsync	B-Language
or	O
equivalents	O
for	O
every	O
commit	O
because	O
they	O
significantly	O
degrade	O
system	O
performance	O
without	O
significantly	O
increasing	O
durability	B-General_Concept
.	O
</s>
<s>
HSQLDB	B-Application
documentation	O
references	O
workarounds	O
to	O
a	O
similar	O
set	O
of	O
issues	O
in	O
their	O
documentation	O
.	O
</s>
<s>
The	O
Microsoft	O
Knowledge	O
Base	O
describes	O
the	O
impact	O
these	O
issues	O
,	O
power	O
failures	O
,	O
write	B-Device
caching	I-Device
,	O
etc	O
.	O
</s>
<s>
can	O
have	O
on	O
performance	O
and	O
durability	B-General_Concept
.	O
</s>
<s>
The	O
knowledge	O
base	O
discusses	O
the	O
trade	O
offs	O
between	O
performance	O
and	O
the	O
vulnerability	O
of	O
disk	O
write	B-Device
caching	I-Device
as	O
well	O
as	O
settings	O
that	O
an	O
administrator	O
can	O
use	O
to	O
balance	O
these	O
.	O
</s>
<s>
An	O
embedded	O
web	B-Application
server	I-Application
with	O
a	O
browser	O
based	O
console	O
application	O
is	O
included	O
,	O
as	O
well	O
as	O
command	O
line	O
tools	O
to	O
start	O
and	O
stop	O
a	O
server	O
,	O
backup	O
and	O
restore	O
databases	O
,	O
and	O
a	O
command	O
line	O
shell	O
tool	O
.	O
</s>
