After 3 days of research about the existing DB Abstraction Layers, I haven't decided which one I will implement in my project. (I am currently using PEAR DB). Here are some of the benchmarks I came across:
http://phplens.com/lens/adodb/#1
http://freshmeat.net/screenshots/30313/
As you can see, the PEAR DB package does not perform very well. I verified the results above by running some tests on my own computer, and I got pretty much the same results (4-5% difference at most).
I also tried PEAR's MDB package, which seemed to be an excellent abstraction with the nice support of setting up your DB-scheme with XML (you can find some info about it here: http://www.php-mag.net/itr/online_a...3&p=0&nodeid=11)
, but it adds far too much runtime execution overhead.
And the PDO extension is not compatible with PHP 4.
Maybe I should write my own abstraction class which only provides a common API? Or maybe I shouldn't worry so much about the runtime execution overhead since it maybe won't be my primarly bottleneck?
I am also curious what DB abstraction you guys use, and why you chose that abstraction layer.
Thanks
DB Abstraction
Moderator: General Moderators
I use Eclipse's database abstraction layer, mostly because the API is pretty simple. Remember, when you are looking at Database Abstraction, it's mostly a myth. Any abstraction layer that promises complete independence from the database isn't being entirely truthful. To be fair, ADOdb and PEAR don't claim 100% independence.
The common API approach is probably the best. I found it easiest to work with, as that is how the Eclipse abstraction layer works.
I will, however, have to package up my updates, as I add a number of rather useful features that make using the layer even easier.
The common API approach is probably the best. I found it easiest to work with, as that is how the Eclipse abstraction layer works.
I will, however, have to package up my updates, as I add a number of rather useful features that make using the layer even easier.
I have to agree with Jason and patrikG both on this one. Eclipse is by far the most reasonable and elegant (as well as small) while ADODB has impresssive speed in comparison to the others in spite of it's size.
The problems:
* Eclipse may not have enough for certain projects. Get hackin'!
* While ADODB is fast in the execution stage, it's slow (just like
the others) in the upfront parsing stage. Use an accellerator.
I've used both at various times and have my own approach that is influenced by my own peculiuar experience. However, both of these are good products.
Cheers,
BDKR
The problems:
* Eclipse may not have enough for certain projects. Get hackin'!
* While ADODB is fast in the execution stage, it's slow (just like
the others) in the upfront parsing stage. Use an accellerator.
I've used both at various times and have my own approach that is influenced by my own peculiuar experience. However, both of these are good products.
Cheers,
BDKR