Tuesday, 27 September 2005

PHP database interfaces: PDO or PDBC?

In a comment to my posting on MySQL 5.0 getting bug free, Lukas Smith wants MySQL to promote PDO.

I had a chat with Georg Richter about this. He tells me he is working on a PDBC ("JDBC for PHP") specification and prototype which allows people

a) to write database independent programs
b) to migrate easily from or to other applications (e.g. Java)
c) write powerful applications
d) to reuse existing code written in Java or C++.

Georg's goal for the upcoming OSDBCON (and PHP Conference) is to find some people from other OS DB projects which like the idea and would like to contribute to PDBC.

So, if you want to be involved in PDBC, talk to Georg at the OS DB Conference 8-9 November 2005 in Frankfurt (where I will also give a presentation on "10 Years of MySQL: Building a Commercial Open Source Software Company").

3 comments:

  1. Hermann van der Loy28 September 2005 at 01:08

    From my personal experience in 2 of my projects where I tried to use PDO, I don't see any benefit of using PDO. I don't have to deal with different function names (which is sometimes a pita), but all the differences between the various RDBMS we have to support is still in my code. That makes it hard to maintain.
    PDBC (I assume it's a JDBC pendant) implemented in PHP would cover most of the problems in one function call ( JDBC 3.0 specs cover mostly everything!), and it would be much more userfriendly.

    Rewriting an existing PHP application in PDBC might be a lot of work, but for new projects it would be really cool.

    ReplyDelete
  2. PDO was always planned as a thin layer as a first step. The idea was that higher level things could be build ontop of PDO. I originally planned to move over PEAR::MDB2 (which features alot of portability features like datatype abstraction, schema reading and management etc.) over to the PDO API to make it possible to provide PDO based drivers while remaining compatible with PHP4. However the work involved in making the necessary changes were just too large so once I finish up MDB2 its time to start a PDO based alternative .. be it in userland or be it in C.

    ReplyDelete
  3. While on the subject of MySQL php APIs. A blog post of mine (http://pooteeweet.org/blog/243) that got syndicated on planetmysql and planetphp about LOB support in mysqli went unanswered. I think this gives some indication of the level of adoption.

    ReplyDelete