<s>
The	O
Doctrine	B-Language
Project	I-Language
(	O
or	O
Doctrine	O
)	O
is	O
a	O
set	O
of	O
PHP	B-Application
libraries	O
primarily	O
focused	O
on	O
providing	O
persistence	B-Application
services	O
and	O
related	O
functionality	O
.	O
</s>
<s>
Its	O
most	O
commonly	O
known	O
projects	O
are	O
the	O
object	O
–	O
relational	O
mapper	O
(	O
ORM	B-General_Concept
)	O
and	O
the	O
database	B-Application
abstraction	I-Application
layer	I-Application
it	O
is	O
built	O
on	O
top	O
of	O
.	O
</s>
<s>
One	O
of	O
Doctrine	O
's	O
key	O
features	O
is	O
the	O
option	O
to	O
write	O
database	O
queries	B-Language
in	O
Doctrine	O
Query	B-Language
Language	O
(	O
DQL	O
)	O
,	O
an	O
object-oriented	B-Language
dialect	O
of	O
SQL	B-Language
.	O
</s>
<s>
Developers	O
of	O
two	O
major	O
PHP	B-Application
frameworks	O
,	O
Symfony	B-Language
and	O
Laminas	B-Language
have	O
official	O
out-of-the-box	O
support	O
for	O
Doctrine	O
,	O
while	O
3rd	O
party	O
Doctrine	O
packages	O
are	O
available	O
for	O
Laravel	B-Language
,	O
CodeIgniter	B-Language
and	O
others	O
.	O
</s>
<s>
Entities	O
in	O
Doctrine	O
2	O
are	O
lightweight	O
PHP	B-Application
Objects	O
that	O
contain	O
persistable	O
properties	O
.	O
</s>
<s>
Doctrine	O
1.x	O
follows	O
the	O
active	O
record	O
pattern	O
for	O
working	O
with	O
data	O
,	O
where	O
a	O
class	O
corresponds	O
with	O
a	O
database	B-Application
table	I-Application
.	O
</s>
<s>
For	O
instance	O
,	O
if	O
a	O
programmer	O
wanted	O
to	O
create	O
a	O
new	O
"	O
User	O
"	O
object	O
in	O
a	O
database	O
,	O
they	O
would	O
no	O
longer	O
need	O
to	O
write	O
SQL	B-Language
queries	B-Language
,	O
but	O
instead	O
could	O
use	O
the	O
following	O
PHP	B-Application
code	O
:	O
</s>
<s>
There	O
is	O
no	O
need	O
to	O
generate	O
or	O
maintain	O
complex	O
XML	B-Protocol
database	O
schemas	O
,	O
as	O
seen	O
in	O
many	O
other	O
frameworks	O
.	O
</s>
<s>
Another	O
key	O
feature	O
of	O
Doctrine	O
is	O
the	O
ability	O
to	O
optionally	O
write	O
database	O
queries	B-Language
in	O
an	O
OO	O
(	O
object	B-Language
oriented	I-Language
)	O
SQL	B-Language
dialect	O
called	O
DQL	O
(	O
Doctrine	O
Query	B-Language
Language	O
)	O
inspired	O
by	O
Hibernate	B-Library
's	I-Library
HQL	O
.	O
</s>
<s>
Alternately	O
,	O
the	O
class	O
(	O
in	O
Doctrine	O
1.x	O
)	O
allows	O
one	O
to	O
construct	O
queries	B-Language
through	O
a	O
fluent	O
interface	O
.	O
</s>
<s>
These	O
interfaces	O
provide	O
developers	O
with	O
powerful	O
alternatives	O
to	O
SQL	B-Language
which	O
maintain	O
flexibility	O
and	O
still	O
allow	O
for	O
switching	O
of	O
database	O
back-ends	O
,	O
without	O
requiring	O
any	O
code	O
duplication	O
.	O
</s>
<s>
Writing	O
queries	B-Language
explicitly	O
however	O
is	O
not	O
always	O
necessary	O
,	O
as	O
Doctrine	O
performs	O
joins	B-Language
and	O
fetches	O
related	O
objects	O
automatically	O
.	O
</s>
<s>
Small	O
projects	O
can	O
be	O
easily	O
constructed	O
without	O
writing	O
queries	B-Language
.	O
</s>
<s>
column	O
aggregation	O
inheritance	O
(	O
similar	O
objects	O
can	O
be	O
stored	O
in	O
one	O
database	B-Application
table	I-Application
,	O
with	O
one	O
type-column	O
specifying	O
the	O
subtype	O
of	O
the	O
particular	O
object	O
-	O
the	O
correct	O
subclass	O
is	O
always	O
returned	O
when	O
a	O
query	B-Language
is	O
done	O
)	O
;	O
</s>
<s>
a	O
caching	O
framework	O
,	O
making	O
use	O
of	O
several	O
backends	O
such	O
as	O
memcached	B-Application
,	O
SQLite	B-Language
or	O
APC	O
;	O
</s>
<s>
a	O
"	O
compile	O
"	O
function	O
to	O
combine	O
many	O
PHP	B-Application
files	O
of	O
the	O
framework	O
into	O
one	O
,	O
to	O
avoid	O
the	O
performance	O
hit	O
usually	O
incurred	O
by	O
including	O
the	O
many	O
PHP	B-Application
files	O
of	O
a	O
framework	O
.	O
</s>
<s>
Before	O
long	O
,	O
the	O
community	O
was	O
active	O
and	O
development	O
was	O
receiving	O
regular	O
contributions	O
,	O
among	O
others	O
from	O
the	O
Google	B-Application
Summer	I-Application
of	I-Application
Code	I-Application
project	O
.	O
</s>
<s>
The	O
largest	O
influences	O
have	O
been	O
the	O
Java	B-Language
ORM	B-General_Concept
solution	O
Hibernate	B-Library
and	O
the	O
ActiveRecord	O
architecture	O
used	O
in	O
Ruby	B-Application
on	I-Application
Rails	I-Application
.	O
</s>
<s>
The	O
purpose	O
of	O
the	O
Doctrine	B-Language
project	I-Language
is	O
to	O
build	O
an	O
equally	O
powerful	O
solution	O
for	O
the	O
PHP	B-Application
language	I-Application
for	O
high-load	O
websites	O
that	O
have	O
to	O
maintain	O
a	O
constant	O
flow	O
of	O
visitors	O
.	O
</s>
<s>
Doctrine	O
ORM	B-General_Concept
can	O
be	O
used	O
to	O
improve	O
the	O
performance	O
of	O
such	O
websites	O
.	O
</s>
