1 / 24

Query Processing in Spatial Network Databases

Query Processing in Spatial Network Databases. presented by Hao Hong. Outline. Introduction Related work Spatial query processing in Euclidean Space Disk-based graph representations- CCAM structure Spatial query in network databases Architecture Spatial queries: Nearest neighbor query

norah
Download Presentation

Query Processing in Spatial Network Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Query Processing in Spatial Network Databases presented by Hao Hong

  2. Outline • Introduction • Related work • Spatial query processing in Euclidean Space • Disk-based graph representations- CCAM structure • Spatial query in network databases • Architecture • Spatial queries: • Nearest neighbor query • Other queries • Performances • Summary

  3. Introduction • Motivation • Euclidean distance vs. network distance • Euclidean distance <= network distance • Conventional spatial queries: • K Nearest neighbor query: retrieves the k ponits closest to the query location • Range query: retrieves the points covered by certain range • Intersection join: retrieves all the intersected points from the query location sets

  4. Outline • Introduction • Related work • Spatial query processing in Euclidean Space • Disk-based graph representations- CCAM structure • Spatial query in network databases • Architecture • Spatial queries: • Nearest neighbor query • Other queries • Performances • Summary

  5. Spatial query processing in Euclidean Space • An R-tree index • Multidimentional extension of B-tree (quoted from Query Processing in Spatial Network Databases) • MBR: Minimum Bounding Rectangle • Spatial points are clustered according to the distances between their MBR • Hereby, R-tree is fast for spatial query

  6. Spatial query processing in Euclidean Space • an example n1 E1 E2 E5 n8 E1 E6 n2 E5 E6 E3 E4 n7 n9 n3 E3 E2 n1 n2 n7 n8 n9 n3 n4 n5 n6 n4 n6 E4 n5

  7. Disk-based graph representations- CCAM structure • A graph can be represented as • An adjacency list • Two-dimensional matrix • The Connectivity-clustered Access Method (CCAM) structure • Stores the single dimensional lists • Stores the lists of neighbor nodes together

  8. Disk-based graph representations- CCAM structure • An example A B-tree in order of node id A graph Disk pages n1 List 1 page1 n1 n4 5 ...... 2 List 5 n2 n5 n1 n2 n3 n4 n5 7 1 List 3 page2 4 ...... n3 6 List 4 Adjacency list of n1 n4 n2 2 n4 7 n5 5 null

  9. Outline • Introduction • Related work • Spatial query processing in Euclidean Space • Disk-based graph representations- CCAM structure • Spatial query in network databases • Architecture • Spatial queries: • Nearest neighbor query • Other queries • Performances • Summary

  10. Architecture • The above example Network R-tree Adjacency component The network List 1 page1 E1 E2 n1 ...... List 5 5 n1 n2 n3 n4 n5 2 n5 n2 E1 List 3 page2 7 ...... 1 Adjacency list of n1 List 4 E2 4 n3 6 page2 2 MBR(n1, n2) page1 7 MBR(n1, n4) page1 5 MBR(n1, n5) n4

  11. Architecture Disk pages Network R-tree listPtr 2 MBR(n1, n2) page1 Adjacency component : Enanle fast access to Neighbor nodes and the corresponding polyline listPtr 7 MBR(n1, n4) E1 E2 listPtr 5 MBR(n1, n5) page2 ... ...... n1 n2 n3 n4 n5 ... ...... ... ... listPtr 4 MBR(n4, n5) MBR(n1, n2) pageN Page2 page1 pageN polyline Component: Stores the endpoints And the MBR of each segment Polyline of n1,n2 MBR(n1, n4) pageN Polyline of n1,n4 MBR(n1, n5) pageN Polyline of n1, n5 pageM ... ... ... ... ... ... ... ... ...

  12. Primitive operations • Check_entity(seg,p): if entity p is covered by seg, then it returns true • Find_segment(p): returns the segment which covers entity p • If there are more than one result, then return the first one • If there is no result, then return the most appoximate one • Find_entities(seg): returns the entities which are covered by the specified segment seg • Compute_ND(p1, p2): returns the network distance between the specified entities p1 and p2 • P1 and p2 are arbitrary points in the network

  13. Outline • Introduction • Related work • Spatial query processing in Euclidean Space • Disk-based graph representations- CCAM structure • Spatial query in network databases • Architecture • Spatial queries: • Nearest neighbor query • Other queries • Performances • Summary

  14. Nearest neighbor query • Incremental Euclidean Restriction (IER) algorithm: Find the first 1 nearest neighbors of location q • Find the Euclidean nearest neighbor n3 • Compute the network distance: dN(q, n3)= Compute_ND(q, n3) • Set dEmax = dN(q, n3) • Repeat the process of retrieving other nodes. To node nk , • if dN(q, nk) < dN(q, n3), then set dEmax = dN(q, nk) • Otherwise, return the node which has set dEmax and stop n1 5 2 n2 n5 7 1 q 4 n3 1 5 n4

  15. Nearest neighbor query • Incremental Euclidean Restriction (IER) algorithm: Find the k nearest neighbors of location q • Has the R-tree sorted in ascending order of their network distance to q • If the kth node is nk, then set dEmax = dN(q, nk) • Repeat the process of retrieving other nodes (nk+1, nk+2, ..., nm) , for node ni, • if dN(q, ni) <= dEmax, then set • dEmax = dN(q, ni) • Insert ni to the queue of k nesrest neighbors • Remove the former kth node • Otherwise, return the node which has set dEmax and stop

  16. Nearest neighbor query • In this case, according to IER algorithm, p5 will be retrieved as the last one, because it has the largest Euclidean distance to q • Quoted from Query Processing in Spatial Network Databases

  17. Nearest neighbor query • Incremental Network Expansion (INE) algorithm • Performe the nodes checking in the order of encounting sequence • Initiate the Q to be (n1, n2), which covers q • Since (n1, n2) doesn‘t cover any entity, expand n1 with n7, and Q = <(n2,5), (n7,12)> • Repeate the expansion • Expand n2 with n4 and n3, Q = <(n4, 7), (n3, 9), (n7, 12)> • Here p5 is covered by segment (n2, n4), set threshold dNmax = dN(q, p5) = 6 • Since the next one in the Q has dN(q, n4) > dNmax , the algorithm terminates, returning p5.

  18. Other queries • Other queries: • Range query • Closest-Pairs • E-distance joins • Provide algorithms which process queries in euclidean space and network spaces

  19. Outline • Introduction • Related work • Spatial query processing in Euclidean Space • Disk-based graph representations- CCAM structure • Spatial query in network databases • Architecture • Spatial queries: • Nearest neighbor query • Other queries • Performances • Summary

  20. Performancess • Experiments comparing between Euclidean restriction (ER) and Network Expansion (NE) • Experimental targets: • Page accesses • CPU cost

  21. Nearest Neighbor Queries Experiments • |S|=the number of the entity set and |N|=the number of segments • When |S| / |N| decrease, the entities among segments are relatively sparse, which relatively increases false hits. Therefore, the amount of network computation is increased. • Quoted from Query Processing in Spatial Network Databases

  22. Outline • Introduction • Related work • Spatial query processing in Euclidean Space • Disk-based graph representations- CCAM structure • Spatial query in network databases • Architecture • Spatial queries: • Nearest neighbor query • Other queries • Performances • Summary

  23. Relating to DE3 project • Our idea: • Spatial network is represented by Oracle Spatial (SDO_Geometry) • Indexing with R-tree • Tracking moving objects with segment-based policy • We have in common: • Processing NN query and Range query in Euclidean space and network space • Using R-tree index • We can borrow the idea: • The network expansion policy

  24. Summary • Strong points • Contribution: the data structure is high efficient • Support more than one query • Weak points • It is not wasy to read, because there are too many brackets among lines.

More Related