> Date: Wed, 26 Jun 2013 08:26:36 -0400
> From: a...@dancingjars.com
> To: dbi-users@perl.org
> Subject: cross database queries?
> 
> I want to write a query like:
> 
> select clients.client.client_id, columnar.sales.total_sales, 
> web.page_hits from clients, columnar, web
> where clients.client_id = columnar.client_id
> and  clients.client_id = web.client_id
> 
> in a system where 'clients' is actually one or more relational 
> databases, 'columnar' is one or columnar databases, and 'web' is the 
> Apache logs on one or more web servers.  The dbi driver would be 
> configured to connect to the correct databases and filter web hits based 
> on 'client_id'.
> 
> Has somebody written that already?
>  Yes but it depends largely on what  DB you are hitting against.  Really has 
> nothing to do with DBI. The above query would work perfectly fine in oracle 
> as long as the connection user has permission on all the schema.  Now if you 
> are asking if the above will work across one or more DBDs and different 
> Databases (oracle, files MySQL) then the answer is no. There are drivers out 
> there for example that let Oracle hit LDAP tables and do joins but that is 
> part of the Oracle DB not DBI and DBD.  DBI does not do the join it is the DB 
> that does that. DBI only issues the command Cheers John
> Thanks,
> Andrew
> 
                                          

Reply via email to