Title: CSIS7101 Advanced Database Technologies
1CSIS7101 Advanced Database Technologies
- Spatio-Temporal Data (Part 2)
- Indexing the Position of Continuously Moving
Objects
Kwong Chi Ho Leo Wong Chi Kwong Simon Lui, Tak
Sing Arthur
2Why are we interested?
- Recent advances in technology have made available
mass amount of spatiotemporal data - GPS
- Mobile phone
- New possibilities in various applications
- Location aware services
- Vehicle navigation, tracking and monitoring
3Challenges
- Conventional database systems assume that data
are static unless explicitly updated - Very frequent update needed under this assumption
4Successful Criteria
- Mere advance in time does not necessitate
explicit update - A function of time that express the position of
objects should be stored
5Possible Approaches
- Indexing d dimensional space in (d1) dimensional
space (with time as the added dimension)
6Possible Approaches
- Indexing d dimensional space in (d1) dimensional
space (with time as the added dimension) - Map the trajectories to points in higher
dimensional spaces - As in Indexing Mobile Objects
7Possible Approaches
- Indexing d dimensional space in (d1) dimensional
space (with time as the added dimension) - Map the trajectories to points in higher
dimensional spaces - Index in d dimensional space but parameterizing
the index by velocity vectors - TPR Tree
8Problem Description
- Original problem definition is in d dimension
- A simplified 1 dimension definition will be given
here - x - position of an object
- t - time
- v - velocity of an object
- x(tref) position of an object at a reference
time - x(t) position of an object at a specific time
t x(tref) v (t - tref)
9Query Types
- More symbols
- Q query
- R a range (x? - min x , x? - max x)
- Timeslice query
- Q (R, t)
- Window query
- Q (R, t?, t?)
- Moving query
- Q (R1, R2, t?, t?)
10Problem Illustration
11Basic Approach
- R-tree based (with RTree optimization)
- Bounding interval (equivalent to bounding
rectangle in R-tree) - Bounding interval as a function of time
12Bounding Intervals
- What is the bounding interval from tref to t?
x
O1
O2
t
tref
13Bounding Intervals
- What is the bounding interval from tref to t?
14Bounding Intervals
- Absolute bounding interval is time-consuming to
construct and it is cannot be easily expressed as
a function of time - A conservative bounding interval is introduced to
solve the problem
15Conservative Bounding intervals
16Conservative Bounding intervals
- A bounding interval as a function of time
t
17TPR tree
- Replacing the Minimum Bounding Rectangle with
Conservative Bounding interval..
18Querying
- Same as R-Tree, only the checking for overlap is
adapted - Timeslice query (a?,a?, tq)
- Substitute tq into the bounding interval formula
- Check against a?,a?
- Window query
- A special case of Moving query
- Moving query
- Q (R1, R2, t?, t?) (a?,a?, a?(t?), a?(t?),
t?, t?)
19Moving Query
Query
x
x?
a?(t?)
x?
a?(t?)
a?
a?
t
t?
t?
20Moving Query
Query
x
x?(t?)
x?(t?)
Substitute t?, t? to bounding interval to get
x?(t?), x?(t?), x?(t?), x?(t?)
x?
x?
x?(t?)
x?(t?)
t
t?
t?
21Moving Query
Query
x
a?
No intersection only when the query is above the
bounding interval a? gt x?(t?) ? a?(t?) gt x?(t?)
a?(t?)
x?
x?
x?(t?)
x?(t?)
t
t?
t?
22Moving Query
x
Query
or when the query is below the bounding
interval a? lt x?(t?) ? a?(t?) lt x?(t?)
x?
x?
x?(t?)
x?(t?)
a?
a?(t?)
t
t?
t?
23Moving Query
Query
For dimension of more than 1, an overlapping
interval tj?, tj? is found for each dimension
j. There is overlapping if there exists an
overlapping interval for all j and their
intersection of is not empty
xj
xj?
xj?
t
t?
t?
tj?
tj?
24Performance Tuning
- Indexing updating
- Tree organization
- Insertion and deletion
25Time Horizon
- Querying window (W)
- How far queries can look into the future
- Index usage time (U)
- Time interval during which an index will be used
- Time horizon (H)
- index usage time querying window
H U W
W
tl
Iss(Q)
t
U
26Index Updating
- Bounding intervals tend to enlarge over time
x
O1
Updating half of the objects in index usage time
U is shown to yield good performance
O2
Individual object can be updated without
affecting the integrity of the tree
t
tref
27Tree Organization
- Objective functions used in RTree
- Areas of bounding rectangles
- Perimeters of bounding rectangles
- Overlapping of bounding rectangles
- Distances between center of bounding rectangles
- Let A(t) one of the above objective functions
- In TPR tree, the following will be minimized
instead
28Insertion and Deletion
- Original RTree algorithms will be used
- Except that
- The integrals of the objective functions will be
used - When splitting a node, sorting along the time
axis is also considered
29Conclusions
- TPR tree is designed to index the current and
anticipated future locations of moving points - TPR tree is based on RTree with bounding
rectangles replaces by bounding intervals, which
are functions of time - Timeslice query, window query and moving query
are supported - Future work includes performance tuning, apply
TPR tree framework to index historical data and
other query types on TPR tree.
30Reference
- Saltenis, S., Jensen, C., Leutenegger, S., Lopez,
M. Indexing the Position of Continuously Moving
Objects. ACM SIGMOD, 2000.
31Appendix 1 Query in d dimensional spaces
Query
xj
tj?, tj? can be found by solving the
appropriate simultaneous equations
xj?
xj?
t
t?
t?
tj?
tj?
32Appendix 1 Query in d dimensional spaces
Note that x and t are variables, the others are
constants
Slope w?
xj
xj?
x a? w? t
xj?
x a? w? t
x x?(tref) v? (t - tref)
x x?(tref) v? (t - tref)
Slope w?
t
t?
t?
tj?
tj?
33Appendix 1 Query in d dimensional spaces
Query
Solving for tj?
xj
If aj? gt x?(t?) tj? t? (xj?(t?) - aj?) /
(wj? - vj?)
xj?
xj?
t
t?
t?
tj?
tj?
34Appendix 1 Query in d dimensional spaces
Query
Solving for tj?
xj
If aj? gt x?(t?) tj? t? (xj?(t?) - aj?) /
(wj? - vj?)
xj?
xj?
t
t?
t?
tj?
tj?
35Appendix 1 Query in d dimensional spaces
Query
Solving for tj?
xj
Otherwise tj? t? Note that the
non-overlapping cases have been eliminated
xj?
xj?
t
t?
t?
tj?
tj?
36Appendix 1 Query in d dimensional spaces
Query
Solving for tj?
xj
If aj?(t?) gt x?(t?) tj? t? (xj?(t?) - aj?)
/ (wj? - vj?)
xj?
xj?
t
t?
t?
tj?
tj?
37Appendix 1 Query in d dimensional spaces
Query
Solving for tj?
xj
If aj?(t?) lt x?(t?) tj? t? (xj?(t?) - aj?)
/ (wj? - vj?)
xj?
xj?
t
t?
t?
tj?
tj?
38Appendix 1 Query in d dimensional spaces
Query
Solving for tj?
xj
Otherwise tj? t? Note that the
non-overlapping cases have been eliminated
xj?
xj?
t
t?
t?
tj?
tj?
39Appendix 1 Query in d dimensional spaces
t? (xj?(t?) - aj?) / (wj? - vj?) If
aj? gt x?(t?) t? (xj?(t?) - aj?) / (wj? - vj?)
If aj? gt x?(t?) t?
Otherwise
tj?
t? (xj?(t?) - aj?) / (wj? - vj?) If
aj? gt x?(t?) t? (xj?(t?) - aj?) / (wj? - vj?)
If aj? gt x?(t?) t?
Otherwise
tj ?
40Appendix 2 Objective function integrals
- Area of overlapping between 2 bounding interval
xj
Another bounding interval
By solving for the blue lines, the overlapping
area is divided into at most 3 parts. The area
of each part can then be calculated
xj?
xj?
1
2
3
t
t?
t?
tj?
tj?