[Gllug] wikis
Pete Ryland
pdr at accucard.com
Thu Oct 9 13:24:59 UTC 2003
On Thu, Oct 09, 2003 at 02:07:26PM +0100, Richard Jones wrote:
> On Thu, Oct 09, 2003 at 12:50:26PM +0100, itsbruce at uklinux.net wrote:
> > Off on a slight tangent, I'm really get pissed off by people writing
> > applications that only work with one database backend when there's no
> > bloody excuse.
>
> Shurely this will all be resolved when everyone moves to the One True
> Database (ie. PostgreSQL) :-?
>
> But seriously, I did once write a significant sized application which
> worked equally well against Informix and PostgreSQL, and it was a
> significant amount of work. I ended up implementing a whole set of
> PostgreSQL stored procedures which emulated the peculiarities of
> Informix (horrible database BTW). This was using the Perl DBI which
> certainly *doesn't* isolate you from details of the databases.
>
> That's why I tend nowadays to write stuff which works against
> PostgreSQL only.
I totally agree. The simple fact that mysql (which I assume is being
referred to) has trouble with all manner of *standard* queries (like
sub-queries) should not hinder one's design IMHO. If I have to write code
that implements even the relatively simple sql:
update blah where blah in (select blah)
by wrapping it in code, something like:
r = do("select blah")
foreach id in r
do("update blah where id=blah")
then it will be dog slow on *all* databases. No database abstraction layer
will deal with that. So calling it "immature database wars" is not
necessarily very accurate - it's more complicated than that.
And besides, if everyone coded their queries to the lowest common
denominator[*] then mysql wins, since it is almost always the LCM and is
very efficient because of that! ;-)
Pete
[*] or, rather, the HCF, for the purists/pedants.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list