Patent ID: 8122008

Claim:
A method for joining tables in multiple heterogeneous distributed databases implemented by at least two data sources accessible to a federated database server over a network, said method comprising: transmitting from said federated database server a sub-command to a first of said data sources responsive to said federated database server receiving a data query; retrieving, with said federated database server, block data from said first data source related to said data query using block fetching according to said sub-command; transmitting, with said federated database server, at least a portion of said block data to a second of said data sources together with an instruction for said second data source to perform a join operation on said portion of said block data and a data table stored by said second data source related to said query; responsive to a size of non-related columns in said block data read from said first data source being larger than a size of a row pointer column, replacing columns in said block data unrelated to said join operation with a row pointer column when said block data is transmitted to said second data source; responsive to a size of non-related columns in said block data read from said first data source being smaller than said size of said row pointer column, transmitting all columns in said block data to said second data source for said join operation; and retrieving a result of said join operation with said federated database server.