Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMU SCS 15-826: Multimedia Databases and Data Mining Lecture #6: Spatial Access Methods Part III: R-trees C. Faloutsos.

Similar presentations


Presentation on theme: "CMU SCS 15-826: Multimedia Databases and Data Mining Lecture #6: Spatial Access Methods Part III: R-trees C. Faloutsos."— Presentation transcript:

1 CMU SCS 15-826: Multimedia Databases and Data Mining Lecture #6: Spatial Access Methods Part III: R-trees C. Faloutsos

2 CMU SCS 15-826Copyright: C. Faloutsos (2014)#2 Must-read material MM-Textbook, Chapter 5.2 Ramakrinshan+Gehrke, Chapter 28.6 Guttman, A. (June 1984). R-Trees: A Dynamic Index Structure for Spatial Searching. Proc. ACM SIGMOD, Boston, Mass.R-Trees: A Dynamic Index Structure for Spatial Searching

3 CMU SCS 15-826Copyright: C. Faloutsos (2014)#3 R-trees – impact: Popular method; like multi-d B-trees guaranteed utilization; fast search (low dim’s) Used in practice: –Oracle spatial (R-tree default; z-order, too) docs.oracle.com/html/A88805_01/sdo_intr.htm –IBM-DB2 spatial extender –Postgres: create index … using [ rtree | gist ] –Sqlite3: www.sqlite.org/rtree.html www.sqlite.org/rtree.html

4 CMU SCS 15-826Copyright: C. Faloutsos (2014)#4 Outline Goal: ‘Find similar / interesting things’ Intro to DB Indexing - similarity search Data Mining

5 CMU SCS 15-826Copyright: C. Faloutsos (2014)#5 Indexing - Detailed outline primary key indexing secondary key / multi-key indexing spatial access methods –problem dfn –z-ordering –R-trees –... text...

6 CMU SCS 15-826Copyright: C. Faloutsos (2014)#6 Indexing - more detailed outline R-trees –main idea; file structure –algorithms: insertion/split –deletion –search: range, nn, spatial joins –performance analysis –variations (packed; hilbert;...)

7 CMU SCS 15-826Copyright: C. Faloutsos (2014)#7 Reminder: problem Given a collection of geometric objects (points, lines, polygons,...) organize them on disk, to answer spatial queries (range, nn, etc)

8 CMU SCS 15-826Copyright: C. Faloutsos (2014)#8 R-trees z-ordering: cuts regions to pieces -> dup. elim. how could we avoid that? Idea: try to extend/merge B-trees and k-d trees

9 CMU SCS 15-826Copyright: C. Faloutsos (2014)#9 (first attempt: k-d-B-trees) [Robinson, 81]: if f is the fanout, split point- set in f parts; and so on, recursively

10 CMU SCS 15-826Copyright: C. Faloutsos (2014)#10 (first attempt: k-d-B-trees) But: insertions/deletions are tricky (splits may propagate downwards and upwards) no guarantee on space utilization

11 CMU SCS 15-826Copyright: C. Faloutsos (2014)#11 R-trees [Guttman 84] Main idea: allow parents to overlap! Antonin Guttman [http://www.baymoon.com/~tg2/]

12 CMU SCS 15-826Copyright: C. Faloutsos (2014)#12 R-trees [Guttman 84] Main idea: allow parents to overlap! –=> guaranteed 50% utilization –=> easier insertion/split algorithms. –(only deal with Minimum Bounding Rectangles - MBRs)

13 CMU SCS 15-826Copyright: C. Faloutsos (2014)#13 R-trees eg., w/ fanout 4: group nearby rectangles to parent MBRs; each group -> disk page A B C D E F G H I J

14 CMU SCS 15-826Copyright: C. Faloutsos (2014)#14 R-trees eg., w/ fanout 4: A B C D E F G H I J P1 P2 P3 P4 FGDEHIJABC

15 CMU SCS 15-826Copyright: C. Faloutsos (2014)#15 R-trees eg., w/ fanout 4: A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC

16 CMU SCS 15-826Copyright: C. Faloutsos (2014)#16 R-trees - format of nodes {(MBR; obj-ptr)} for leaf nodes P1P2P3P4 ABC x-low; x-high y-low; y-high... obj ptr...

