[TYPO3-dev] ADOdb vc PDO
Ries van Twisk
typo3 at rvt.dds.nl
Fri May 8 14:09:28 CEST 2009
Jigal,
it's been a long time I looked into AdoDB docs but...
AdoDB tries to solve some cross database access issues in a generic way,
much like what PDO tries to solve. Both are not trying to solve
changing yout queries to something generic.
For example with AdoDB and PDO this work sin MySQL 'SELECT 1 || 1;',
that query
will fail on mosrt, if not all other database systems || is in SQL not
a valid OR operator.
PDO and AdoDB don't try to solve this differences.
1) AdoDB was there way before PDO, keep that in mind.
2) PDO is not fully stable yet and not well field tested!
3) AdoDB does have some utils to store schema's in XML, so they can be
transparently
4) PDO cannot be found on a lot of PHP installations yet
5) PDO will properly be a bit fatser then AdoDB because AdoDB is
written in PHP itself, I think PDO can send prepared statements to the
server and AdoDB does that work 'in house' (as far as I know, may be
that is changed).
6) Note for 5) AdoDB is also available as a PHP extension.... I never
tried it
7) AdoDB also has Active Record... PDO has none of that
Properly there are some more differences, and it wouldn't surprise me
that AdoDB can also use PDO nowdays.
Both system do serve a different purpose so what is better really
depends on your project.
Ries
> Hi!
>
> Can someone explain what is so great about ADOdb compared to PDO? I've
> spend some time reading the documentation, but almost everything was
> already covered by PDO IIRC. The only disadvantage of PDO was the fact
> that the Oracle driver was marked experimental and ADOdb had a few
> (yet
> still very few) query building functions.
>
> If ADOdb had extensive database independent query building
> capabilities it
> would've been a super abstraction layer. Now I'm a bit uncertain
> about its
> advantages.
>
> Please enlighten me :-)
>
> N.B. In the distant past I've used my own lazy-programmers-MySQL-
> class and
> after the first signs of PDO in PHP5 I wrote a PHP4 version of it
> (MySQL
> only, because it was the only db I had to use). I've never felt the
> need
> for ADOdb...
>
> --
> Jigal van Hemert.
More information about the TYPO3-dev
mailing list