Redundancy in PHP DB drivers

Once upon a time PHP had several different DB drivers such as:

  • mysql
  • pgsql
  • mssql
  • oci
  • sqlite
  • odbc
  • informix
  • firebird

Later came

  • mysqli
  • oci8

and we already had duplicated drivers (also if they have some different optimizations/features)

Later came PDO and we had

  • pdo_mysql
  • pdo_pgsql
  • pdo_mssql
  • pdo_oci
  • pdo_oci8
  • pdo_sqlite
  • pdo_odbc
  • pdo_informix
  • pdo_firebird

so now we have 4 drivers only for oracle (oci, oci8, pdo_oci, pdo_oci8) and 3 for mysql (mysql, mysqli, pdo_mysql) and anyway every driver is at least duplicated.

I don’t think this is the right way to go on, if PDO is here to remain, first all bugs in pdo should be solved and PDO features should reflect the single driver feature (I wrote about about that yesterday), then old drivers should be removed. Duplicated oci/oci8 driver should be unified too.

Now the situation is confusing and it’s difficult to test things against different drivers, tracking and solving bugs.

4 thoughts on “Redundancy in PHP DB drivers

  1. cj

    First there was ‘ora’, the original Oracle extension. It has been “removed” and is no longer shipped with PHP 5.

    Then came ‘oci8’, which was refactored for PHP 5.1.2. (Anyone using oci8 with any PHP 4.x should update to the latest oci8 code from PECL or pecl4win).

    Then came PDO_OCI. On Windows PDO_OCI is prebuilt as php_pdo_oci.dll for users with Oracle 10g client libraries, and as php_pdo_oci8.dll for users with Oracle 8 or 9 libraries. Both DLLs have the same functionality.

    See http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf

    So you actually only have two Oracle drivers.

  2. Fabrizio Balliano

    @cj: same funcitonality but also same code? and anyway 4 names (or the doc is wrong)… 4 names for 2 things is confusing and the obsolete ones should be removed IMHO.

  3. Fabrizio Balliano

    @Mariano: :-))) ma non dovevi essere in ferie tu? che ci fai connesso!? :))

Leave a Reply

Your email address will not be published. Required fields are marked *