Re: PEAR DB documentation?
| From: | Dean Hall | Date: | Sun, 01 Apr 2001 10:38:55 +0000 |
| Subject: | Re: PEAR DB documentation? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8088@lists.php.net to get a copy of this message | ||
"David Osborne" <David.Osborne@nottingham.ac.uk> wrote in message
news:20010329154621.F12058@unix.ccc.nottingham.ac.uk...
> Where can I find user-level documentation for the DB database
> abstraction layer in PEAR? The stuff on www.php.net pointed to from
> http://pear.php.net/ seems to be aimed at developers and
> I'm not ready
> for that yet (unless someone has saved me some work and has a working DB
> component for IngresII?)
>
> I'm not sure which database abstraction to use -- there seem to be so
> many. Which seems to be the most mature and/or popular? DB? Metabase?
> others?
>
> David
David.
The DB class in PEAR is pretty simple to use. I think there's documentation
at <http://www.phpdoc.de/pear/index2.html>.
I've used DB in the past, but since I'm writing a public-use app, I thought
I'd use metabase, since it's DBMS-independent. DB seems to be the more
traditional way of using database abstraction layers (as in Perl DBI and
such); the interface is DBMS independent -- whether the SQL you write is
DBMS-independent is another story. Metabase provides for means for making
your SQL DBMS-independent, so it's really quite another step beyond
traditional database abstraction.
However, you seem to lose /a lot/ of features of whatever DBMS you use if
you use metabase. It supports few data types (domains), and it doesn't
support specifying primary keys or references. I'm trying to see if I can
get by without them.
If you're using an abstraction layer b/c your app may need to be reused with
a different DBMS than you're currently using, metabase may be a good choice;
however, if you're guaranteed you'll always use the same DBMS, I'd use
PEAR's DB. Much simpler.
Dean.