Hello, Chris Bailey wrote: > > PEAR is another db abstraction layer, and potentially will be integrated > into PHP. I use it for all my DB access (in PHP) now. In fact, I'd say > it's more powerful and easier than using the mysql_ methods for example.
PEAR is essencially a Perl DBI clone, so it inherits its design limitations. For instance, since Perl only supports string and integer scalars, Perl DBI assumes that every field is either an integer or a text value. This is a bad design decision because for instance, date fields may be handled as text values, but each DBMS formats date in text eventually in different ways. So, if you have to deal with date fields in your Perl-DBI, and consequently, PEAR-DB database applications, those applications will not be portable because you will still have to handle the eventual differences of format representation on the application side because the Perl-DBI/PEAR-DB will not do it for you. Metabase handles that in an elegant way. The applications only see dates formatted in a standard way: ISO 9601 (YYYY-MM-DD). If necessary, Metabase will convert date values back and forth the database. That works for all other datatypes: integer, text, boolean, date, time, timestamp, float, decimal and even LOBs (Large Object fields). The way I see it, using a database abstraction layer in your applications is only useful for developing database independent applications. If your abstraction layer does not provide full database abstraction, you'd better dump it and use the native database API functions because you will end with a non-portable application anyway, and at least using the native API functions you don't have to put up with the overhead that abstraction layers add top your applications. > PEAR uses the standard factory design pattern to determine which DB it's I am not sure what you mean by standard factory design so I don't know what is that good for. > talking to, etc. I have not looked at Metabase so can't comment on that. You should. Metabase has been developing for the last 3 years. It is very mature and since it was first release publically, its API did not change in a backwards incompatible way. You may rely on it. It has even more wonderful features that I have not mentioned and no other database abstraction package provides, not for PHP, nor for anything else (not even Java - JDBC). Go ahead, the URL is still below. :-) Regards, Manuel Lemos > > -----Original Message----- > From: Manuel Lemos [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 16, 2001 8:09 AM > To: [EMAIL PROTECTED]; Pat Hanna > Subject: [PHP] Re: PHP versus all other languages > > Hello, > > Pat Hanna wrote: > > > > I'm doing my senior exit project on database languages online. I'm asking > > for help from anyone who can provide any information on the comparison > > between the different languages. I'm comparing languages such as PHP, ASP, > > ColdFussion, perl and any others that I might not know about that you guys > > might know. Thank you to anyone who helps me out in the least. > > If you are going to compare languages for database programming, you may > want to get to know Metabase which is a PHP database abstraction layer > that enables you to develop database independent applications so that > you can use the same application code with any of the supported DBMS > with having to change anything. > > http://phpclasses.UpperDesign.com/browse.html/package/20 > > Regards, > Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]