Automated data conversion and route tracking in distributed databases
AssigneeInternational Business Machines Corporation
InventorAdrian Lee
Life of this patent
Estimating the term…
Abstract
A determination is made as to whether a data type associated with a received logical table definition associated with a database query within a distributed database system differs from a data type associated with a local logical table definition. A data conversion is performed on data retrieved from a locally-stored physical table referenced by the local logical table definition in response to determining that the data types differ. Local data conversion information is created identifying the data conversion performed on the retrieved data in response to performing the data conversion. At least one of the retrieved data and the converted data with the created local data conversion information is forwarded to at least one of a distributed database node and an application-level module.
Claims20
A method, comprising:
- receiving, by a local sub-system from a remote sub-system of a distributed database system, over a communication network and from a requestor, a database query that comprises as received (i) a query select statement to be performed locally by the local sub-system, and (ii) a remote logical table definition that comprises remote logical table element names and element data type formatting of a remote logical table defined at the remote sub-system;
- parsing the database query to determine logical table definition data indicative of the remote logical table element names and element data type formatting of the remote logical table definition;
- determining, by use of the received remote logical table element names and element data type formatting, whether a data type associated with element(s) of the remote logical table definition received within the database query and requested by the received query select statement differs from a data type associated with element(s) of a local logical table definition that comprises matching logical table element names;
- performing a data conversion on data retrieved from a locally-stored physical table referenced by the local logical table definition in response to determining that the data type associated with the requested element(s) of the remote logical table definition differs from the data type associated with the element(s) of the local logical table definition that comprises the matching logical table element names;
- creating local data conversion information identifying the data conversion performed on the retrieved data in response to performing the data conversion;
- and
- forwarding at least one of the retrieved data and the converted data with the created local data conversion information to at least one of a distributed database node and an application-level module.
A system, comprising:
- a memory adapted to store data conversion and route tracking information;
- and
- a processor programmed to:
- receive, at a local sub-system from a remote sub-system of a distributed database system, over a communication network and from a requestor, a database query that comprises as received (i) a query select statement to be performed locally by the local sub-system, and (ii) a remote logical table definition that comprises remote logical table element names and element data type formatting of a remote logical table defined at the remote sub-system;
- parse the database query to determine logical table definition data indicative of the remote logical table element names and element data type formatting of the remote logical table definition;
- determine, by use of the received remote logical table element names and element data type formatting, whether a data type associated with element(s) of the remote logical table definition received within the database query and requested by the received query select statement differs from a data type associated with element(s) of a local logical table definition that comprises matching logical table element names;
- perform a data conversion on data retrieved from a locally-stored physical table referenced by the local logical table definition in response to determining that the data type associated with the requested element(s) of the remote logical table definition differs from the data type associated with the element(s) of the local logical table definition that comprises the matching logical table element names;
- create local data conversion information identifying the data conversion performed on the retrieved data in response to performing the data conversion;
- store the local data conversion information to the memory;
- and
- forward at least one of the retrieved data and the converted data with the created local data conversion information to at least one of a distributed database node and an application-level module.
A method, comprising:
- receiving, by a local sub-system of a distributed database system, a local table definition defining a local table of data, the local table definition including information indicative of:
- (i) a plurality of local table element names, and (ii) for each local table element name of the plurality of local table element names, a respectively corresponding data type;
- receiving, by the local sub-system, from a remote requestor sub-system of the distributed database system, a database query that includes:
- (1) a query select statement including information indicative of requested data from the local table of data, and (2) a remote requestor table definition including information indicative of:
- (a) a plurality of remote requestor table element names, and (b) for each remote requestor table element name of the plurality of remote requestor table element names, a respectively corresponding data type;
- determining that a first remote requestor table element name, included in the query select statement, corresponds to a first local table element name;
- retrieving raw query response data from the local table of data, with the raw query response data being data that is responsive to the query select statement, and with the raw query response data including raw first element data corresponding to the first local table element name;
- determining that a data type corresponding to the first local table element name does not match a data type corresponding to the first remote requestor table element name;
- and
- responsive to the determination that the data type corresponding to the first local table element name does not match the data type corresponding to the first remote requestor table element name, converting the raw first element data, having the data type corresponding to first local table element name, to converted first element data, having the data type corresponding to the first remote requestor table element name.
Dependencies are inferred from the claim text.