Database-independent mechanism for retrieving relational data as XML
First Claim
1. A computer-implemented method for transforming between relational data and XML data, the 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, based on data from the relational data source by;
processing the XQuery query as specified by a connection-specific option declaration, the connection-specific option declaration providing one or more parameters to control the processing of the XQuery query for a specific connection;
dividing the XQuery query into one or more XQuery expressions;
processing the one or more XQuery expressions as specified by an evaluate-in-memory extension expression, the evaluate-in-memory extension expression specifying a first expression from the one or more XQuery expressions to be evaluated in a memory as XQuery without translating the first expression to structured query language (SQL) for evaluation in the relational data source, the evaluate-in-memory extension expression indicating maximum XQuery conformance when processing the data from the relational data source;
determining for the one or more XQuery expressions if an XML data source or the relational data source is being queried;
retrieving, by an XQuery engine having a first data model incompatible with the relational data model, the relational data if the relational data source is being queried; and
executing in the XQuery engine at least one XQuery expression using the retrieved relational data if the relational data source is being queried; and
sending the XML results to the Java application via the XQJ.
7 Assignments
0 Petitions
Accused Products
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 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.
-
Citations
33 Claims
-
1. A computer-implemented method for transforming between relational data and XML data, the 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, based on data from the relational data source by; processing the XQuery query as specified by a connection-specific option declaration, the connection-specific option declaration providing one or more parameters to control the processing of the XQuery query for a specific connection; dividing the XQuery query into one or more XQuery expressions; processing the one or more XQuery expressions as specified by an evaluate-in-memory extension expression, the evaluate-in-memory extension expression specifying a first expression from the one or more XQuery expressions to be evaluated in a memory as XQuery without translating the first expression to structured query language (SQL) for evaluation in the relational data source, the evaluate-in-memory extension expression indicating maximum XQuery conformance when processing the data from the relational data source; determining for the one or more XQuery expressions if an XML data source or the relational data source is being queried; retrieving, by an XQuery engine having a first data model incompatible with the relational data model, the relational data if the relational data source is being queried; and executing in the XQuery engine at least one XQuery expression using the retrieved relational data if the relational data source is being queried; and sending the XML results to the Java application via the XQJ. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. 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 for transforming between relational data and XML data, the 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 based on data from the relational data source by; processing the XQuery query as specified by a connection-specific option declaration, the connection-specific option declaration providing one or more parameters to control the processing of the XQuery query for a specific connection; dividing the XQuery query into one or more XQuery expressions; processing the one or more XQuery expressions as specified by an evaluate-in-memory extension expression, the evaluate-in-memory extension expression specifying a first expression from the one or more XQuery expressions to be evaluated in a memory as XQuery without translating the first expression to structured query language (SQL) for evaluation in the relational data source, the evaluate-in-memory extension expression indicating maximum XQuery conformance when processing the data from the relational data source; determining for the one or more XQuery expressions if an XML data source or the relational data source is being queried; retrieving, by an XQuery engine having a first data model incompatible with the relational data model, the relational data if the relational data source is being queried; and executing in the XQuery engine at least one XQuery expression using the retrieved relational data if the relational data source is being queried; and sending the XML results to the Java application via the XQJ. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. A system for transforming between relational data and XML data, the 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 implementing; an XQuery interface for 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 based on data from the relational data source by; processing the XQuery query as specified by a connection-specific option declaration, the connection-specific option declaration providing one or more parameters to control the processing of the XQuery query for a specific connection; dividing the XQuery query into one or more XQuery expressions; processing the one or more XQuery expressions as specified by an evaluate-in-memory extension expression, the evaluate-in-memory extension expression specifying a first expression from the one or more XQuery expressions to be evaluated in a memory as XQuery without translating the first expression to structured query language (SQL) for evaluation in the relational data source, the evaluate-in-memory extension expression indicating maximum XQuery conformance when processing the data from the relational data source; retrieving the relational data if the relational data source is being queried; executing at least one XQuery expression using the retrieved relational data if the relational data source is being queried; 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 if an XML data source or the relational data source is being queried. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33)
-
Specification