Re: MDB2 API

From: Date: Tue, 25 May 2004 14:22:31 +0000
Subject: Re: MDB2 API
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29634@lists.php.net to get a copy of this message
Lukas Smith wrote:
just letting you all know that there may still be changes in the MDB2 API. I wasnt expecting pdo (a php5 only unified API for RDBMS) to mature so quickly. I also didnt expect the API to diverge so much from previous PHP API's.
There was been some confusion about the exact relation between PDO and PEAR's database abstraction layers. In terms of abstraction PDO only provides a subset of what PEAR::DB is currently offering. If you ask the developers they will not call it a database abstraction layer but instead call it a wrapper around the native API's. It was also never the intent for PDO to become an abstraction layer. It was however always the intent that a PEAR package takes over this job (this is why the people who started PDO invited me to join them in the development process). Therefore MDB2 will not become obsolete with the release of PDO. 80% of DB will be obselete with PDO. That is as long as you use PHP 5(.1). However PDO will become the defacto standard for RDBMS API's in PHP5 eventually. For this reason my plan is to make the MDB2 API an extension of the PDO API. This means that people can easily move from PDO to MDB2 (and back) if they need certain features or dont need these features anymore. Internally MDB2 will provide a separate set of PDO based drivers for each of the supported RDBMS structred as follows (XXX denotes the name of the given RDBMS): MDB2_Driver_pXXX extends MDB2_Driver_pdo extends MDB2_Driver_Common The old drivers will remain as is: MDB2_Driver_XXX extends MDB2_Driver_Common This will provide an easy migration path from PHP4 to PHP5. It will also mean that we still have stable drivers while PDO still matures (its early alpha at this point). The advantage of the PDO drivers will be drastically better performance for a fair number of tasks. It will also mean that the drivers based on PDO will be far simpler to write. Eventually there will be another MDB version which will move the code from the MDB2_Driver_pdo into MDB2_Driver_Common. This will be a PHP5 only package. (Please also note that I would still prefer that MDB2 becomes DBv2, but I havent heard a definitive answer from the DB developers yet). regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.dev (#29634) next »