Professional Web Applications Themes

[PHP-DEV] differences in the RDBMS ext API's - PHP Development

Hi, [Ard] > First of all, in my opinion it would be more useful to concentrate on a > true cross-database PHP-level data-object API which can really hide > the differences between db implementations, instead of using the exact > same function names, and ignoring the implementation differences > between the various systems. I'd rather implement buffered queries at the > PHP-level for all extensions instead of for Interbase only. I just skim the php-dev list nowadays, but this seems a bit like what the dbx extension does (I wrote that). Now I know dbx is just a lightweight wrapper ...

  1. #1

    Default RE: [PHP-DEV] differences in the RDBMS ext API's


    Hi,

    [Ard]
    > First of all, in my opinion it would be more useful to concentrate on a
    > true cross-database PHP-level data-object API which can really hide
    > the differences between db implementations, instead of using the exact
    > same function names, and ignoring the implementation differences
    > between the various systems. I'd rather implement buffered queries at the
    > PHP-level for all extensions instead of for Interbase only.
    I just skim the php-dev list nowadays, but this seems a bit like what the
    dbx extension does (I wrote that). Now I know dbx is just a lightweight
    wrapper that doesn't try to emulate specific functionality, and it may still
    need some more wrapper functions (like commit/rollback and parameter
    binding) and support for more databases and a better efficiency, but one
    thing it does is provide a common api and common behaviour for all supported
    databases (no, Interbase is not among them, but feel free... :-)

    It does return buffered resultsets for all queries (except when the
    unbuffered flag is set). It also includes a testset that you can use with
    any of the supported databases. There are now only very few quirks between
    databases.

    I've used it in production with MySQL, ODBC (MS Access really) and Oracle,
    where I develop in MySQL and deploy in any other: the only modification I
    must make before deployment is the dbx_connect call: it must specify the
    correct parameters. Note that you should take care to make your
    SQL-statements portable too.

    Anyway, this plug has gone on too long now... :-)

    Cheerio, Marc.

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Marc Boeren Guest

  2. #2

    Default RE: [PHP-DEV] differences in the RDBMS ext API's


    Hi,
    > IMO there are some problems with the dbx extension:
    >
    > - it is a wrapper for PHP modules instead for the underlying
    > database API (therefore slower)
    True, but this makes for a lot less build-headaches: dbx has no
    build-dependencies
    > - you cannot rely on it if you depend on an ISP that does not support
    > this extension
    True for any non-standard extension (however, for this case I usually make a
    simple, pure-php wrapper with the dbx_function names mapped directly to the
    database). I would like to see more ISPs include dbx of course, and since it
    builds without any dependencies and has just a small footprint it should be
    really easy to do.
    > - it does not include a C API that would be useful for custom PHP
    > modules to access a database
    I have successfully used the dbx extension from within another
    (C++)-extension, perhaps not as clean as I would have with an API, but ok.
    > - it does not include an OOP API
    OOP-ish :-)
    > My dream is a "full featured" SQL extension completely replacing all
    > other database modules, fast, flexible, build-in by default,
    > recommended to be the best way to access databases in PHP.
    Yeah, I would have liked that too ;-). I do like the way this is solved in
    Python with its DB-API, however they have great namespace/module
    resolution...
    > Just my two cents....
    Appreciated.

    Cheerio, Marc.

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Marc Boeren Guest

Similar Threads

  1. [PHP-DEV] differences in the RDBMS ext API's
    By Lukas Smith in forum PHP Development
    Replies: 3
    Last Post: September 14th, 02:29 AM
  2. RDBMS
    By lak25 in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: August 26th, 09:45 PM
  3. [PHP-DEV] differences in the RDBMS ext API's
    By Lukas Smith in forum PHP Development
    Replies: 1
    Last Post: September 30th, 04:46 PM
  4. [Fwd: [PHP-DEV] differences in the RDBMS ext API's]
    By Manfred Stienstra in forum PHP Development
    Replies: 0
    Last Post: September 25th, 10:37 AM
  5. [PHP-DEV] differences in the RDBMS ext API's
    By Ard Biesheuvel in forum PHP Development
    Replies: 0
    Last Post: September 25th, 09:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139