develooper Front page | perl.dbi.dev | Postings from October 2011

Re: Database/DBD Bridging?

Thread Previous | Thread Next
From:
Tim Bunce
Date:
October 4, 2011 14:31
Subject:
Re: Database/DBD Bridging?
Message ID:
20111004213046.GF7323@timac.local
On Tue, Oct 04, 2011 at 02:20:10PM +0200, Reinier Post wrote:
> On Fri, Sep 23, 2011 at 11:19:32PM -0400, Brendan Byrd wrote:
> 
> For a start it would be nice to have a matrix up somewhere listing
> DBMSes against SQL constructs, so I can look up, for instance, against
> which types of DBD backends which SQL syntax will actually work

A quick google turned up http://www.grantondata.com/community/dbrosettastone.html
There may well be others/better/newer.

> For instance, I have a simple script that needs to count the number of
> distinct values in columns.  This seems like a pretty elementary thing
> to do, but after a lot of tweaking and tinkering I've found that
> 
>   - SELECT COUNT(DISTINCT) ... is invalid in Jet (Access MDB)
>   - SELECT COUNT(*) FROM (SELECT DISTINCT ...)) is invalid elsewhere
>   - SELECT DISTINCT ... is accepted but just does SELECT in DBD::CSV

A good ORM, like DBIx::Class, will handle most differences in SQL dialects
for you, and give you a way to include fragments of literal SQL if you
need to.

Tim.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About