federate several datasources

From: Jean-Marc Vanel (jmvanel_at_nospam.free.fr.removethis)
Date: 12/09/04


Date: Thu, 09 Dec 2004 17:53:57 +0100

Hello

I want to federate (aggregate) several physical datasources, each having
its JDBC driver.

My idea is that this aggregator could be implemented as a special JDBC
driver or Connection, that will respond to queries from the application
by dispatching to the relevant tables in each physical database, and
construct the final rowset by assembling rowsets from each physical
database.

JDBCAggregator aggregator = new JDBCAggregator();
aggregator.addConnection(db1);
aggregator.addConnection(db2);
ResultSet = aggregator.createStatement().executeQuery (
        "SELECT * from db1.client as cl, db2.order as ord " +
         "where cl.id = ord.client_id" );

where all tables from database 1 (respectively 2) get prefix db1 (resp.
db2). Or possibly no prefix if there is no ambiguity.

I'm looking for an open source project or code suggestions.

-- 
Jean-Marc Vanel
Consulting & Services / software development
OSS, Web, Java, XML ...
http://jmvanel.free.fr/ ===) CV, software resources
Computer science diary : http://jmvanel.free.fr/computer-notes.html
Worldwide Botanical Knowledge Base : http://wwbota.free.fr/
Test XML query engine: http://jmvanel.free.fr/protea.html

Quantcast