Method and system for performing range max/min queries on a data cube
First Claim
1. A method for performing a range max/min query in a database represented as a d-dimensional data cube having a plurality of cells, each cell having a value and identified by an index, the range max/min query corresponding to a region Q of the data cube, the method comprising the steps of:
- partitioning the data cube into a plurality of multi-level d-dimensional blocks;
representing the blocks as a multi-level tree structure having a plurality of nodes, the n-level nodes of the tree corresponding respectively to the n-level blocks;
for each block, determining the index of a cell with a max/min value among the cells in the block;
storing the determined cell indexes for the blocks into the corresponding nodes; and
generating a range max/min result from the values of the cells selected from the cells in the query region Q and the cells referenced by the indexes at the nodes corresponding to the cells in the query region Q.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for performing a range max/min query in a database, in which the data is represented as a multi-dimensional data cube, is disclosed. The method comprises the steps of: partitioning the data cube into multi-level multi-dimensional blocks which are represented by a tree structure; determining the index to the maximum or minimum value for each block; generating a range max/min result from the values of the cells selected from the cells in the query region Q, and the cells referenced by the indexes at the nodes corresponding to the cells in the query region Q, using the tree structure and determined cell indexes. A branch-and-bound method is used to repeatedly reduce the size of the query region from a cell within the region, based on sub-trees whose roots are cells in the region. To further improve the method performance, one or more reference arrays may also be used to quickly traverse the tree in determining the max/min cell indexes.
-
Citations
36 Claims
-
1. A method for performing a range max/min query in a database represented as a d-dimensional data cube having a plurality of cells, each cell having a value and identified by an index, the range max/min query corresponding to a region Q of the data cube, the method comprising the steps of:
-
partitioning the data cube into a plurality of multi-level d-dimensional blocks; representing the blocks as a multi-level tree structure having a plurality of nodes, the n-level nodes of the tree corresponding respectively to the n-level blocks; for each block, determining the index of a cell with a max/min value among the cells in the block; storing the determined cell indexes for the blocks into the corresponding nodes; and generating a range max/min result from the values of the cells selected from the cells in the query region Q and the cells referenced by the indexes at the nodes corresponding to the cells in the query region Q. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method for performing a range max/min query in a database represented by a d-dimensional array A having a plurality of cells, each cell having a value and identified by an index, the range max/min query corresponding to a region Q of the array A, the method comprising the steps of:
-
precomputing at least one d-dimensional reference array R of the same size as the array A, each member R i! of R referencing an index i of the array A such that j is closest to i with respect to a predetermined distance function and direction, and referencing an out-of-bound index of A if no such j exists; generating a range max/min result from the values of the cells selected from those in the query region Q, based on the precomputed reference arrays Rs. - View Dependent Claims (11, 12)
-
-
13. A computer program product for use with a computer system for performing a range max/min query in a database represented as a d-dimensional data cube having a plurality of cells, each cell having a value and identified by an index, the range max/min query corresponding to a region Q of the data cube, the computer program product comprising:
-
a computer-readable medium; means, provided on the computer-readable medium, for directing the system to partition the data cube into a plurality of multi-level d-dimensional blocks; means, provided on the computer-readable medium, for directing the system to represent the blocks as a multi-level tree structure having a plurality of nodes, the n-level nodes of the tree corresponding respectively to the n-level blocks; means, provided on the computer-readable medium, for directing the system to determine, for each block, the index of a cell with a max/min value among the cells in the block; means, provided on the computer-readable medium, for directing the system to store the determined cell indexes for the blocks into the corresponding nodes; and means, provided on the computer-readable medium, for directing the system to generate a range max/min result from the values of the cells selected from the cells in the query region Q and the cells referenced by the indexes at the nodes corresponding to the cells in the query region Q. - View Dependent Claims (14, 15, 16, 17, 18, 20, 21)
-
-
19. The computer program product as recited in 18, wherein the means for directing to reduce the size of Q includes means, provided on the computer-readable medium, for directing the system to perform the steps of:
-
(a) initializing a variable u with the index of any cell in the query region Q; (b) determining whether the value of a cell indexed by xi, where xi is the index stored at node x, is larger than the value of a cell indexed by the variable u and whether the cell indexed by xi is within the query region Q; (c) if the value of the cell indexed by xi is larger than the value of the cell indexed by u and the cell indexed by xi is within the query region Q, then updating the variable u with the index xi ; (d) if the value of the cell indexed by xi is larger than the value of the cell indexed by u and the cell indexed by xi is outside the query region Q, then for each child node z of node x where the block corresponding to node z intersects with Q, executing steps (b)-(e) with node x being substituted by node z; and (e) returning the value of u as the range-max/min result.
-
-
22. A computer program product for performing a range max/min query in a database represented by a d-dimensional array A having a plurality of cells, each cell having a value and identified by an index, the range max/min query corresponding to a region Q of the array A, the computer program product comprising:
-
means, provided on the computer-readable medium, for directing the system to precompute at least one d-dimensional reference array R of the same size as the array A, each member R i! of R referencing an index j of the array A such that j is closest to i with respect to a predetermined distance function and direction, and referencing an out-of-bound index of A if no such j exists; means, provided on the computer-readable medium, for directing the system to generate a range max/min result from the values of the cells selected from those in the query region Q, based on the precomputed reference arrays Rs. - View Dependent Claims (23, 24)
-
-
25. A database system for performing a range max/min query in a database represented as a d-dimensional data cube having a plurality of cells, each cell having a value and identified by an index, the range max/min query corresponding to a region Q of the data cube, the system comprising:
-
means for partitioning the data cube into a plurality of multi-level d-dimensional blocks; means for representing the blocks as a multi-level tree structure having a plurality of nodes, the n-level nodes of the tree corresponding respectively to the n-level blocks; for each block, means for determining the index of a cell with a max/min value among the cells in the block; means for storing the determined cell indexes for the blocks into the corresponding nodes; and means for generating a range max/min result from the values of the cells selected from the cells in the query region Q and the cells referenced by the indexes at the nodes corresponding to the cells in the query region Q. - View Dependent Claims (26, 27, 28, 29, 30, 31, 32, 33)
-
-
34. A system for performing a range max/min query in a database represented by a d-dimensional array A having a plurality of cells, each cell having a value and identified by an index, the range max/min query corresponding to a region Q of the array A, the system comprising:
-
means for precomputing at least one d-dimensional reference array R of the same size as the array A, each member R i! of R referencing an index j of the array A such that j is closest to i with respect to a predetermined distance function and direction, and referencing an out-of-bound index of array A if no such j exists; means for generating a range max/min result from the values of the cells selected from those in the query region Q, based on the precomputed reference arrays Rs. - View Dependent Claims (35, 36)
-
Specification