Multidimensional Indexes - PowerPoint PPT Presentation

About This Presentation
Title:

Multidimensional Indexes

Description:

Tree Based Indexing Techniques Multiple Key Indexes KD Trees Quad Trees R-Trees ... 60 50, 75 25, 60 Allow multiway ... – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 10
Provided by: Alon75
Category:

less

Transcript and Presenter's Notes

Title: Multidimensional Indexes


1
Multidimensional Indexes
  • Applications geographical databases, data cubes.
  • Types of queries
  • partial match (give only a subset of the
    dimensions)
  • range queries
  • nearest neighbor
  • Where am I? (DB or not DB?)
  • Conventional indexes dont work well here.

2
Indexing Techniques
  • Hash like structures
  • Grid files
  • Partitioned indexing functions
  • Tree like structures
  • Multiple key indexes
  • kd-trees
  • Quad trees
  • R-trees

3
Grid Files
  • Each region in the
  • corresponds to a
  • bucket.
  • Works well even if
  • we only have partial
  • matches
  • Some buckets may
  • be empty.
  • Reorganization requires
  • moving grid lines.
  • Number of buckets
  • grows exponentially
  • with the dimensions.

500K







250K


200K

90K


Salary



10K

0
15
20
35
102
Age
4
Partitioned Hash Functions
  • A hash function produces k bits identifying the
    bucket.
  • The bits are partitioned among the different
    attributes.
  • Example
  • Age produces the first 3 bits of the bucket
    number.
  • Salary produces the last 3 bits.
  • Supports partial matches, but is useless for
    range queries.

5
Tree Based Indexing Techniques
Salary, 150
Age, 60
Age, 47
70, 110
Salary, 300
85, 140













6
Multiple Key Indexes
  • Each level as an index for one
  • of the attributes.
  • Works well for partial matches
  • if the match includes the first
  • attributes.

Index on first attribute
Index on second attribute
7
KD Trees
Adaptation to secondary storage
  • Allow multiway branches
  • at the nodes, or
  • Group interior nodes
  • into blocks.

Salary, 150
Age, 60
Age, 47
50, 275
70, 110
Salary, 80
Salary, 300
60, 260
85, 140
50, 100
Age, 38
50, 120
30, 260
25, 400
45, 350
45, 60
25, 60
50, 75
8
Quad Trees
  • Each interior node corresponds
  • to a square region (or k-dimen)
  • When there are too many points
  • in the region to fit into a block,
  • split it in 4.
  • Access algorithms similar to those
  • of KD-trees.

400K











Salary


0
100
Age
9
R-Trees
  • Interior nodes contain sets
  • of regions.
  • Regions can overlap and not
  • cover all parents region.
  • Typical query
  • Where am I?
  • Can be used to store regions
  • as well as data points.
  • Inserting a new region may
  • involve extending one of the
  • existing regions (minimally).
  • Splitting leaves is also tricky.
Write a Comment
User Comments (0)
About PowerShow.com