Re: abstraction for databases
| From: | Manuel Lemos | Date: | Sun, 26 Nov 2000 22:54:28 +0000 |
| Subject: | Re: abstraction for databases | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27283@lists.php.net to get a copy of this message | ||
Hello Paul,
On 21-Nov-00 10:39:02, you wrote:
>> For instance, if you want to handle fields with dates, unlike Metabase,
>> those other packages do not guarantee that the date values always go
>> formatted in the same standard: ISO 8601 (YYYY-MM-DD). With Metabase you
>> can definitely write database independent applications.
>I like the idea of metabase, but it misses some vital functions. For
>example, what about references? Transactions?
Transactions, of course. References, I'm not sure what you mean. Could
those be sequences?
>Then there is the code...the code is to damned packed for me to bother,
>I haven't had the time to make it adhere to something I'm comfortable to
>read.
You don't need to understand the inner workings as long as the API provides
the features you want to use. Metabase supports an awful amount of databases
and that may make it has a lot of code, but most files are classes that
are drivers for each of the supported databases.
>I'd love to use Metabase, but since I can't support references, I'm at
>square one. (Hey, I happen to like them.)
Maybe it does, but with some other name.
>A question, PEAR, which I've heard of, do you know if it just wraps
>functions into a standard layer, or does it provide more in the way of
>Metabase?
AFAIK, PEAR only to be as good as Perl DBI, which is known to be not such a
great deal. Perl DBI does not assure portability of your applications. For
instance if you have to deal of date fields, unlike Metabase, Perl DBI does
not assure that dates come always formatted in a standard way, which for
Metabase is ISO 8601 (YYYY-MM-DD).
Besides Metabase has unique features that are important for Web
development, like abstracting the generation of sequential unique numbers
(sequences or auto-increment values) or better, returning only a limited
range of rows from a select query, like with MySQL LIMIT clause but in a
portable way that works with all supported databases.
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
--