IP Library Granted Patent US 10,394,806
Granted Patent B1
US 10,394,806 · App. 15/202,390 · Granted Aug 27, 2019

Database-independent mechanism for retrieving relational data as XML

Inventors: Jonathan Robie (Durham, NC); Peter Coppens (Antwerp, BE); Marc Van Cappellen (Meise, BE)
Assignee: Progress Software Corporation
G06F16/2452G06F16/2445G06F16/2455G06F16/2471G06F16/8358
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 10,394,806
App. No.
15/202,390
Granted
Aug 27, 2019
Kind
B1
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 (73)

1. A computer-implemented method comprising:

receiving, using one or more processors, an XQuery query from an application;

dividing the XQuery query into a first XQuery expression and a second XQuery expression;

determining, by the one or more processors, that the first XQuery expression queries a XML data source and the second XQuery expression queries a relational data source;

executing the first XQuery expression on the XML data source, and receiving a first XML query result for the first XQuery expression from the XML data source;

translating the second XQuery expression into a SQL expression;

executing the SQL expression on the relational data source, and receiving a SQL query result for the SQL expression from the relational data source;

mapping the SQL query result of the SQL expression into a second XML query result;

combining the first XML query result associated with the first XQuery expression and the second XML query result associated with the second XQuery expression into an XML result for the XQuery query; and

providing the XML result of the XQuery query to the application.

2. The method of claim 1 , further comprising:

determining that the XQuery query includes one or more of a first expression, a first function, and a first operator that lack an equivalent in a query language of the relational data source, but may be compensated;

determining not to compensate the one or more of the first expression, the first function, and the first operator; and

generating code so that the one or more of the first expression, the first function, and the first operator are not compensated.

3. The method of claim 2 , wherein generating the code so that the one or more of the first expression, the first function, and the first operator are not compensated includes:

evaluating one or more of a second expression, a second function, and a second operator that are available to the relational data source.

4. The method of claim 3 , wherein evaluating the one or more of the second expression, the second function, and the second operator that are available to the relational data source includes evaluating the one or more of the second expression, the second function, and the second operator inside the relational data source.

5. The method of claim 4 , wherein the relational data source includes a Structured Query Language (SQL) database, and the evaluation inside the relational data source uses an rtrim( ) function available to the SQL database instead of compensating using a normalize-space( ) XQuery function.

6. The method of claim 1 , further comprising:

determining that the XQuery query includes one or more of a first expression, a first function, and a first operator that lack an equivalent in a query language of the relational data source, but may be compensated;

determining to compensate the one or more of the first expression, the first function, and the first operator; and

compensating the one or more of the first expression, the first function, and the first operator by evaluating the one or more of the first expression, the first function, and the first operator outside the relational data source using XQuery.

7. The method of claim 1 , further comprising:

determining that the XQuery query includes a comparison;

determining that the comparison may be performed using a value comparison rather than a general comparison; and

generating code for the XQuery query using the value comparison.

8. The method of claim 7 , wherein the comparison is included in one or more of a WHERE clause and a predicate expression, and an operand is bound to data in the XML data source.

9. The method of claim 8 , wherein the operand bound to the data in the XML data source is known to be a single item.

10. A system comprising:

one or more processors; and

a memory including instructions that, when executed by the one or more processors, cause the system to:

receive an XQuery query from an application;

divide the XQuery query into a first XQuery expression and a second XQuery expression;

determine that the first XQuery expression queries a XML data source and the second XQuery expression queries a relational data source;

execute the first XQuery expression on the XML data source, and receive a first XML query result for the first XQuery expression from the XML data source;

translate the second XQuery expression into a SQL expression;

execute the SQL expression on the relational data source, and receive a SQL query result for the SQL expression from the relational data source;

map the SQL query result of the SQL expression into a second XML query result;

combine the first XML query result associated with the first XQuery expression and the second XML query result associated with the second XQuery expression into an XML result for the XQuery query; and

provide the XML result of the XQuery query to the application.

11. The system of claim 10 , further comprising instructions that, when executed by the one or more processors, cause the system to:

determine that the XQuery query includes one or more of a first expression, a first function, and a first operator that lack an equivalent in a query language of the relational data source, but may be compensated;

determine not to compensate the one or more of the first expression, the first function, and the first operator; and

generate code so that the one or more of the first expression, the first function, and the first operator are not compensated.

12. The system of claim 11 , wherein to generate the code so that the one or more of the first expression, the first function, and the first operator are not compensated, the instructions, when executed by the one or more processors, cause the system to:

evaluate one or more of a second expression, a second function, and a second operator that are available to the relational data source.

13. The system of claim 12 , wherein to evaluate the one or more of the second expression, the second function, and the second operator that are available to the relational data source, the instructions, when executed by the one or more processors, cause the system to:

evaluate the one or more of the second expression, the second function, and the second operator inside the relational data source.

14. The system of claim 13 , wherein the relational data source includes a Structured Query Language (SQL) database, and the evaluation inside the relational data source uses an rtrim( ) function available to the SQL database instead of compensating using a normalize-space( ) XQuery function.

15. The system of claim 10 , further comprising instructions that, when executed by the one or more processors, cause the system to:

determine that the XQuery query includes one or more of a first expression, a first function, and a first operator that lack an equivalent in a query language of the relational data source, but may be compensated;

determine to compensate the one or more of the first expression, the first function, and the first operator; and

compensate the one or more of the first expression, the first function, and the first operator by evaluating the one or more of the first expression, the first function, and the first operator outside the relational data source using XQuery.

16. The system of claim 10 , further comprising instructions that, when executed by the one or more processors, cause the system to:

determine that the XQuery query includes a comparison;

determine that the comparison may be performed using a value comparison rather than a general comparison; and

generate code for the XQuery query using the value comparison.

17. The system of claim 16 , wherein the comparison is included in one or more of a WHERE clause and a predicate expression, and an operand is bound to data in the XML data source.

18. The system of claim 17 , wherein the operand bound to the data in the XML data source is known to be a single item.

19. A non-transitory computer-readable medium storing executable instructions to:

receive an XQuery query from an application;

divide the XQuery query into a first XQuery expression and a second XQuery expression;

determine that the first XQuery expression queries a XML data source and the second XQuery expression queries a relational data source;

execute the first XQuery expression on the XML data source, and receive a first XML query result for the first XQuery expression from the XML data source;

translate the second XQuery expression into a SQL expression;

execute the SQL expression on the relational data source, and receive a SQL query result for the SQL expression from the relational data source;

map the SQL query result of the SQL expression into a second XML query result;

combine the first XML query result associated with the first XQuery expression and the second XML query result associated with the second XQuery expression into an XML result for the XQuery query; and

provide the XML result of the XQuery query to the application.

20. The non-transitory computer-readable medium of claim 19 , the executable instructions further comprising instructions to:

determine that the XQuery query includes one or more of a first expression, a first function, and a first operator that lack an equivalent in a query language of the relational data source, but may be compensated;

determine not to compensate the one or more of the first expression, the first function, and the first operator; and

generate code so that the one or more of the first expression, the first function, and the first operator are not compensated.

Assignments (6)
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 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 17, 2016
From: ROBIE, JONATHAN; COPPENS, PETER; VAN CAPPELLEN, MARC
To: PROGRESS SOFTWARE CORPORATION
Reel/Frame 040358/0175 →
Continuity (3)
Continuation 13872967 · Apr 29, 2013
Continuation 11283224 · Nov 18, 2005
Provisional Application 60630837 · Nov 23, 2004