240 likes | 569 Views
Bogazici University Computer Engineering Department CmpE 422 Midterm Presentation Koray Kayır. GRID FILES. Increase of Database usage and Integrated I nformation S ystems File structures => efficient access to records How? Combine attribute values (Multikey)
E N D
Bogazici University Computer Engineering Department CmpE 422 Midterm Presentation Koray Kayır GRID FILES
Increase of Database usage and IntegratedInformationSystems File structures => efficient access to records How? Combine attribute values (Multikey) But traditional file structures that provide multikey access to records are extensions of file structures originally designed for single-key access. Thus, they manifest various deficiencies in particular for multikey access to highly dynamic files Multikey Structure
The Grid File • Special kind of hashing • Adaptable: w.r.t. insert/delete • Efficient query handling • Dynamic : Access time is uniform (two-disk-access principle) • Symmetric: No Secondary Key. Every key is the Primary Key • Multikey: records using subset of keys
Useful for range queries that would map into a set of cells corresponding to a group of values along the linear scales. • Can be applied to any number of search keys. • n search keys => n dimensions. • They perform well in terms of reduction in time for multiple key access.
The Grid File – How? • Divide record space into grid blocks
Allocates storage in units of fixed size • Disk blocks/pages/buckets • To map grid blocks to buckets ? • Use grid directory • Two-disk-access: Retrieve single record in at-most 2 disk access • Access directory(grid) • Access Bucket(database) • Efficient range queries
Range Query • [1450-1600, c-g, … , ] • Different buckets?
Next in each direction • Nextxabove: cx = (cx+1) mod nx • Nextxbelow: cx = (cx-1) mod nx • Nextyabove: cy = (cy+1) mod ny • Nextybelow: cy = (cy-1) mod ny
Insertion • Bucket size = 4 • Split it!!!!
Grid File Insertion • Fixed scheduled Dimension splitting is used in this example
Directory Merging • No queries between [a-k] and [0-1500]
Directory Merging • Grid directory is trimmed on merging
Concurrent Access • No root node as in trees(bottleneck if present), allowsconcurrency
Advantages • No special computations are required • Only the right records are retrieved • Can also be used for single search key queries • Easy to extend to queries on n search keys • Significant improvement in processing time for multiple-key queries • Has a two-disk-access upper bound for accessing data • Allows simpler concurrency control protocols
Disadvantages • Imposes space overhead • Performance overhead on insertion and deletion • a frequent reorganization of the file adds to the maintenance cost
References • Jürg Niervergelt, Hans Hinterberger, Kenneth C. Sevcik: The Grid File: An Adaptable, Symmetric Multikey File Structure. ACM Transactions on Database Systems (TODS), Volume 9 (1): 38-71 (1984) • Sang-WookKim, Kyu-Young Whang, Jin-Ho Kim: Linearity in directory growth of the multilevel grid file. Information and Software Technology 39: 897-908(1997) • Colin Arnold, Jason Monast, Grid File Presentation, University of South Florida