Re: should I be using phplib?
| From: | Manuel Lemos | Date: | Sat, 02 Sep 2000 22:51:57 +0000 |
| Subject: | Re: should I be using phplib? | ||
| References: | 1 | Groups: | php.db php.windows |
| Request: | Send a blank email to php-db+get-2591@lists.php.net to get a copy of this message | ||
Hello Vince,
On 01-Sep-00 22:02:44, you wrote:
>I'm developing a php4 application that will eventually run under both
>windoze and your favorite *NIX flavor. It will also need access to a
>database, such as Oracle 7, 8, Sybase, Informix, and M$ SQL Server.
>I do not want to hard code in my OCILogin functions in my php application,
>as I would then have to write several different versions of the app [one
>for each rdbms that i'm supposed to support].
>>From what I can gather at the phplib w3 site, phplib acts as a wrapper for
>each of the APIs that php supports [except for Informix and Sybase :( ]
>via DB_Sql [unless i'm reading this incorrectly].
>But can phplib run with php4 under both windows and *nix? And, more
>importantly, does it in fact do what I think it does? I would like to be
>able to just have to edit a line or two to let php4/phplib know which
>rdbms it should be wrapping for. There will be hundreds of SQL statements
>in this code, and the nightmare of writting each one with the different
>php database functions just sends chills up my spine. :)
If you are looking for a PHP database abstraction package that really helps
you to develop truely database independent applications, you may want to
try Metabase.
Metabase not only abstracts database access, but it also abstracts database
installation, ie, creation of databases with tables, fields, indexes and
sequences. It even goes further by freeing you from figure what statements to
execute when you want to alter your database schema without affecting data
already stored in the database.
Regarding protability, one important thing you would be glad to know is
that Metabase really abstracts database data types. This means that you don't
have to handle in your application any representation differences of the
different datatypes if you change between DBMS.
For instance, databases may represent date fields formatted in different
manners. With Metabase you only have to handle dates in the ISO 8601
format (YYYY-MM-DD). The DBMS drivers may perform any conversion if and
when necessary. Your application remains unchanged.
Most of the DBMS you mentioned are already supported or their support is in
beta testing stage right now. Beta versions are made available to the mailing
list subscribers before they are released to the public
There is a lot more to say about Metabase, but you'd better try it yourself
by downloading the package source for free here:
http://phpclasses.UpperDesign.com/browse.html/package/20
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--