11
48 Introduction to R-trees Many real-life applications require the organization and management of multidimensional data (e.g., each image is represented as a point in the 5-dimensional space). To enable efficient query processing, data should be organized by means of an indexing scheme which is used to speed-up processing. The index helps in reducing the number of inspected objects significantly, avoiding the sequential scan of the whole database. Indexing schemes for multidimensional data work in a similar manner to access methods for simple numeric data (e.g., B-trees and Hashing).

R tree

  • Upload
    ddro

  • View
    1

  • Download
    0

Embed Size (px)

DESCRIPTION

R tree

Citation preview

Page 1: R tree

48

Introduction to R-trees

Many real-life applications require the organization and management of multidimensional data (e.g., each image is represented as a point in the 5-dimensional space).

To enable efficient query processing, data should be organized by means of an indexing scheme which is used to speed-up processing.

The index helps in reducing the number of inspected objects significantly, avoiding the sequential scan of the whole database.

Indexing schemes for multidimensional data work in a similar manner to access methods for simple numeric data (e.g., B-trees and Hashing).

Page 2: R tree

49

Introduction to R-trees

One of the most important contributions in the area of multidimensional indexing is due to Antonin Guttman which invented the R-tree.

His work:“R-trees: a dynamic index structure for spatial searching”,ACM SIGMOD Conference 1984

has received more than 2,900 citations(source google scholar)

Page 3: R tree

50

Introduction to R-trees

The R-tree can be viewed as an extension of the B+-tree to handlemultiple dimensions. Recall that, a B+-tree is used to organize numeric data in one dimension only.

8 17 24 30

2 3 5 7 8 14 16 19 20 22 24 27 29 33 34 38 39

root

leaf 1 leaf 2 leaf 3 leaf 4 leaf 5

B+ tree example with 6 nodes:Each node corresponds to a disk page

Page 4: R tree

51

Introduction to R-trees

R-trees have been extensively used in spatial databases to organize points and rectangles. They show excellent performance in processing interesting queries such as:

Range query: return the points that are contained in a specified region.

K-nearest-neighbor: given a point p and an integer k return the k objects closer to p.

Page 5: R tree

52

Introduction to R-trees

range query example:which cities are within distance R from Amsterdam

k-NN query example:Find the 3 cities closer to Utrecht (k = 3)

Page 6: R tree

53

Introduction to R-trees

20 4 6 8 10

2

4

6

8

10

x axis

y axis

b

c

a

d

e f

g h

i j

kl

m

Range query example: “find the objects in a given region”.E.g. find all hotels in Utrecht.

No index: scan through all objects. NOT EFFICIENT!

region of interest

Example:13 points in2 dimensions

Page 7: R tree

54

Introduction to R-trees – structure

20 4 6 8 10

2

4

6

8

10

x axis

y axis

b

c

aE3

a b c d e

E1 E2

E3 E4 E5

Root

E1 E2

E3 E4

f g h

E5

d

e f

g h

i j

kl

m

l m

E7

i j k

E6

E6 E7

Minimum Bounding Rectangle (MBR)

Each node corresponds to a disk page

Page 8: R tree

55

Introduction to R-trees – structure

20 4 6 8 10

2

4

6

8

10

x axis

y axis

b

c

aE3

d

e f

g h

i j

kl

m

E4

E5E6

E7

a b c d e

E1 E2

E3 E4 E5

Root

E1 E2

E3E4

f g h

E5

l m

E7

i j k

E6

E6 E7

Page 9: R tree

56

Introduction to R-trees – structure

20 4 6 8 10

2

4

6

8

10

x axis

y axis

b

c

a

E1d

e f

g h

i j

kl

m

E2

a b c d e

E1 E2

E3 E4 E5

Root

E1 E2

E3E4

f g h

E5

l m

E7

i j k

E6

E6 E7

E3

E4

E5E6

E7

Page 10: R tree

57

Introduction to R-trees – range query

20 4 6 8 10

2

4

6

8

10

x axis

y axis

b

c

a

E1d

e f

g h

i j

kl

m

E2

a b c d e

E1 E2

E3 E4 E5

Root

E1 E2

E3 E4

f g hE5

l m

E7

i j kE6

E6 E7

E3

E4

E5E6

E7

Page 11: R tree

58

Introduction to R-trees – range query

20 4 6 8 10

2

4

6

8

10

x axis

y axis

b

ca

E1d

e f

g h

i j

kl

m

E2

a b c d e

E1 E2

E3 E4 E5

Root

E1 E2

E3 E4

f g hE5

l m

E7

i j kE6

E6 E7

E3

E4

E5E6

E7