17 CMU SCS 15-826Copyright: C. Faloutsos (2014)#17 R-trees - format of nodes {(MBR; node-ptr)} for non-leaf nodes P1P2P3P4 ABC x-low; x-high y-low; y-high... node ptr...

18 CMU SCS 15-826Copyright: C. Faloutsos (2014)#18 R-trees - range search? A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC

19 CMU SCS 15-826Copyright: C. Faloutsos (2014)#19 R-trees - range search? A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC

20 CMU SCS 15-826Copyright: C. Faloutsos (2014)#20 R-trees - range search Observations: every parent node completely covers its ‘children’ a child MBR may be covered by more than one parent - it is stored under ONLY ONE of them. (ie., no need for dup. elim.)

21 CMU SCS 15-826Copyright: C. Faloutsos (2014)#21 R-trees - range search Observations - cont’d a point query may follow multiple branches. everything works for any dimensionality

22 CMU SCS 15-826Copyright: C. Faloutsos (2014)#22 Indexing - more detailed outline R-trees –main idea; file structure –algorithms: insertion/split –deletion –search: range, nn, spatial joins –performance analysis –variations (packed; hilbert;...)

23 CMU SCS 15-826Copyright: C. Faloutsos (2014)#23 R-trees - insertion eg., rectangle ‘X’ A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC X

24 CMU SCS 15-826Copyright: C. Faloutsos (2014)#24 R-trees - insertion eg., rectangle ‘X’ A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC X X

25 CMU SCS 15-826Copyright: C. Faloutsos (2014)#25 R-trees - insertion eg., rectangle ‘Y’ A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC Y

26 CMU SCS 15-826Copyright: C. Faloutsos (2014)#26 R-trees - insertion eg., rectangle ‘Y’: extend suitable parent. A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC Y Y

27 CMU SCS 15-826Copyright: C. Faloutsos (2014)#27 R-trees - insertion eg., rectangle ‘Y’: extend suitable parent. Q: how to measure ‘suitability’?

28 CMU SCS 15-826Copyright: C. Faloutsos (2014)#28 R-trees - insertion eg., rectangle ‘Y’: extend suitable parent. Q: how to measure ‘suitability’? A: by increase in area (volume) (more details: later, under ‘performance analysis’) Q: what if there is no room? how to split?

29 CMU SCS 15-826Copyright: C. Faloutsos (2014)#29 R-trees - insertion eg., rectangle ‘W’ A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC W K K

30 CMU SCS 15-826Copyright: C. Faloutsos (2014)#30 R-trees - insertion eg., rectangle ‘W’ - focus on ‘P1’ - how to split? A B C P1 W K

31 CMU SCS 15-826Copyright: C. Faloutsos (2014)#31 R-trees - insertion eg., rectangle ‘W’ - focus on ‘P1’ - how to split? A B C P1 W K (A1: plane sweep, until 50% of rectangles) A2: ‘linear’ split A3: quadratic split A4: exponential split

32 CMU SCS 15-826Copyright: C. Faloutsos (2014)#32 R-trees - insertion & split pick two rectangles as ‘seeds’; assign each rectangle ‘R’ to the ‘closest’ ‘seed’ seed1 seed2 R

33 CMU SCS 15-826Copyright: C. Faloutsos (2014)#33 R-trees - insertion & split pick two rectangles as ‘seeds’; assign each rectangle ‘R’ to the ‘closest’ ‘seed’ Q: how to measure ‘closeness’?

34 CMU SCS 15-826Copyright: C. Faloutsos (2014)#34 R-trees - insertion & split pick two rectangles as ‘seeds’; assign each rectangle ‘R’ to the ‘closest’ ‘seed’ Q: how to measure ‘closeness’? A: by increase of area (volume)

35 CMU SCS 15-826Copyright: C. Faloutsos (2014)#35 R-trees - insertion & split pick two rectangles as ‘seeds’; assign each rectangle ‘R’ to the ‘closest’ ‘seed’ seed1 seed2 R

36 CMU SCS 15-826Copyright: C. Faloutsos (2014)#36 R-trees - insertion & split pick two rectangles as ‘seeds’; assign each rectangle ‘R’ to the ‘closest’ ‘seed’ seed1 seed2 R

