Optimization of queries over XML views that are based on union all operators
First Claim
1. A method comprising:
- a database server running on one or more computers;
said database server receiving a first database statement;
wherein the first database statement requires access to a view defined as combined results of a set of database statements;
wherein the first database statement includes an expression that operates on an XML construct; and
said database server generating a second database statement, based on the first database statement and the view, that includes a modified version of the set of database statements in the distributive form and rewritten to include the expression that operates on the XML construct.
1 Assignment
0 Petitions
Accused Products
Abstract
Optimization is provided for database statements involving XML data, e.g., XPath and XQuery, which operate over views that use aggregate set operators, e.g., UNION ALL. As part of a “view merge” stage of query transformation, the query that operates over the view is merged with a query that defines the view. One or more expressions (e.g., operators, predicates, virtual table constructs) from the query that operates over the view are then “pushed down” to operate on the individual underlying XML data constructs. “Branch elimination” is performed based on the structure of the view and the query acting over the view, based on which it is possible to determine whether any of the sub-queries, if executed, would result in the return of zero rows. If so, then such branches are eliminated from the transformed query, leaving a reduced set of data containers on which to execute the query.
-
Citations
38 Claims
-
1. A method comprising:
-
a database server running on one or more computers; said database server receiving a first database statement; wherein the first database statement requires access to a view defined as combined results of a set of database statements; wherein the first database statement includes an expression that operates on an XML construct; and said database server generating a second database statement, based on the first database statement and the view, that includes a modified version of the set of database statements in the distributive form and rewritten to include the expression that operates on the XML construct. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A method comprising:
-
a database server running on one or more computers; said database server creating a first database statement that defines a view based on first and second XML data, wherein the first XML data is based on a first version of an XML schema and the second XML data is based on a second version of the XML schema, and wherein the second version of the XML schema describes a different data structure than the first version of the XML schema; wherein the first database statement includes a union, based on a UNION ALL operator, of a statement involving the first XML data and a statement involving the second XML data; and in response to receiving a second database statement that involves the view, executing the first database statement by said database server. - View Dependent Claims (24, 26, 27)
-
-
25. A method comprising:
-
a database server running on one or more computers; said database server creating a first database statement that defines a view based on first and second XML data, wherein the first XML data is stored in a database based on a first data storage model and the second XML data is stored in the database based on a second data storage model, and wherein the second data storage model is different than the first data storage model; wherein the first database statement includes a union, based on a UNION ALL operator, of a statement involving the first XML data and a statement involving the second XML data; and in response to receiving a second database statement that involves the view, executing the first database statement by said database server. - View Dependent Claims (28)
-
-
29. A method comprising:
-
a first database server running on one or more computers; said first database server creating a first database statement that defines a view based on first and second XML data, wherein the first XML data is managed by said first database server and the second XML data is managed by a second database server, and wherein the second database server is a different server than the first database server; wherein the first database statement includes a union, based on a UNION ALL operator, of a statement involving the first XML data and a statement involving the second XML data; and in response to receiving a second database statement that involves the view, executing the first database statement by said first database server. - View Dependent Claims (30)
-
-
31. A method comprising:
-
a first database server running on one or more computers; said first database server creating a first database statement that defines a view based on first and second XML data; wherein the first XML data and the second XML data are based on a combination of any two from a group consisting of; (a) the first XML data is managed by said first database server and the second XML data is managed by a second database server, wherein the second database server is a different server than the first database server, (b) the first XML data is stored in a database based on a first data storage model and the second XML data is stored in the database based on a second data storage model, wherein the second data storage model is different than the first data storage model, (c) the first XML data conforms to a first version of an XML schema and the second XML data conforms to a second version of the XML schema, wherein the second version of the XML schema describes a different data structure than the first version of the XML schema; wherein the first database statement includes a union, based on a UNION ALL operator, of a statement involving the first XML data and a statement involving the second XML data; and in response to receiving a second database statement that involves the view, executing the first database statement by said first database server. - View Dependent Claims (32)
-
-
33. A method comprising:
-
a database server running on one or more computers; said database server creating a first database statement that defines a view based on first and second XML data, wherein the first XML data is based on a first XML schema and the second XML data is based on a second XML schema, and wherein the second XML schema describes a different data structure than the first XML schema; wherein the first database statement includes a union, based on a UNION ALL operator, of a statement involving the first XML data and a statement involving the second XML data; and in response to receiving a second database statement that involves the view, executing the first database statement by said database server. - View Dependent Claims (34)
-
-
35. A method comprising:
-
a database server running on one or more computers; said database server receiving a first database statement; wherein the first database statement requires access to a view defined as combined results of a set of database statements; wherein the first database statement includes an expression that operates on an XML construct that is based on a relational database construct; and said database server generating a second database statement, based on the first database statement and the view, that includes a modified version of the set of database statements in the distributive form and rewritten to operate on the relational database construct. - View Dependent Claims (36, 37, 38)
-
Specification