Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value. (The search key can be a single field or a combination of fields.) One dimensional index structures assume a single search key, and retrieve records that match a given search-key value. (The search key can be a single field or a combination of fields.) Many applications, e.g. GIS, OLAP, require us to view data as existing in a space of two or more dimensions. Many applications, e.g. GIS, OLAP, require us to view data as existing in a space of two or more dimensions.
Multidimensional Index Structures The queries to be supported on such data: The queries to be supported on such data: partial-match queries: specify values for a subset of the dimensions partial-match queries: specify values for a subset of the dimensions range queries: give the range for each dimension. range queries: give the range for each dimension. nearest-neighbor queries: ask for the closest point to the given point. nearest-neighbor queries: ask for the closest point to the given point.
Grid File The grid file slices the space of points in each of the dimensions. The grid file slices the space of points in each of the dimensions. Each of the regions can be thought of as a bucket, and each of the points in that region has its record placed in a block belonging to that bucket. If needed, overflow blocks can be used to increase the size of a bucket. Each of the regions can be thought of as a bucket, and each of the points in that region has its record placed in a block belonging to that bucket. If needed, overflow blocks can be used to increase the size of a bucket.
Age Salary * * * * * * * * * * ** Age Salary
25, 60 25, , , 75 45, 60 50, , , , , , ,
Searching A grid directory consists of a k- dimensional array (grid array) and k one- dimensional arrays (linear scales). A grid directory consists of a k- dimensional array (grid array) and k one- dimensional arrays (linear scales). To search for a record: To search for a record: determine the positions of the record in each of the dimensions according to the linear scales determine the positions of the record in each of the dimensions according to the linear scales locate the proper bucket in the grid array locate the proper bucket in the grid array access the data block access the data block
Insertion Locate the bucket for the new record, then place the record in the block of the bucket if there is room. Locate the bucket for the new record, then place the record in the block of the bucket if there is room. If no room, two general approaches: If no room, two general approaches: add an overflow block as needed; add an overflow block as needed; refine the grid partition by splitting blocks; there is a choice of dimension and point of split. refine the grid partition by splitting blocks; there is a choice of dimension and point of split.
Performance Assumption: Assumption: the bucket matrix can be kept in main memory the bucket matrix can be kept in main memory the array of partitioning values in each dimension can be kept in main memory the array of partitioning values in each dimension can be kept in main memory Point query Point query the number of I/Os is what is necessary to read the bucket. the number of I/Os is what is necessary to read the bucket. For insertion and deletion, an additional disk write is needed. For insertion and deletion, an additional disk write is needed.
More about Grid File Partial-match query Partial-match query Range query Range query Nearest-neighbor query Nearest-neighbor query Reference: Reference: J. Nievergelt, et al., The grid file: an adaptable, symmetric, multikey file structure, ACM Trans. on Database Systems 9:1(1984), pp J. Nievergelt, et al., The grid file: an adaptable, symmetric, multikey file structure, ACM Trans. on Database Systems 9:1(1984), pp