37 CMU SCS 15-826Copyright: C. Faloutsos (2014)#37 R-trees - insertion & split pick two rectangles as ‘seeds’; assign each rectangle ‘R’ to the ‘closest’ ‘seed’ smart idea: pre-sort rectangles according to delta of closeness (ie., schedule easiest choices first!)

38 CMU SCS 15-826Copyright: C. Faloutsos (2014)#38 R-trees - insertion - pseudocode decide which parent to put new rectangle into (‘closest’ parent) if overflow, split to two, using (say,) the quadratic split algorithm –propagate the split upwards, if necessary update the MBRs of the affected parents.

39 CMU SCS 15-826Copyright: C. Faloutsos (2014)#39 R-trees - insertion - observations many more split algorithms exist (next!)

40 CMU SCS 15-826Copyright: C. Faloutsos (2014)#40 Indexing - more detailed outline R-trees –main idea; file structure –algorithms: insertion/split –deletion –search: range, nn, spatial joins –performance analysis –variations (packed; hilbert;...)

41 CMU SCS 15-826Copyright: C. Faloutsos (2014)#41 R-trees - deletion delete rectangle if underflow –??

42 CMU SCS 15-826Copyright: C. Faloutsos (2014)#42 R-trees - deletion delete rectangle if underflow –temporarily delete all siblings (!); –delete the parent node and –re-insert them

43 CMU SCS 15-826Copyright: C. Faloutsos (2014)#43 R-trees - deletion variations: later (eg. Hilbert R-trees w/ 2-to- 1 merge)

44 CMU SCS 15-826Copyright: C. Faloutsos (2014)#44 Indexing - more detailed outline R-trees –main idea; file structure –algorithms: insertion/split –deletion –search: range, nn, spatial joins –performance analysis –variations (packed; hilbert;...)

45 CMU SCS 15-826Copyright: C. Faloutsos (2014)#45 R-trees - range search pseudocode: check the root for each branch, if its MBR intersects the query rectangle apply range-search (or print out, if this is a leaf)

46 CMU SCS 15-826Copyright: C. Faloutsos (2014)#46 R-trees - nn search A B C D E F G H I J P1 P2 P3 P4 q

47 CMU SCS 15-826Copyright: C. Faloutsos (2014)#47 R-trees - nn search Q: How? (find near neighbor; refine...) A B C D E F G H I J P1 P2 P3 P4 q

48 CMU SCS 15-826Copyright: C. Faloutsos (2014)#48 R-trees - nn search A1: depth-first search; then, range query A B C D E F G H I J P1 P2 P3 P4 q

49 CMU SCS 15-826Copyright: C. Faloutsos (2014)#49 R-trees - nn search A1: depth-first search; then, range query A B C D E F G H I J P1 P2 P3 P4 q

50 CMU SCS 15-826Copyright: C. Faloutsos (2014)#50 R-trees - nn search A1: depth-first search; then, range query A B C D E F G H I J P1 P2 P3 P4 q

51 CMU SCS 15-826Copyright: C. Faloutsos (2014)#51 R-trees - nn search A2: [Roussopoulos+, sigmod95]: –priority queue, with promising MBRs, and their best and worst-case distance main idea:

52 CMU SCS 15-826Copyright: C. Faloutsos (2014)#52 R-trees - nn search A B C D E F G H I J P1 P2 P3 P4 q consider only P2 and P4, for illustration

53 CMU SCS 15-826Copyright: C. Faloutsos (2014)#53 R-trees - nn search D E H J P2 P4 q worst of P2 best of P4 => P4 is useless for 1-nn

54 CMU SCS 15-826Copyright: C. Faloutsos (2014)#54 R-trees - nn search D E H J P2 P4 q worst of P2 best of P4 => P4 is useless for 1-nn

55 CMU SCS 15-826Copyright: C. Faloutsos (2014)#55 R-trees - nn search D E P2 q worst of P2 what is really the worst of, say, P2?

56 CMU SCS 15-826Copyright: C. Faloutsos (2014)#56 R-trees - nn search P2 q what is really the worst of, say, P2? A: the smallest of the two red segments!

57 CMU SCS 15-826Copyright: C. Faloutsos (2014)#57 R-trees - nn search variations: [Hjaltason & Samet] incremental nn: –build a priority queue –scan enough of the tree, to make sure you have the k nn –to find the (k+1)-th, check the queue, and scan some more of the tree ‘optimal’ (but, may need too much memory)

