Multidimensional Index Structures One dimensional index structures assume a single search key, and...
-
Upload
morgan-bond -
Category
Documents
-
view
217 -
download
1
Transcript of Multidimensional Index Structures One dimensional index structures assume a single search key, and...
![Page 1: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/1.jpg)
Multidimensional Index Multidimensional Index StructuresStructures
One dimensional index structures assume One dimensional index structures assume a single search key, and retrieve records a single search key, and retrieve records that match a given search-key value. (The that match a given search-key value. (The search key can be a single field or a search key can be a single field or a combination of fields.)combination of fields.)
Many applications, e.g. GIS, OLAP, Many applications, e.g. GIS, OLAP, require us to view data as existing in a require us to view data as existing in a space of two or more dimensions.space of two or more dimensions.
![Page 2: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/2.jpg)
Multidimensional Index Multidimensional Index StructuresStructures
The queries to be supported on such data:The queries to be supported on such data: partial-match queriespartial-match queries: specify values for a : specify values for a
subset of the dimensionssubset of the dimensions range queriesrange queries: give the range for each : give the range for each
dimension.dimension. nearest-neighbor queriesnearest-neighbor queries: ask for the closest : ask for the closest
point to the given point.point to the given point.
![Page 3: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/3.jpg)
Grid FileGrid File
The grid file slices the space of points in The grid file slices the space of points in each of the dimensions.each of the dimensions.
Each of the regions can be thought of as a Each of the regions can be thought of as a bucket, and each of the points in that bucket, and each of the points in that region has its record placed in a block region has its record placed in a block belonging to that bucket. If needed, belonging to that bucket. If needed, overflow blocks can be used to increase overflow blocks can be used to increase the size of a bucket.the size of a bucket.
![Page 4: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/4.jpg)
Age Salary 26 60 45 60 50 75 50 100 50 120 70 110 85 140 30 260 25 400 45 350 50 275 60 260
*
**
** *
***
*
**
0 40 55 100
500
225
90
0
Age
Salary
![Page 5: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/5.jpg)
25, 60
25, 400
30, 260
50, 75
45, 60
50, 120
50, 100
50, 275
85, 140
70, 110
45, 350
60, 260
0-40 40-55 55+ 225+
90-225
0-90
![Page 6: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/6.jpg)
SearchingSearching
A grid directory consists of a A grid directory consists of a kk--dimensional array (dimensional array (grid arraygrid array) and k one-) and k one-dimensional arrays (dimensional arrays (linear scaleslinear scales).).
To search for a record:To search for a record: determine the positions of the record in each determine the positions of the record in each
of the dimensions according to the of the dimensions according to the linear linear scalesscales
locate the proper bucket in the locate the proper bucket in the grid arraygrid array access the data blockaccess the data block
![Page 7: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/7.jpg)
InsertionInsertion
Locate the bucket for the new record, then Locate the bucket for the new record, then place the record in the block of the bucket place the record in the block of the bucket if there is room.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; refine the grid partition by splitting blocks;
there is a choice of dimension and point of there is a choice of dimension and point of split.split.
![Page 8: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/8.jpg)
PerformancePerformance
Assumption:Assumption: the bucket matrix can be kept in main memorythe bucket matrix can be kept in main memory the array of partitioning values in each the array of partitioning values in each
dimension can be kept in main memorydimension can be kept in main memory Point queryPoint query
the number of I/O’s is what is necessary to the number of I/O’s is what is necessary to read the bucket. read the bucket.
For insertion and deletion, an additional disk For insertion and deletion, an additional disk write is needed.write is needed.
![Page 9: Multidimensional Index Structures One dimensional index structures assume a single search key, and retrieve records that match a given search-key value.](https://reader036.fdocuments.us/reader036/viewer/2022082604/5513bc605503463a298b475a/html5/thumbnails/9.jpg)
More about Grid FileMore about Grid File
Partial-match queryPartial-match query Range queryRange query Nearest-neighbor queryNearest-neighbor query Reference:Reference:
J. Nievergelt, et al., “The grid file: an J. Nievergelt, et al., “The grid file: an adaptable, symmetric, multikey file structure”, adaptable, symmetric, multikey file structure”, ACM Trans. on Database Systems 9:1(1984), ACM Trans. on Database Systems 9:1(1984), pp. 38-71.pp. 38-71.