RE: [PHP-DB] PEAR and DB abstraction layer (was: PHPLIB)

From: Date: Wed, 28 Jun 2000 18:07:21 +0000
Subject: RE: [PHP-DB] PEAR and DB abstraction layer (was: PHPLIB)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-702@lists.php.net to get a copy of this message
At 12:50 PM 6/28/00 -0500, Ted Knudson wrote:
I do not understand why someone would want to use a DB abstraction layer? It looks like it would just be more code that I would have to learn. I am using PHP and MySQL. What advantage would using phpDB (as an example) be to me?
I am not familiar with phpDB, but the advantage of using a database abstraction layer is that you only have to learn one interface to be able to work with multiple types of databases. In theory, this allows you to change the databases without having to change code. However, this is not completely true. If you have a DAL that supports mSQL and Oracle, it is unlikely that your database abstraction layer will allow you to use transactions with mSQL. :) Also, if your DAL does not support the version of the database that you wish to use, you may have to rework the code for DAL.
If I add a DB abstraction layer wouldn't it increase overhead and slow down the server?
AFAIK A good abstraction layer should not significantly increase overhead. HTH, Zak Greant Creative Director Nucleus Information Service Inc. "A camel is a horse designed by a committee." - Alex Issigonis (Designer of the Mini)

« previous php.db (#702) next »