58 CMU SCS 15-826Copyright: C. Faloutsos (2014)#58 Indexing - more detailed outline R-trees –main idea; file structure –algorithms: insertion/split –deletion –search: range, nn, spatial joins –performance analysis –variations (packed; hilbert;...)

59 CMU SCS 15-826Copyright: C. Faloutsos (2014)#59 R-trees - spatial joins Spatial joins: find (quickly) all counties intersecting lakes

60 CMU SCS 15-826Copyright: C. Faloutsos (2014)#60 R-trees - spatial joins Spatial joins: find (quickly) all counties intersecting lakes

61 CMU SCS 15-826Copyright: C. Faloutsos (2014)#61 R-trees - spatial joins Spatial joins: find (quickly) all counties intersecting lakes

62 CMU SCS 15-826Copyright: C. Faloutsos (2014)#62 R-trees - spatial joins Assume that they are both organized in R-trees:

63 CMU SCS 15-826Copyright: C. Faloutsos (2014)#63 R-trees - spatial joins Assume that they are both organized in R-trees:

64 CMU SCS 15-826Copyright: C. Faloutsos (2014)#64 R-trees - spatial joins for each parent P1 of tree T1 for each parent P2 of tree T2 if their MBRs intersect, process them recursively (ie., check their children)

65 CMU SCS 15-826Copyright: C. Faloutsos (2014)#65 R-trees - spatial joins Improvements - variations: - [Seeger+, sigmod 92]: do some pre-filtering; do plane-sweeping to avoid N1 * N2 tests for intersection - [Lo & Ravishankar, sigmod 94]: ‘seeded’ R-trees (FYI, many more papers on spatial joins, without R- trees: [Koudas+ Sevcik], e.t.c.)

66 CMU SCS 15-826Copyright: C. Faloutsos (2014)#66 Indexing - more detailed outline R-trees –main idea; file structure –algorithms: insertion/split –deletion –search: range, nn, spatial joins –performance analysis –variations (packed; hilbert;...)

67 CMU SCS 15-826Copyright: C. Faloutsos (2014)#67 R-trees - performance analysis How many disk (=node) accesses we’ll need for –range –nn –spatial joins why does it matter?

68 CMU SCS 15-826Copyright: C. Faloutsos (2014)#68 R-trees - performance analysis How many disk (=node) accesses we’ll need for –range –nn –spatial joins why does it matter? A: because we can design split etc algorithms accordingly; also, do query- optimization

69 CMU SCS 15-826Copyright: C. Faloutsos (2014)#69 R-trees - performance analysis How many disk (=node) accesses we’ll need for –range –nn –spatial joins why does it matter? A: because we can design split etc algorithms accordingly; also, do query- optimization

70 CMU SCS 15-826Copyright: C. Faloutsos (2014)#70 R-trees - performance analysis motivating question: on, e.g., split, should we try to minimize the area (volume)? the perimeter? the overlap? or a weighted combination? why?

71 CMU SCS 15-826Copyright: C. Faloutsos (2014)#71 R-trees - performance analysis How many disk accesses for range queries? –query distribution wrt location? – “ “ wrt size?

72 CMU SCS 15-826Copyright: C. Faloutsos (2014)#72 R-trees - performance analysis How many disk accesses for range queries? –query distribution wrt location? uniform; (biased) – “ “ wrt size? uniform

73 CMU SCS 15-826Copyright: C. Faloutsos (2014)#73 R-trees - performance analysis easier case: we know the positions of parent MBRs, eg:

74 CMU SCS 15-826Copyright: C. Faloutsos (2014)#74 R-trees - performance analysis How many times will P1 be retrieved (unif. queries)? P1 x1 x2

75 CMU SCS 15-826Copyright: C. Faloutsos (2014)#75 R-trees - performance analysis How many times will P1 be retrieved (unif. POINT queries)? P1 x1 x2 01 0 1

76 CMU SCS 15-826Copyright: C. Faloutsos (2014)#76 R-trees - performance analysis How many times will P1 be retrieved (unif. POINT queries)? A: x1*x2 P1 x1 x2 01 0 1

