Claims Analysis
Total Claims: 32
Claim 1
Independent Claim
489 words
A method of reordering an SQL query represented as ##EQU51## in a computer having a memory, the SQL query Q being used by the computer to direct information retrieval from a relational database stored in an electronic storage device, wherein T 1 is a left sub-tree, T r is a right sub-tree, ⊙ε{, →, ←, ⃡} defines operators for the query, denotes a join operation, → denotes a left outer join operation, ← denotes a right outer join operation, and ⃡ denotes a full outer join operation, the method comprising the steps of: (a) generating one or more required sets (p) for the query Q in the memory of the computer, wherein the required set (p) comprises {V 1 , V r }, sch(p) is a set of real attributes, V 1 =sch(p)∩T 1 , and V r =sch(p)∩T r , so that the required set (p) contains relations that must be in T 1 and T r before T 1 and T r can be combined; (b) enumerating one or more plans T for the query Q in the memory of the computer using the required sets (p), wherein the enumerated plans T represent associative re-orderings of relations in the query Q, the enumerating step further comprising the steps of combining T 1 and T r to form T=T 1 .T r provided that there are no common relations between T 1 and T r , a total number of relations in T 1 and T r is the same as a total number of relations in T, there is a predicate p between T 1 and T r , and all relations in V 1 are in T 1 and all relations in V r are in T r when predicate p is associated with an outer join operation; (c) generating a conflict set C s for a first operator in the query Q in the memory of the computer when a relation referenced in the predicate for the first operator is also referenced in a null-supplying side of a second operator in the query Q, wherein the first operator is selected from a group comprising a join, a left outer join, and a right outer join, and the second operator is selected from a group comprising a left outer join, a right outer join, and a full outer join; and (d) selectively assigning operators to each of the enumerated plans T for the query Q in the memory of the computer using the conflict set C s , so that the results from the plans T are identical to the query Q, wherein the selectively assigning step (d) comprises the step of generating a general operator assignment at a root of the plan T, and the generating step comprises the step of assigning a Modified General Outer Join (MGOJ) operator at a root of the plan T when the conflict set C s is not empty.
Claim 2
Independent Claim
489 words
A method of reordering an SQL query represented as ##EQU51## in a computer having a memory, the SQL query Q being used by the computer to direct information retrieval from a relational database stored in an electronic storage device, wherein T 1 is a left sub-tree, T r is a right sub-tree, ⊙ε{, →, ←, ⃡} defines operators for the query, denotes a join operation, → denotes a left outer join operation, ← denotes a right outer join operation, and ⃡ denotes a full outer join operation, the method comprising the steps of: (a) generating one or more required sets (p) for the query Q in the memory of the computer, wherein the required set (p) comprises {V 1 , V r }, sch(p) is a set of real attributes, V 1 =sch(p)∩T 1 , and V r =sch(p)∩T r , so that the required set (p) contains relations that must be in T 1 and T r before T 1 and T r can be combined; (b) enumerating one or more plans T for the query Q in the memory of the computer using the required sets (p), wherein the enumerated plans T represent associative re-orderings of relations in the query Q, the enumerating step further comprising the steps of combining T 1 and T r to form T=T 1 .T r provided that there are no common relations between T 1 and T r , a total number of relations in T 1 and T r is the same as a total number of relations in T, there is a predicate p between T 1 and T r , and all relations in V 1 are in T 1 and all relations in V r are in T r when predicate p is associated with an outer join operation; (c) generating a conflict set C s for a first operator in the query Q in the memory of the computer when a relation referenced in the predicate for the first operator is also referenced in a null-supplying side of a second operator in the query Q, wherein the first operator is selected from a group comprising a join, a left outer join, and a right outer join, and the second operator is selected from a group comprising a left outer join, a right outer join, and a full outer join; and (d) selectively assigning operators to each of the enumerated plans T for the query Q in the memory of the computer using the conflict set C s , so that the results from the plans T are identical to the query Q, wherein the selectively assigning step (d) comprises the step of generating a general operator assignment at a root of the plan T, and the generating step comprises the step of assigning a Modified General Outer Join (MGOJ) operator at a root of the plan T when the conflict set C s is not empty.
Claim 3
Dependent Claim
44 words
The method of claim 1, further comprising the step of: (e) selecting one of the enumerated plans T for execution by the computer according to a predefined criteria for the retrieval of the information from the relational database stored in the electronic storage device.
Claim 4
Dependent Claim
22 words
The method of claim 1, wherein the required sets (p) and the conflict sets C s are generated independently of each other.
Claim 5
Dependent Claim
23 words
The method of claim 1, wherein the plans T and the conflict sets C s are generated and enumerated independently of each other.
Claim 6
Dependent Claim
23 words
The method of claim 1, wherein the required sets (p) and conflict sets C s are generated before the plans T are enumerated.
Claim 7
Dependent Claim
27 words
The method of claim 1, wherein the required sets (p), plans T, and conflict sets C s are generated, enumerated, and generated before the operators are assigned.
Claim 8
Dependent Claim
23 words
The method of claim 1, wherein the required sets (p) identify constraints on the associative re-orderings of the relations in the query Q.
Claim 9
Dependent Claim
20 words
The method of claim 1, wherein the required sets (p) are generated only for left, right, and full outer joins.
Claim 10
Dependent Claim
21 words
The method of claim 1, wherein the required sets are generated for outer join predicates that reference more than two relations.
Claim 11
Dependent Claim
27 words
The method of claim 1, wherein the selectively assigning step (d) comprises the step of generating a conflict-free operator assignment at a root of the plan T.
Claim 12
Dependent Claim
33 words
The method of claim 10, wherein the generating step (d) comprises the step of recursively generating a conflict-free operator assignment at a root of each sub-tree T 1 and T r in T.
Claim 13
Dependent Claim
37 words
The method of claim 10, wherein the generating step comprises the step of terminating the assigning step without assigning an operator at a root of the plan T when the conflict set C s is not empty.
Claim 14
Dependent Claim
33 words
The method of claim 1, wherein the generating step (d) comprises the step of recursively generating a general operator assignment at a root of each sub-tree T 1 and T r in T.
Claim 15
Dependent Claim
13 words
The method of claim 1, wherein the MGOJ operator is a compensation operator.
Claim 16
Dependent Claim
261 words
The method of claim 1, wherein the MGOJ operator comprises a relation (R 1 R 2 , V 1 V 2 , E') in an expression comprising: r.sub.1 MGOJ p, X.sub.1, . . . , X.sub.n, Y.sub.1, . . . , Y.sub.n' !r.sub.2 for relations r 1 and r 2 that preserves relations X i and Y j , wherein: r 1 =(R 1 , V 1 , E 1 ), wherein R 1 is a non-empty set of real attributes, V 1 is a non-empty set of virtual attributes, and E 1 is a set of tuples that comprise the relation r 1 , r 2 =(R 2 , V 2 , E 2 ), wherein R 2 is a non-empty set of real attributes, V 2 is a non-empty set of virtual attributes, and E 2 is a set of tuples that comprise the relation r 2 , R 1 ∩R 2 =.o slashed., V 1 ∩V 2 =.o slashed., X i =(R x .sbsb.i, V x .sbsb.i, E x .sbsb.i) for 1≦i≦n, Y j =(R y .sbsb.j, V y .sbsb.j, E y .sbsb.j) for 1≦j≦n', X i and Y j are relations such that R x .sbsb.i ∩R x .sbsb.k =V x .sbsb.i ∩V x .sbsb.k =.o slashed., R y .sbsb.j ∩R y .sbsb.s =V y .sbsb.j ∩V y .sbsb.s =.o slashed., R x .sbsb.i .OR right.R 1 and R y .sbsb.j .OR right.R 2 , where i≠k, j≠s, 1≦i,k≦n, and 1≦j,s≦n', ##EQU52## p i ,j is a predicate for ##EQU53## and π c denotes a projection operation.
Claim 17
Dependent Claim
12 words
The method of claim 15, wherein the assigning step comprises replacing: ##EQU54##
Claim 18
Dependent Claim
12 words
The method of claim 15, wherein the assigning step comprises replacing: ##EQU55##
Claim 19
Dependent Claim
12 words
The method of claim 15, wherein the assigning step comprises replacing: ##EQU56##
Claim 20
Dependent Claim
12 words
The method of claim 15, wherein the assigning step comprises replacing: ##EQU57##
Claim 21
Dependent Claim
34 words
The method of claim 1, wherein the assigning step comprises replacing: ##EQU58## wherein X i is a relational expression and P i ,j is a predicate between X i and X j for 1≦i,j≦3.
Claim 22
Dependent Claim
34 words
The method of claim 1, wherein the assigning step comprises replacing: ##EQU59## wherein X i is a relational expression and P i ,j is a predicate between X i and X j for 1≦i,j≦3.
Claim 23
Dependent Claim
34 words
The method of claim 1, wherein the assigning step comprises replacing: ##EQU60## wherein X i is a relational expression and p i ,j is a predicate between X i and X j for 1≦i,j≦3.
Claim 24
Dependent Claim
34 words
The method of claim 1, wherein the assigning step comprises replacing: ##EQU61## wherein X i is a relational expression and p i ,j is a predicate between X i and X j for 1≦i,j≦3.
Claim 25
Dependent Claim
34 words
The method of claim 1, wherein the assigning step comprises replacing: ##EQU62## wherein X i is a relational expression and p i ,j is a predicate between X i and X j for 1≦i,j≦3.
Claim 26
Independent Claim
497 words
An apparatus for reordering an SQL query represented as ##EQU63## wherein T 1 is a left sub-tree, T r is a right sub-tree, ⊙ε{, →, ←, ⃡} defines operators for the query, denotes a join operation, → denotes a left outer join operation, ← denotes a right outer join operation, and ⃡ denotes a full outer join operation, the apparatus comprising: a computer having a memory, wherein the SQL query Q is used by the computer to direct information retrieval from a relational database stored in an electronic storage device in communication with the computer, the computer further comprising: means for generating one or more required sets (p) for the query Q in the memory of the computer, wherein the required set (p) comprises {V 1 , V r }, sch(p) is a set of real attributes, V 1 =sch(p)∩T 1 , and V r =sch(p)∩T r , so that the required set (p) contains relations that must be in T 1 and T r before T 1 and T r can be combined; means for enumerating one or more plans T for the query Q in the memory of the computer using the required sets (p), wherein the enumerated plans T represent associative reorderings of relations in the query Q, the means for enumerating further comprising means for combining T 1 and T r to form T=T 1 .T r provided that there are no common relations between T 1 and T r , a total number of relations in T 1 and T r is the same as a total number of relations in T, there is a predicate p between T 1 and T r , and all relations in V 1 are in T 1 and all relations in V r are in T r when predicate p is associated with an outer join operation; means for generating a conflict set C s for a first operator in the query Q in the memory of the computer when a relation referenced in the predicate for the first operator is also referenced in a null-supplying side of a second operator in the query Q, wherein the first operator is selected from a group comprising a join, a left outer join, and a right outer join, and the second operator is selected from a group comprising a left outer join, a right outer join, and a full outer join; and means for selectively assigning operators to each of the enumerated plans T for the query Q in the memory of the computer using the conflict set C s , so that the results from the plans T are identical to the query Q, wherein the means for selectively assigning comprises means for generating a general operator assignment at a root of the plan T, and the means for generating comprises means for assigning a Modified General Outer Join (MGOJ) operator at a root of the plant when the conflict set C s is not empty.
Claim 27
Independent Claim
497 words
An apparatus for reordering an SQL query represented as ##EQU63## wherein T 1 is a left sub-tree, T r is a right sub-tree, ⊙ε{, →, ←, ⃡} defines operators for the query, denotes a join operation, → denotes a left outer join operation, ← denotes a right outer join operation, and ⃡ denotes a full outer join operation, the apparatus comprising: a computer having a memory, wherein the SQL query Q is used by the computer to direct information retrieval from a relational database stored in an electronic storage device in communication with the computer, the computer further comprising: means for generating one or more required sets (p) for the query Q in the memory of the computer, wherein the required set (p) comprises {V 1 , V r }, sch(p) is a set of real attributes, V 1 =sch(p)∩T 1 , and V r =sch(p)∩T r , so that the required set (p) contains relations that must be in T 1 and T r before T 1 and T r can be combined; means for enumerating one or more plans T for the query Q in the memory of the computer using the required sets (p), wherein the enumerated plans T represent associative reorderings of relations in the query Q, the means for enumerating further comprising means for combining T 1 and T r to form T=T 1 .T r provided that there are no common relations between T 1 and T r , a total number of relations in T 1 and T r is the same as a total number of relations in T, there is a predicate p between T 1 and T r , and all relations in V 1 are in T 1 and all relations in V r are in T r when predicate p is associated with an outer join operation; means for generating a conflict set C s for a first operator in the query Q in the memory of the computer when a relation referenced in the predicate for the first operator is also referenced in a null-supplying side of a second operator in the query Q, wherein the first operator is selected from a group comprising a join, a left outer join, and a right outer join, and the second operator is selected from a group comprising a left outer join, a right outer join, and a full outer join; and means for selectively assigning operators to each of the enumerated plans T for the query Q in the memory of the computer using the conflict set C s , so that the results from the plans T are identical to the query Q, wherein the means for selectively assigning comprises means for generating a general operator assignment at a root of the plan T, and the means for generating comprises means for assigning a Modified General Outer Join (MGOJ) operator at a root of the plant when the conflict set C s is not empty.
Claim 28
Dependent Claim
45 words
The apparatus of claim 25, wherein the computer further comprises: means for selecting one of the enumerated plans T for execution by the computer according to a predefined criteria for the retrieval of the information from the relational database stored in the electronic storage device.
Claim 29
Dependent Claim
512 words
A program storage device readable by a computer having a memory, tangibly embodying a program of instructions executable by the computer to perform method steps for reordering an SQL query represented as ##EQU64## in the computer, the SQL query Q being used by the computer to direct information retrieval from a relational database stored in an electronic storage device coupled to the computer, wherein T 1 is a left sub-tree, T r is a right sub-tree, ⊙ε{, →, ←, ⃡} defines operators for the query, denotes a join operation, → denotes a left outer join operation, ← denotes a right outer join operation, and ⃡ denotes a full outer join operation, the method comprising the steps of: (a) generating one or more required sets (p) for the query Q in the memory of the computer, wherein the required set (p) comprises {V 1 , V r }, sch(p) is a set of real attributes, V 1 =sch(p)∩T 1 , and V r =sch(p)∩T r , so that the required set contains relations that must be in T 1 and T r before T 1 and T r can be combined; (b) enumerating one or more plans T for the query Q in the memory of the computer using the required sets (p), wherein the enumerated plans T represent associative re-orderings of relations in the query Q, the enumerating step further comprising the steps of combining T 1 and T r to form T=T 1 .T r provided that there are no common relations between T 1 and T r , a total number of relations in T 1 and T r is the same as a total number of relations in T, there is a predicate p between T 1 and T r , and all relations in V 1 are in T 1 and all relations in V r are in T r when predicate p is associated with an outer join operation; (c) generating a conflict set C s for a first operator in the query Q in the memory of the computer when a relation referenced in the predicate for the first operator is also referenced in a null-supplying side of a second operator in the query Q, wherein the first operator is selected from a group comprising a join, a left outer join, and a right outer join, and the second operator is selected from a group comprising a left outer join, a right outer join, and a full outer join; and (d) selectively assigning operators to each of the enumerated plans T for the query Q in the memory of the computer using the conflict set C s , so that the results from the plans T are identical to the query Q, wherein the selectively assigning step (d) comprises the step of generating a general operator assignment at a root of the plan T, and the generating step comprises the step of assiqning a Modified General Outer Join (MGOJ) operator at a root of the plan T when the conflict set C s is not empty.
Claim 30
Dependent Claim
512 words
A program storage device readable by a computer having a memory, tangibly embodying a program of instructions executable by the computer to perform method steps for reordering an SQL query represented as ##EQU64## in the computer, the SQL query Q being used by the computer to direct information retrieval from a relational database stored in an electronic storage device coupled to the computer, wherein T 1 is a left sub-tree, T r is a right sub-tree, ⊙ε{, →, ←, ⃡} defines operators for the query, denotes a join operation, → denotes a left outer join operation, ← denotes a right outer join operation, and ⃡ denotes a full outer join operation, the method comprising the steps of: (a) generating one or more required sets (p) for the query Q in the memory of the computer, wherein the required set (p) comprises {V 1 , V r }, sch(p) is a set of real attributes, V 1 =sch(p)∩T 1 , and V r =sch(p)∩T r , so that the required set contains relations that must be in T 1 and T r before T 1 and T r can be combined; (b) enumerating one or more plans T for the query Q in the memory of the computer using the required sets (p), wherein the enumerated plans T represent associative re-orderings of relations in the query Q, the enumerating step further comprising the steps of combining T 1 and T r to form T=T 1 .T r provided that there are no common relations between T 1 and T r , a total number of relations in T 1 and T r is the same as a total number of relations in T, there is a predicate p between T 1 and T r , and all relations in V 1 are in T 1 and all relations in V r are in T r when predicate p is associated with an outer join operation; (c) generating a conflict set C s for a first operator in the query Q in the memory of the computer when a relation referenced in the predicate for the first operator is also referenced in a null-supplying side of a second operator in the query Q, wherein the first operator is selected from a group comprising a join, a left outer join, and a right outer join, and the second operator is selected from a group comprising a left outer join, a right outer join, and a full outer join; and (d) selectively assigning operators to each of the enumerated plans T for the query Q in the memory of the computer using the conflict set C s , so that the results from the plans T are identical to the query Q, wherein the selectively assigning step (d) comprises the step of generating a general operator assignment at a root of the plan T, and the generating step comprises the step of assiqning a Modified General Outer Join (MGOJ) operator at a root of the plan T when the conflict set C s is not empty.
Claim 31
Dependent Claim
49 words
The program storage device of claim 27, wherein the method further comprises the step of: (e) selecting one of the enumerated plans T for execution by the computer according to a predefined criteria for the retrieval of the information from the relational database stored in the electronic storage device.
Claim 32
Dependent Claim
263 words
The program storage device of claim 27, wherein the MGOJ operator comprises a relation (R 1 R 2 , V 1 V 2 , E') in an expression comprising: r.sub.1 MGOJ p, X.sub.1, . . . , X.sub.n, Y.sub.1, . . . , Y.sub.n' !r.sub.2 for relations r 1 and r 2 that preserves relations X i and Y j , wherein: r 1 =(R 1 , V 1 , E 1 ), wherein R 1 is a non-empty set of real attributes, V 1 is a non-empty set of virtual attributes, and E 1 is a set of tuples that comprise the relation r 1 , r 2 =(R 2 , V 2 , E 2 ), wherein R 2 is a non-empty set of real attributes, V 2 is a non-empty set of virtual attributes, and E 2 is a set of tuples that comprise the relation r 2 , R 1 ∩R 2 =.o slashed., V 1 ∩V 2 =.o slashed., X i =(R x .sbsb.i, V x .sbsb.i, E x .sbsb.i) for 1≦i≦n, Y j =(R y .sbsb.j, V y .sbsb.j, E y .sbsb.j) for 1≦j≦n', X i and Y j are relations such that R x .sbsb.i ∩R x .sbsb.k =V x .sbsb.i ∩V x .sbsb.k =.o slashed., R y .sbsb.j ∩R y .sbsb.s =V y .sbsb.j ∩V y .sbsb.s =.o slashed., R x .sbsb.i .OR right.R 1 and R y .sbsb.j .OR right.R 2 , where i≠k, j≠s, 1≦i,k≦n, and 1≦j,s≦n', ##EQU65## p i ,j is a predicate for ##EQU66## and π c denotes a projection operation.