Integrating databases
First Claim
1. A system comprising:
- one or more machine readable media encoded with,a first virtual table corresponding to a first data;
a second virtual table corresponding to a second data;
a common table that is associated with the first and second virtual tables;
a list with information about associations between the first and second virtual tables and the common table;
a generating section that,accesses the list to determine the common table is associated with the first virtual table and the second virtual table,rewrites a received database query, which indicates the common table, to generate a first rewritten database query to indicate the first virtual table instead of the common table and to generate a second rewritten database query to indicate the second virtual table instead of the common table, andgenerates a plurality of access plans that include at least a first access plan for the first rewritten database query and at least a second access plan for the second rewritten database query, wherein each of the plurality of access plans are for either the first rewritten database query or the second rewritten database query;
a selecting section that selects one of the plurality of access plans generated by the generating section;
a storing section that caches the plurality of access plans generated by the generating section;
a managing section that,in response to being notified that the first data has become unavailable, disables those of a plurality of access plans generated for the first rewritten database query, andin response to being notified that the first data has become available, enables those of the plurality of access plans generated for the first rewritten database query; and
a monitoring section that,monitors whether or not the first and second data are available,once the first data has become unavailable, notifies the managing section that the first data has become unavailable, andonce the first data has become available, notifies the manage section that the first data has become available.
1 Assignment
0 Petitions
Accused Products
Abstract
A system for integrating databases comprises a first virtual table, a second virtual table, a common table, a list, a generating section, and a selecting section. The first virtual table corresponds to a first data. The second virtual table corresponds to a second data. The common table is associated with the first and second virtual tables. The list indicates information about associations between the first and second virtual tables and the common table. The generating section generates two or more access plans from a database query on the common table. The two or more access plans involve at least one of the first and second virtual tables in accordance with the list. The selecting section selects one of the two or more access plans generated by the generating section to be used to execute the database query.
44 Citations
12 Claims
-
1. A system comprising:
-
one or more machine readable media encoded with, a first virtual table corresponding to a first data; a second virtual table corresponding to a second data; a common table that is associated with the first and second virtual tables; a list with information about associations between the first and second virtual tables and the common table; a generating section that, accesses the list to determine the common table is associated with the first virtual table and the second virtual table, rewrites a received database query, which indicates the common table, to generate a first rewritten database query to indicate the first virtual table instead of the common table and to generate a second rewritten database query to indicate the second virtual table instead of the common table, and generates a plurality of access plans that include at least a first access plan for the first rewritten database query and at least a second access plan for the second rewritten database query, wherein each of the plurality of access plans are for either the first rewritten database query or the second rewritten database query; a selecting section that selects one of the plurality of access plans generated by the generating section; a storing section that caches the plurality of access plans generated by the generating section; a managing section that, in response to being notified that the first data has become unavailable, disables those of a plurality of access plans generated for the first rewritten database query, and in response to being notified that the first data has become available, enables those of the plurality of access plans generated for the first rewritten database query; and a monitoring section that, monitors whether or not the first and second data are available, once the first data has become unavailable, notifies the managing section that the first data has become unavailable, and once the first data has become available, notifies the manage section that the first data has become available. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method comprising:
-
receiving a query for a federated database, wherein the query indicates a common table at a federated database system that manages the federated database; using a dependency list to determine that a first virtual table and a second virtual table are associated with the common table and to determine names of the first virtual table and the second virtual table; writing a first rewrite of the query to indicate the first virtual table instead of the common table; generating a first access plan based on the first rewrite of the query; writing a second rewrite of the query to indicate the second virtual table instead of the common table; generating a second access plan based on the second rewrite of the query; estimating a first cost of the first access plan; estimating a second cost of the second access plan; storing the first and second access plans along with the first and second costs; selecting either the first access plan or the second access plan to execute the received query, wherein the first virtual table references a first actual table on a first database system and the second virtual table references a second actual table on a second database system maintaining a status of the first and the second access plans, wherein the status of the first access plan corresponds to status of first database system and status of the second access plan corresponds to status of the second database system; and setting status of the first access plan to disabled if the status of the first database system is unavailable. - View Dependent Claims (9, 10)
-
-
11. A program product encoded in one or more machine-readable media, which when executed by a machine causes the machine to perform operations that comprise:
-
receiving a query for a federated database, wherein the query indicates a common table at a federated database system that manages the federated database; using a dependency list to determine that a first virtual table and a second virtual table are associated with the common table and to determine names of the first virtual table and the second virtual table; writing a first rewrite of the query to indicate the first virtual table instead of the common table; generating a first access plan based on the first rewrite of the query; writing a second rewrite of the query for the second virtual table; generating a second access plan based on the second rewrite of the query; estimating a first cost of the first access plan; estimating a second cost of the second access plan; storing the first and second access plans along with the first and second costs; selecting either the first access plan or the second access plan to execute the received query maintaining a status of the first and the second access plans, wherein the status of the first access plan corresponds to status of first database system and status of the second access plan corresponds to status of the second database system; and setting status of the first access plan to disabled if the status of the first database system is unavailable. - View Dependent Claims (12)
-
Specification