77 CMU SCS 15-826Copyright: C. Faloutsos (2014)#77 R-trees - performance analysis How many times will P1 be retrieved (unif. queries of size q1xq2)? P1 x1 x2 01 0 1 q1 q2

78 CMU SCS 15-826Copyright: C. Faloutsos (2014)#78 R-trees - performance analysis How many times will P1 be retrieved (unif. queries of size q1xq2)? P1 x1 x2 q1 q2

79 CMU SCS 15-826Copyright: C. Faloutsos (2014)#79 R-trees - performance analysis How many times will P1 be retrieved (unif. queries of size q1xq2)? P1

80 CMU SCS 15-826Copyright: C. Faloutsos (2014)#80 R-trees - performance analysis How many times will P1 be retrieved (unif. queries of size q1xq2)? P1 x2 q2 x1q1

81 CMU SCS 15-826Copyright: C. Faloutsos (2014)#81 R-trees - performance analysis How many times will P1 be retrieved (unif. queries of size q1xq2)? A: (x1+q1)*(x2+q2) P1 x2 q2 x1q1

82 CMU SCS 15-826Copyright: C. Faloutsos (2014)#82 R-trees - performance analysis Thus, given a tree with N nodes (i=1,... N) we expect #DiskAccesses(q1,q2) = sum ( x i,1 + q1) * (x i,2 + q2) = sum ( x i,1 * x i,2 ) + q2 * sum ( x i,1 ) + q1* sum ( x i,2 ) q1* q2 * N

83 CMU SCS 15-826Copyright: C. Faloutsos (2014)#83 R-trees - performance analysis Thus, given a tree with N nodes (i=1,... N) we expect #DiskAccesses(q1,q2) = sum ( x i,1 + q1) * (x i,2 + q2) = sum ( x i,1 * x i,2 ) + q2 * sum ( x i,1 ) + q1* sum ( x i,2 ) q1* q2 * N ‘volume’ surface area count

84 CMU SCS 15-826Copyright: C. Faloutsos (2014)#84 R-trees - performance analysis Observations: for point queries: only volume matters for horizontal-line queries: (q2=0): vertical length matters for large queries (q1, q2 >> 0): the count N matters

85 CMU SCS 15-826Copyright: C. Faloutsos (2014)#85 R-trees - performance analysis Observations (cont’ed) overlap: does not seem to matter formula: easily extendible to n dimensions (for even more details: [Pagel +, PODS93], [Kamel+, CIKM93]) Berndt-Uwe Pagel

86 CMU SCS 15-826Copyright: C. Faloutsos (2014)#86 R-trees - performance analysis Conclusions: splits should try to minimize area and perimeter ie., we want few, small, square-like parent MBRs rule of thumb: shoot for queries with q1=q2 = 0.1 (or =0.5 or so).

87 CMU SCS 15-826Copyright: C. Faloutsos (2014)#87 R-trees - performance analysis How many disk (=node) accesses we’ll need for –range –nn –spatial joins

88 CMU SCS 15-826Copyright: C. Faloutsos (2014)#88 R-trees - performance analysis Range queries - how many disk accesses, if we just now that we have - N points in n-d space? A: ?

89 CMU SCS 15-826Copyright: C. Faloutsos (2014)#89 R-trees - performance analysis Range queries - how many disk accesses, if we just now that we have - N points in n-d space? A: can not tell! need to know distribution

90 CMU SCS 15-826Copyright: C. Faloutsos (2014)#90 R-trees - performance analysis What are obvious and/or realistic distributions?

91 CMU SCS 15-826Copyright: C. Faloutsos (2014)#91 R-trees - performance analysis What are obvious and/or realistic distributions? A: uniform A: Gaussian / mixture of Gaussians A: self-similar / fractal. Fractal dimension ~ intrinsic dimension

92 CMU SCS 15-826Copyright: C. Faloutsos (2014)#92 R-trees - performance analysis Formulas for range queries and k-nn queries: use fractal dimension [Kamel+, PODS94], [Korn+ ICDE2000] [Kriegel+, PODS97]

93 CMU SCS 15-826Copyright: C. Faloutsos (2014)#93 Indexing - more detailed outline R-trees –main idea; file structure –algorithms: insertion/split –deletion –search: range, nn, spatial joins –performance analysis –variations (packed; hilbert;...)

