[thelist] database access method comparison

Denis Brown dsbrown at cyllene.uwa.edu.au
Wed May 16 20:47:49 CDT 2001

Dear List members,

I subscribed to the list a few days ago and have seen many helpful comments 
shared so far.  I'd like to find an FAQ, though, to use as my first port of 
call for my (comparative newbie) questions.  The Evolt FAQ seems to relate 
only to Evolt itself :-(  Here's some background to my query...

I would like to set up a web interface to an SQL database.  So far I have 
PostgreSQL 7.0.3, pgsql_perl5-1.9.0, perl 5.004_05, Apache 1.3.12 with 
mod_perl running on a Debian GNU/Linux 2.1 system.  I am at the stage where 
I can get all of this to hang together to retrieve data from the database 
and display it on a browser -- okay, not so hard but it's the first time 
I've done this, okay?  :-)

While researching the various options for the Apache - to - PostgreSQL 
link, I had a choice of quite a few languages including C, Perl and 
PHP.  Each has its advantages, etc I am sure.  The linkage to the database, 
if taking the Perl route, seems to be one of several specific modules (eg. 
pgsql_per5) or the later (?) DBI / DBD scheme.  I see the advantages of the 
DBI / DBD scheme for developers who develop for several database 
environments -- change a couple of lines of code and you're done, basically.

Now my query...  What are the relevant advantages and penalties between say 
pgsql_perl and the DBI / DBD approach?  Speed of access -- DBI should be 
slower because of the extra layer of abstraction.  Module size -- again DBI 
may be larger because there are two halves to the scheme.  Ease of coding 
-- DBI may well provide an easier to understand interface?  And again, if I 
opted out of perl in favour of PHP, would I gain speed / footprint / 
ease-of-coding advantages?  I do not really have any need to operate with 
more than one database engine; PostgreSQL seems fine for my current and 
reasonable-future needs.

You can see why I think this is probably addressed in an FAQ somewhere, but 
I have not been able to find one yet :-(    Pointers please.  Many thanks 
in advance for your help.

Cheers from Oz,

More information about the thelist mailing list