Re: Aggregating multiple databases

[prev] [thread] [next] [Date index for 2004/11/09]

From: Terrence Brannon
Subject: Re: Aggregating multiple databases
Date: 10:49 on 09 Nov 2004
Bowen Dwelle wrote:
> Simon Cozens wrote:
> 

>>
>>I'm guessing I may well have to write Songbee::Song to inherit from an
>>aggregator class that collects data from multiple Song classes generated on
>>the fly with Class::DBI::Loader, but that's as far as I can get. Can anyone
>>think of how this might be achieved?
> 
> 
> Couldn't you use Class::DBI::View and a SQL UNION?
> 
>    __PACKAGE__->setup_view(<<SQL);
>      SELECT id, title, etc
>      FROM songs_english
>      UNION
>      SELECT id, title, etc
>      FROM songs_japanese
>      etc...
>    SQL
> 

forgive the basic SQL question, but what happens to the result set when an id in 
songs_english == an id in songs_japanese?


        -- 
        Terrence Brannon, terry@xxxxx.xxx

Aggregating multiple databases
Simon Cozens 07:22 on 16 Oct 2004

Re: Aggregating multiple databases
Y00R0B0T 14:58 on 17 Oct 2004

Re: Aggregating multiple databases
Simon Cozens 18:00 on 17 Oct 2004

Re: Aggregating multiple databases
Tim Bunce 08:37 on 18 Oct 2004

Re: Aggregating multiple databases
Bowen Dwelle 19:14 on 17 Oct 2004

Re: Aggregating multiple databases
Terrence Brannon 10:49 on 09 Nov 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52