94 CMU SCS 15-826Copyright: C. Faloutsos (2014)#94 R-trees - variations Guttman’s R-trees sparked much follow-up work can we do better splits? what about static datasets (no ins/del/upd)? what about other bounding shapes?

95 CMU SCS 15-826Copyright: C. Faloutsos (2014)#95 R-trees - variations Guttman’s R-trees sparked much follow-up work can we do better splits? –i.e, defer splits?

96 CMU SCS 15-826Copyright: C. Faloutsos (2014)#96 R-trees - variations A: R*-trees [Beckmann+, SIGMOD90] Norbert Beckmann Hans Peter Kriegel Ralf Schneider Bernhard Seeger Popular

97 CMU SCS 15-826Copyright: C. Faloutsos (2014)#97 R-trees - variations A: R*-trees [Beckmann+, SIGMOD90] defer splits, by forced-reinsert, i.e.: instead of splitting, temporarily delete some entries, shrink overflowing MBR, and re-insert those entries Which ones to re-insert? How many?

98 CMU SCS 15-826Copyright: C. Faloutsos (2014)#98 R-trees - variations A: R*-trees [Beckmann+, SIGMOD90] defer splits, by forced-reinsert, i.e.: instead of splitting, temporarily delete some entries, shrink overflowing MBR, and re-insert those entries Which ones to re-insert? How many? A: 30%

99 CMU SCS 15-826Copyright: C. Faloutsos (2014)#99 R-trees - variations Q: Other ways to defer splits?

100 CMU SCS 15-826Copyright: C. Faloutsos (2014)#100 R-trees - variations Q: Other ways to defer splits? A: Push a few keys to the closest sibling node (closest = ??)

101 CMU SCS 15-826Copyright: C. Faloutsos (2014)#101 R-trees - variations R*-trees: Also try to minimize area AND perimeter, in their split. Performance: higher space utilization; faster than plain R-trees. One of the most successful R-tree variants.

102 CMU SCS 15-826Copyright: C. Faloutsos (2014)#102 R-trees - variations Guttman’s R-trees sparked much follow-up work can we do better splits? what about static datasets (no ins/del/upd)? –Hilbert R-trees what about other bounding shapes?

103 CMU SCS 15-826Copyright: C. Faloutsos (2014)#103 R-trees - variations what about static datasets (no ins/del/upd)? Q: Best way to pack points?

104 CMU SCS 15-826Copyright: C. Faloutsos (2014)#104 R-trees - variations what about static datasets (no ins/del/upd)? Q: Best way to pack points? A1: plane-sweep great for queries on ‘x’; terrible for ‘y’

105 CMU SCS 15-826Copyright: C. Faloutsos (2014)#105 R-trees - variations what about static datasets (no ins/del/upd)? Q: Best way to pack points? A1: plane-sweep great for queries on ‘x’; bad for ‘y’

106 CMU SCS 15-826Copyright: C. Faloutsos (2014)#106 R-trees - variations what about static datasets (no ins/del/upd)? Q: Best way to pack points? A1: plane-sweep great for queries on ‘x’; terrible for ‘y’ Q: how to improve?

107 CMU SCS 15-826Copyright: C. Faloutsos (2014)#107 R-trees - variations A: plane-sweep on HILBERT curve!

108 CMU SCS 15-826Copyright: C. Faloutsos (2014)#108 R-trees - variations A: plane-sweep on HILBERT curve! (see [Kamel+, VLDB’94]

109 CMU SCS 15-826Copyright: C. Faloutsos (2014)#109 R-trees - variations Guttman’s R-trees sparked much follow-up work can we do better splits? what about static datasets (no ins/del/upd)? –Hilbert R-trees - main idea –handling regions –performance/discusion what about other bounding shapes? Details

110 CMU SCS 15-826Copyright: C. Faloutsos (2014)#110 R-trees - variations What if we have regions, instead of points? I.e., how to impose a linear ordering (‘h- value’) on rectangles? Details

111 CMU SCS 15-826Copyright: C. Faloutsos (2014)#111 R-trees - variations What if we have regions, instead of points? I.e., how to impose a linear ordering (‘h- value’) on rectangles? A1: h-value of center A2: h-value of 4-d point (center, x-radius, y-radius) A3:... Details

