IP Library Granted Patent US 9,411,851
Granted Patent B2
US 9,411,851 · App. 13/872,967 · Granted Aug 9, 2016

Database-independent mechanism for retrieving relational data as XML

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,411,851
App. No.
13/872,967
Granted
Aug 9, 2016
Kind
B2
Abstract

Techniques are disclosed for retrieving both data stored in relational form and data stored in XML form responsive to a single XQuery query. The techniques allow applications to retrieve relational data residing in various relational database management systems by using XQuery and XQuery for Java. In one such embodiment, an embeddable serverless computer component implements the techniques, and includes a combination of one or more relational adaptors and a mediator to access relational data and transform it into appropriate XML. The techniques are embeddable, and can be standards-based, database-independent, and operating-system independent. Optimized performance and scalability from desktop to enterprise applications are enabled as the number of users and/or database size increases.

Claims (65)

1. A computer-implemented method comprising:

receiving, by a processor, an XQuery query from a Java application via an XQuery API for Java (XQJ), the Java application attempting to access a relational data source having a relational data model;

generating, by the processor, XML results responsive to the XQuery query and based on data from the relational data source by:

dividing the XQuery query into one or more XQuery expressions;

determining for the one or more XQuery expressions whether an XML data source or the relational data source is being queried, the one or more XQuery expressions including a first XQuery expression querying the relational data source;

determining that the first XQuery expression cannot be translated into one or more relational queries for the relational data source and equivalent to the first XQuery expression;

retrieving, by an XQuery engine having a first data model incompatible with the relational data model, the relational data from the relational data source; and

executing, in the XQuery engine, the first XQuery expression using the retrieved relational data to generate, at least in part, the XML results responsive to the XQuery query and based on the relational data retrieved from the relational data source, the XML results responsive to the XQuery query and based on data from the relational data source generated without one or more relational queries equivalent to the first XQuery expression; and

sending the XML results to the Java application via the XQJ.

2. The method of claim 1 , wherein generating the XML results responsive to the XQuery query further comprises combining results from multiple data sources.

3. The method of claim 1 , wherein in response to relational data source queries, generating the XML results comprises:

translating the XQuery query into an SQL query;

querying the relational data source with the SQL query;

receiving one or more SQL query results; and

mapping the one or more SQL query results into XML.

4. The method of claim 1 , wherein in response to XML data source queries, generating the XML results comprises:

querying the XML data source with the XQuery query; and

receiving one or more XML XQuery query results.

5. The method of claim 1 , further comprising:

combining the XML results generated from multiple sources.

6. The method of claim 1 , further comprising:

performing comparisons using value comparison operators.

7. The method of claim 1 , further comprising:

caching a number of executed queries for reuse.

8. The method of claim 1 , wherein generating the XML, results responsive to the XQuery query comprises retrieving both data stored in relational form and data stored in XML form responsive to a single XQuery query.

9. The method of claim 1 , further comprising:

processing the XQuery query using an XQPreparedExpression to create a prepared query, the XQuery query prepared once and available for multiple executions; and

caching the prepared query in a query pool for reuse.

10. A non-transitory machine-readable storage medium having machine-executable instructions, that when executed by a processor, cause the processor to carry out a process comprising:

receiving an XQuery query from a Java application via an XQuery API for Java (XQJ), the Java application attempting to access a relational data source having a relational data model;

generating XML results responsive to the XQuery query and based on data from the relational data source by:

dividing the XQuery query into one or more XQuery expressions;

determining for the one or more XQuery expressions whether an XML data source or the relational data source is being queried, the one or more XQuery expressions including a first XQuery expression querying the relational data source;

determining that the first XQuery expression cannot be translated into one or more relational queries for the relational data source, and equivalent to the first XQuery expression;

retrieving, by an XQuery engine having a first data model incompatible with the relational data model, the relational data from the relational data source; and

