<s>
Database	B-Application
testing	I-Application
usually	O
consists	O
of	O
a	O
layered	O
process	O
,	O
including	O
the	O
user	B-Application
interface	I-Application
(	O
UI	O
)	O
layer	O
,	O
the	O
business	O
layer	O
,	O
the	O
data	O
access	O
layer	O
and	O
the	O
database	O
itself	O
.	O
</s>
<s>
The	O
UI	O
layer	O
deals	O
with	O
the	O
interface	O
design	O
of	O
the	O
database	O
,	O
while	O
the	O
business	O
layer	O
includes	O
databases	B-Application
supporting	O
business	O
strategies	O
.	O
</s>
<s>
Databases	B-Application
,	O
the	O
collection	O
of	O
interconnected	O
files	O
on	O
a	O
server	O
,	O
storing	O
information	O
,	O
may	O
not	O
deal	O
with	O
the	O
same	O
type	O
of	O
data	O
,	O
i.e.	O
</s>
<s>
databases	B-Application
may	O
be	O
heterogeneous	B-General_Concept
.	O
</s>
<s>
As	O
a	O
result	O
,	O
many	O
kinds	O
of	O
implementation	O
and	O
integration	O
errors	B-Error_Name
may	O
occur	O
in	O
large	O
database	B-Application
systems	I-Application
,	O
which	O
negatively	O
affect	O
the	O
system	O
's	O
performance	O
,	O
reliability	O
,	O
consistency	O
and	O
security	O
.	O
</s>
<s>
Thus	O
,	O
it	O
is	O
important	O
to	O
test	O
in	O
order	O
to	O
obtain	O
a	O
database	B-Application
system	I-Application
which	O
satisfies	O
the	O
ACID	O
properties	O
(	O
Atomicity	O
,	O
Consistency	O
,	O
Isolation	O
,	O
and	O
Durability	O
)	O
of	O
a	O
database	B-Application
management	I-Application
system	I-Application
.	O
</s>
<s>
One	O
of	O
the	O
most	O
critical	O
layers	O
is	O
the	O
data	O
access	O
layer	O
,	O
which	O
deals	O
with	O
databases	B-Application
directly	O
during	O
the	O
communication	O
process	O
.	O
</s>
<s>
Database	B-Application
testing	I-Application
mainly	O
takes	O
place	O
at	O
this	O
layer	O
and	O
involves	O
testing	O
strategies	O
such	O
as	O
quality	O
control	O
and	O
quality	O
assurance	O
of	O
the	O
product	O
databases	B-Application
.	O
</s>
<s>
Testing	O
at	O
these	O
different	O
layers	O
is	O
frequently	O
used	O
to	O
maintain	O
consistency	O
of	O
database	B-Application
systems	I-Application
,	O
most	O
commonly	O
seen	O
in	O
the	O
following	O
examples	O
:	O
</s>
<s>
Companies	O
such	O
as	O
Google	B-Application
or	O
Symantec	O
,	O
who	O
are	O
associated	O
with	O
data	B-General_Concept
storage	I-General_Concept
,	O
need	O
to	O
have	O
a	O
durable	O
and	O
consistent	O
database	B-Application
system	I-Application
.	O
</s>
<s>
If	O
database	O
operations	O
such	O
as	O
insert	B-Language
,	I-Language
delete	I-Language
,	I-Language
and	I-Language
update	I-Language
are	O
performed	O
without	O
testing	O
the	O
database	O
for	O
consistency	O
first	O
,	O
the	O
company	O
risks	O
a	O
crash	O
of	O
the	O
entire	O
system	O
.	O
</s>
<s>
Some	O
companies	O
have	O
different	O
types	O
of	O
databases	B-Application
,	O
and	O
also	O
different	O
goals	O
and	O
missions	O
.	O
</s>
<s>
In	O
order	O
to	O
achieve	O
a	O
level	O
of	O
functionality	O
to	O
meet	O
said	O
goals	O
,	O
they	O
need	O
to	O
test	O
their	O
database	B-Application
system	I-Application
.	O
</s>
<s>
The	O
current	O
approach	O
of	O
testing	O
may	O
not	O
be	O
sufficient	O
in	O
which	O
developers	O
formally	O
test	O
the	O
databases	B-Application
.	O
</s>
<s>
A	O
separate	O
database	B-Application
testing	I-Application
team	O
seems	O
advisable	O
.	O
</s>
<s>
Database	B-Application
testing	I-Application
mainly	O
deals	O
with	O
finding	O
errors	B-Error_Name
in	O
the	O
databases	B-Application
so	O
as	O
to	O
eliminate	O
them	O
.	O
</s>
<s>
Database	B-Application
testing	I-Application
should	O
be	O
distinguished	O
from	O
strategies	O
to	O
deal	O
with	O
other	O
problems	O
such	O
as	O
database	O
crashes	O
,	O
broken	O
insertions	O
,	O
deletions	O
or	O
updates	O
.	O
</s>
<s>
Here	O
,	O
database	B-General_Concept
refactoring	I-General_Concept
is	O
an	O
evolutionary	O
technique	O
that	O
may	O
apply	O
.	O
</s>
<s>
The	O
figure	O
indicates	O
the	O
areas	O
of	O
testing	O
involved	O
during	O
different	O
database	B-Application
testing	I-Application
methods	O
,	O
such	O
as	O
black-box	O
testing	O
and	O
white-box	O
testing	O
.	O
</s>
<s>
Also	O
,	O
certain	O
errors	B-Error_Name
cannot	O
be	O
detected	O
.	O
</s>
<s>
It	O
involves	O
the	O
testing	O
of	O
database	O
triggers	O
and	O
logical	O
views	O
which	O
are	O
going	O
to	O
support	O
database	B-General_Concept
refactoring	I-General_Concept
.	O
</s>
<s>
It	O
performs	O
module	O
testing	O
of	O
database	O
functions	O
,	O
triggers	O
,	O
views	O
,	O
SQL	B-Language
queries	O
etc	O
.	O
</s>
<s>
It	O
checks	O
rules	O
of	O
Referential	B-General_Concept
integrity	I-General_Concept
.	O
</s>
<s>
The	O
main	O
advantage	O
of	O
white	O
box	O
testing	O
in	O
database	B-Application
testing	I-Application
is	O
that	O
coding	O
errors	B-Error_Name
are	O
detected	O
,	O
so	O
internal	O
bugs	B-Error_Name
in	O
the	O
database	O
can	O
be	O
eliminated	O
.	O
</s>
<s>
The	O
limitation	O
of	O
white	O
box	O
testing	O
is	O
that	O
SQL	B-Language
statements	O
are	O
not	O
covered	O
.	O
</s>
<s>
While	O
generating	O
test	O
cases	O
for	O
database	B-Application
testing	I-Application
,	O
the	O
semantics	O
of	O
SQL	B-Language
statement	O
need	O
to	O
be	O
reflected	O
in	O
the	O
test	O
cases	O
.	O
</s>
<s>
As	O
shown	O
in	O
the	O
figure	O
,	O
SQL	B-Language
statements	O
are	O
independently	O
converted	O
into	O
GPL	O
statements	O
,	O
followed	O
by	O
traditional	O
white	O
box	O
testing	O
to	O
generate	O
test	O
cases	O
which	O
include	O
SQL	B-Language
semantics	O
.	O
</s>
<s>
For	O
successful	O
database	B-Application
testing	I-Application
the	O
following	O
workflow	O
executed	O
by	O
each	O
single	O
test	O
is	O
commonly	O
executed	O
:	O
</s>
<s>
Set	O
up	O
Fixture	O
:	O
A	O
tool	O
like	O
PHPUnit	B-Language
will	O
then	O
iterate	O
over	O
fixtures	O
and	O
do	O
insertions	O
into	O
the	O
database	O
.	O
</s>
<s>
SQL	B-Language
Query	O
Analyzer	O
is	O
a	O
helpful	O
tool	O
when	O
using	O
Microsoft	B-Application
SQL	I-Application
Server	I-Application
.	O
</s>
<s>
The	O
design	O
of	O
forms	O
for	O
automated	O
database	B-Application
testing	I-Application
,	O
form	O
front-end	O
and	O
back-end	O
,	O
is	O
helpful	O
to	O
database	O
maintenance	O
workers	O
.	O
</s>
<s>
Workers	O
check	O
the	O
compatibility	O
between	O
source	O
database	O
and	O
destination	O
database	O
using	O
the	O
DTS	B-General_Concept
package	I-General_Concept
.	O
</s>
<s>
In	O
database	B-Application
testing	I-Application
,	O
issues	O
such	O
as	O
atomicity	O
,	O
consistency	O
,	O
isolation	O
,	O
durability	O
,	O
integrity	O
,	O
execution	O
of	O
triggers	O
,	O
and	O
recovery	O
are	O
often	O
considered	O
.	O
</s>
<s>
The	O
setup	O
for	O
database	B-Application
testing	I-Application
is	O
costly	O
and	O
complex	O
to	O
maintain	O
because	O
database	B-Application
systems	I-Application
are	O
constantly	O
changing	O
with	O
expected	O
insert	O
,	O
delete	O
and	O
update	O
operations	O
.	O
</s>
<s>
An	O
SQL	B-Language
generator	O
is	O
needed	O
to	O
transform	O
SQL	B-Language
statements	O
in	O
order	O
to	O
include	O
the	O
SQL	B-Language
semantic	O
into	O
database	O
test	O
cases	O
.	O
</s>