112 CMU SCS 15-826Copyright: C. Faloutsos (2014)#112 R-trees - variations What if we have regions, instead of points? I.e., how to impose a linear ordering (‘h- value’) on rectangles? A1: h-value of center A2: h-value of 4-d point (center, x-radius, y-radius) A3:... Details

113 CMU SCS 15-826Copyright: C. Faloutsos (2014)#113 R-trees - variations with h-values, we can have deferred splits, 2- to-3 splits (3-to-4, etc) experimentally: faster than R*-trees (reference: [Kamel Faloutsos vldb 94]) Details

114 CMU SCS 15-826Copyright: C. Faloutsos (2014)#114 R-trees - variations Guttman’s R-trees sparked much follow-up work can we do better splits? what about static datasets (no ins/del/upd)? what about other bounding shapes? Details

115 CMU SCS 15-826Copyright: C. Faloutsos (2014)#115 R-trees - variations what about other bounding shapes? (and why?) A1: arbitrary-orientation lines (cell-tree, [Guenther] A2: P-trees (polygon trees) (MB polygon: 0, 90, 45, 135 degree lines) Details

116 CMU SCS 15-826Copyright: C. Faloutsos (2014)#116 R-trees - variations A3: L-shapes; holes (hB-tree) A4: TV-trees [Lin+, VLDB-Journal 1994] A5: SR-trees [Katayama+, SIGMOD97] (used in Informedia) Details

117 CMU SCS 15-826Copyright: C. Faloutsos (2014)#117 R-trees - conclusions Popular method; like multi-d B-trees guaranteed utilization; fast search (low dim’s) Used in practice: –Oracle spatial (R-tree default; z-order, too) docs.oracle.com/html/A88805_01/sdo_intr.htm –IBM-DB2 spatial extender –Postgres: create index … using [ rtree | gist ] –Sqlite3: www.sqlite.org/rtree.html www.sqlite.org/rtree.html R* variation is popular

118 CMU SCS 15-826Copyright: C. Faloutsos (2014)#118 References Norbert Beckmann, Hans-Peter Kriegel, Ralf Schneider, Bernhard Seeger: The R*-Tree: An Efficient and Robust Access Method for Points and Rectangles. ACM SIGMOD 1990: 322-331 Guttman, A. (June 1984). R-Trees: A Dynamic Index Structure for Spatial Searching. Proc. ACM SIGMOD, Boston, Mass.

119 CMU SCS 15-826Copyright: C. Faloutsos (2014)#119 References Jagadish, H. V. (May 23-25, 1990). Linear Clustering of Objects with Multiple Attributes. ACM SIGMOD Conf., Atlantic City, NJ. Ibrahim Kamel, Christos Faloutsos: On Packing R-trees, CIKM, 1993 Ibrahim Kamel and Christos Faloutsos, Hilbert R-tree: An improved R-tree using fractals VLDB, Santiago, Chile, Sept. 12-15, 1994, pp. 500-509.Hilbert R-tree: An improved R-tree using fractals Lin, K.-I., H. V. Jagadish, et al. (Oct. 1994). “The TV-tree - An Index Structure for High-dimensional Data.” VLDB Journal 3: 517-542.

120 CMU SCS 15-826Copyright: C. Faloutsos (2014)#120 References, cont’d Pagel, B., H. Six, et al. (May 1993). Towards an Analysis of Range Query Performance. Proc. of ACM SIGACT- SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), Washington, D.C. Robinson, J. T. (1981). The k-D-B-Tree: A Search Structure for Large Multidimensional Dynamic Indexes. Proc. ACM SIGMOD. Roussopoulos, N., S. Kelley, et al. (May 1995). Nearest Neighbor Queries. Proc. of ACM-SIGMOD, San Jose, CA.

121 CMU SCS 15-826Copyright: C. Faloutsos (2014)#121 Other resources Code, papers, datasets etc: www.rtreeportal.org/ Java applets and more info: donar.umiacs.umd.edu/quadtree/points/rtrees.html


Download ppt "CMU SCS 15-826: Multimedia Databases and Data Mining Lecture #6: Spatial Access Methods Part III: R-trees C. Faloutsos."

Similar presentations


Ads by Google