executing, in the XQuery engine, the first XQuery expression using the retrieved relational data to generate, at least in part, the XML, results responsive to the XQuery query and based on the relational data retrieved from the relational data source, the XML results responsive to the XQuery query and based on data from the relational data source generated without one or more relational queries equivalent to the first XQuery expression; and

sending the XML results to the Java application via the XQJ.

11. The non-transitory machine-readable storage medium of claim 10 , wherein generating the XML results responsive to the XQuery query further comprises combining results from multiple data sources.

12. The non-transitory machine-readable storage medium of claim 10 , wherein in response to relational data source queries, generating the XML results comprises:

translating the XQuery query into an SQL query;

querying the relational data source with the SQL query;

receiving one or more SQL query results; and

mapping the one or more SQL query results into XML.

13. The non-transitory machine-readable storage medium of claim 10 , wherein in response to XML data source queries, generating the XML results comprises:

querying the XML data source with the XQuery query; and

receiving one or more XML XQuery query results.

14. The non-transitory machine-readable storage medium of claim 10 , wherein the process further comprises:

combining the XML, results generated from multiple sources.

15. The non-transitory machine-readable storage medium of claim 10 , wherein the process further comprises:

performing comparisons using value comparison operators.

16. The non-transitory machine-readable storage medium of claim 10 , wherein the process further comprises:

caching a number of executed queries for reuse.

17. The non-transitory machine-readable storage medium of claim 10 , wherein generating the XML results responsive to the XQuery query comprises retrieving both data stored in relational form and data stored in XML form responsive to a single XQuery query.

18. A system comprising:

a processor; and

a machine-readable storage medium having machine-executable instructions, that when executed by the processor, cause the processor to carry out a process for transforming between the relational data and the XML data, the process including:

receiving an XQuery query from an application attempting to access a relational data source having a relational data model; and

an XQuery engine, the XQuery engine having a first data model incompatible with the relational data model, for generating XML results responsive to the XQuery query and based on data from the relational data source by:

dividing the XQuery query into one or more XQuery expressions;

retrieving the relational data from the relational data source;

executing a first XQuery expression using the retrieved relational data to generate, at least in part, the XML results responsive to the XQuery query and based on the relational data retrieved from the relational data source, the XML results generated without one or more relational queries equivalent to the first XQuery expression; and

sending the XML results to the application via the XQuery interface; and

wherein the XQuery engine includes a mediator module for determining for the one or more XQuery expressions whether an XML data source or the relational data source is being queried, the one or more XQuery expressions including the first XQuery expression querying the relational data source and determining that the first XQuery expression cannot be translated into one or more relational queries for the relational data source and equivalent to the first XQuery expression.

19. The system of claim 18 , wherein the XQuery interface is an XQuery API for Java (XQJ) module and the application is a Java application.

20. The system of claim 18 , wherein the mediator module is further configured for combining results from multiple data sources.

Assignments (7)
SECURITY INTEREST Recorded Jul 21, 2025
From: PROGRESS SOFTWARE CORPORATION
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 072094/0790 →
SECURITY INTEREST Recorded Mar 7, 2024
From: PROGRESS SOFTWARE CORPORATION
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 066762/0833 →
SECURITY INTEREST Recorded Jan 25, 2022
From: PROGRESS SOFTWARE CORPORATION
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 058840/0099 →
SECURITY INTEREST Recorded Apr 30, 2019
From: PROGRESS SOFTWARE CORPORATION
To: JPMORGAN CHASE BANK, N.A., ADMINISTRATIVE AGENT
Reel/Frame 049031/0684 →
SECURITY INTEREST Recorded Dec 18, 2017
From: PROGRESS SOFTWARE CORPORATION
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 044889/0325 →
SECURITY INTEREST Recorded Dec 2, 2014
From: PROGRESS SOFTWARE CORPORATION
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 034504/0178 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 4, 2013
From: ROBIE, JONATHAN; COPPENS, PETER; VAN CAPPELLEN, MARC
To: PROGRESS SOFTWARE CORPORATION
Reel/Frame 030545/0730 →