View
217
Download
1
Category
Preview:
Citation preview
1
The MV3R-Tree: A Spatio-Temporal Access Method for
Timestamp and Interval Queries
Yufei Tao and Dimitris PapadiasHong Kong University of Science and
Technology
Present by Guangyue Jia
2
Overview
• Motivation
• Related works
• MV3R-tree
• Strong and weak points
• Relation to our project
• Conclusion
3
Motivation
• Spatio-tempral queries are common.– Data: (tid, sid, x1, y1, x2, y2, t1, t2)– Query: space restriction + time restriction
• Timestamp (or timeslice) query and interval query.
• Process both timestamp and interval query efficiently.
4
Overview
• Motivation
• Related works
• MV3R-tree
• Strong and weak points
• Relation to our project
• Conclusion
5
Related works
• MVB-tree: – Multi-version B-tree
• HR-tree– Historical R-tree
• 3D R-tree– 3 Dimension R-tree
6
MVB-tree• Each entry has the form: <key, tstart, tend, point>
– Insertions and deletions only happen at the current time.
• An entry called alive at a timestamp t if tstart <=t<tend
• Multiple roots and each root has a jurisdiction interval: – Minimum bounding lifespan of all the entries in the root.
• Either none or b · pversion entries are alive for each timestamp t and each node except the roots.– Ensures that entries alive at the same timestamps are mostly
grouped together.
Example of MVB-tree
pversion =1/3
b=6
7
Overflow
• Insertion is carried out as B-tree except overflows.
• Weak version overflow: block overflow. And it cause version split.
• number of live entries in a new node must be in the range [b·psvu, b·psvo].
• Strong version overflow: number of live entries exceeds b·psvo.
• Strong version overflow cause key split.
8
Version split
Example of MVB-tree
Example of block overflow and version split
Description:1, When weak version overflow.2, All live entries are copied to a new node.3, tstart modified to the current time.4, tend of the live entries is changed from * to the current time.5, create data redundancy.
Example:
1, insert <28, 4, *> at time 4.
2, A weak version overflow.
3, create new node D and copy the live entries to it.
4, all tstart are set to be 4
5, A ”dies”, all * are replaced by 4.
9
Underflow
• Deletion is carried out as B-tree except underflows.
• Weak version underflow: number of live entries lower than b·pversion
• Strong version underflow: number of live entries becomes lower than b·psvu.
• Underflow: copy sibling node using only its live entries.
10
Mergence and key split
<5, 1, *, A><43, 1, *, B><72, 1, *, C>
<5, 1, *><8, 1, *>
<13, 1, *><25, 1, 3><27, 1, 3><39, 1, 3>
<43, 1, *><48, 1, *><52, 1, 2><59, 1, 3><27, 1, 3><68, 1, 3>
<72, 1, *><78, 1, *><83, 1, *><95, 1, 3><99, 1, *>
<102, 1, *>
Root A B C
1, delete entry <48, 1, *> at timestamp 4.
2, B weak version underflow since only entry <43, 1, *> is alive.
3, copy live entries from sibling node C to C´.
3, insert <43, 4, *> into C´cause strong version overflow.
4, key split and node D and E are created.
pversion =psvu=1/3
psvo=5/6
11
Mergence and key split
<5, 1, *, A><43, 1, *, B><72, 1, *, C>
<5, 1, *><8, 1, *>
<13, 1, *><25, 1, 3><27, 1, 3><39, 1, 3>
<43, 1, *><48, 1, 4><52, 1, 2><59, 1, 3><27, 1, 3><68, 1, 3>
<72, 1, *><78, 1, *><83, 1, *><95, 1, 3><99, 1, *>
<102, 1, *>
Root A B C
1, delete entry <48, 1, *> at timestamp 4.
2, B weak version underflow since only entry <43, 1, *> is alive.
3, copy live entries from sibling node C to C´.
3, insert <43, 4, *> into C´cause strong version overflow.
4, key split and node D and E are created.
pversion =psvu=1/3
psvo=5/6
12
Mergence and key split
<5, 1, *, A><43, 1, *, B><72, 1, *, C><72, 1, *, C´>
<5, 1, *><8, 1, *>
<13, 1, *><25, 1, 3><27, 1, 3><39, 1, 3>
<43, 1, *><48, 1, 4><52, 1, 2><59, 1, 3><27, 1, 3><68, 1, 3>
<72, 1, *><78, 1, *><83, 1, *><95, 1, 3><99, 1, *>
<102, 1, *>
Root A B C
1, delete entry <48, 1, *> at timestamp 4.
2, B weak version underflow since only entry <43, 1, *> is alive.
3, copy live entries from sibling node C to C´.
3, insert <43, 4, *> into C´cause strong version overflow.
4, key split and node D and E are created.
<72, 1, *><78, 1, *><83, 1, *><99, 1, *>
<102, 1, *>
C´
pversion =psvu=1/3
psvo=5/6
13
Mergence and key split
<5, 1, *, A><43, 1, *, B><72, 1, *, C><43, 1, *, C´>
<5, 1, *><8, 1, *>
<13, 1, *><25, 1, 3><27, 1, 3><39, 1, 3>
<43, 1, 4><48, 1, 4><52, 1, 2><59, 1, 3><27, 1, 3><68, 1, 3>
<72, 1, *><78, 1, *><83, 1, *><95, 1, 3><99, 1, *>
<102, 1, *>
Root A B C
1, delete entry <48, 1, *> at timestamp 4.
2, B weak version underflow since only entry <43, 1, *> is alive.
3, copy live entries from sibling node C to C´.
3, insert <43, 4, *> into C´cause strong version overflow.
4, key split and node D and E are created.
<43, 4, *><72, 1, *><78, 1, *><83, 1, *><99, 1, *>
<102, 1, *>
C´
pversion =psvu=1/3
psvo=5/6
14
Mergence and key split
<5, 1, *, A><43, 1, *, B><72, 1, *, C><43, 4, *, D><83, 4, *, E>
<5, 1, *><8, 1, *>
<13, 1, *><25, 1, 3><27, 1, 3><39, 1, 3>
<43, 1, 4><48, 1, 4><52, 1, 2><59, 1, 3><27, 1, 3><68, 1, 3>
<72, 1, *><78, 1, *><83, 1, *><95, 1, 3><99, 1, *>
<102, 1, *>
Root A B C
1, delete entry <48, 1, *> at timestamp 4.
2, B weak version underflow since only entry <43, 1, *> is alive.
3, copy live entries from sibling node C to C´.
3, insert <43, 4, *> into C´cause strong version overflow.
4, key split and node D and E are created.
<43, 4, *><72, 1, *><78, 1, *>
D
<83, 1, *><99, 1, *>
<102, 1, *>
E
pversion =psvu=1/3
psvo=5/6
15
Historical R-tree• The structure maintains an R-tree for each
timestamp.
• Good for timestamp queries.
• Need a lot of space.
Example of an HR-tree
16
3D R-tree
• Good for time interval queries
A timestamp query in 3D R-tree
17
Overview
• Motivation
• Related works
• MV3R-tree
• Strong and weak points
• Relation to our project
• Conclusion
18
MV3R-tree
• Intruduction• MVR-tree• Insertion and overflow handling in MVR-
tree• Reinsertion• Deletion and underflow handling in MVR-
tree• Auxiliary 3D R-tree• Query processing with MV3R-tree
19
Introduction
• An idea to deal with both timestamp and interval queries.• MVR-tree + 3DR-tree
Overview of an MV3R-tree
20
MVR-Tree• Multi-version R-tree.• Can contain multiple R-trees.• Each entry has the form <s, tstart, tend, pointer>
A small MVR-tree with height 2
b=3
pversion=1/3
1, A to G are object boxes.
2, H, I, and J are leaf nodes.
3, C, I and K are alive (unbounded).
21
Insertion and overflow handling in MVR-tree
• Not overflow in intermediate nodes:– Set tstart to the current time.
• Overflow in intermediate nodes:
Insertion in intermediate nodes
22
Insertion and overflow handling in MVR-tree
• Not overflow in leaf nodes:– Set tstart to the current time.
• Overflow in leaf nodes:
Insertion in leaf nodess
23
Reinsertion• Any leaf node of MVR-trees can store a
reinserted entry.
• Different from MVB-tree.
• If general key split fails.
24
Deletion and underflow handling in MVR-tree
• Not underflow in intermediate nodes: – Modify tend from * to the current time.
• Underflow in intermediate nodes:– Set tend of its live entries to current time.
• All entries are dead.
– Reinsert these entries to the most recent logical R-tree after setting tstart=current time.
– MVB-tree handle underflows by merging with sibling nodes.
25
Deletion and underflow handling in MVR-tree
• Not underflow in leaf nodes: – Modify tend from * to the current time.
• Underflow in leaf nodes:– First attempt to borrow a live entry from a sibling node. – entry reinsertion if the heuristic fails (cause redundancy).
Borrowing a live entry from a sibling node
1, At timestamp 2, entry A1 is deleted.
2, node A weak version underflow.
3, version condition must still be satisfied in B after removal. (removal of B2 or B3 can cause weak version underflow for timestamp 1.)b=8,
Pversion=1/3
26
Auxiliary 3D R-tree
• In order to process long time interval queries.
• 3D R-tree is built on the leaves of the MVR-tree.
• Whenever a leaf node of the MVR-tree is updated, the change is propagated to its entry in the 3D R-tree.
27
Query processing with MV3R-tree
• Choose between 3D R-tree and MVR-tree.– 3D R-tree is preferable for long time interval queries.– MVR-tree is good for timestamp queries.– Threshold is given for short time interval queries.
• When use MVR-tree, it choose the MVR-trees whose roots´jurisdiction interval cover the queried timestamp or interval.
• Duplicate visits for time interval queries.– Duplicate data is created in version split or entry
reinsertion.
28
Overview
• Motivation
• Related works
• MV3R-tree
• Strong and weak points
• Relation to our project
• Conclusion
29
Strong and weak points
• Strong points:– Appropriate related work and good structural
sequence.– Good graphic explaination method.
• Weak points:– No method to decide the parameters.– Does not give a solution to deal with the
duplicate visit to the same node via different parents in query processing with MVR-trees.
30
Overview
• Motivation
• Related works
• MV3R-tree
• Strong and weak points
• Relation to our project
• Conclusion
31
Relation to our project
• Similar work to our project but different direction.
• MVB-tree is the extension of B-tree which we use in our project.
• Many ideas can be used in our project.
32
Overview
• Motivation
• Related works
• MV3R-tree
• Strong and weak points
• Relation to our project
• Conclusion
33
Conclusion
• MV3R-tree can handle both timestamp and interval queries efficiently.
• But update process is complex.
• Choose between MVR-tree and 3D R-tree is important.
• Duplicate can only be reduced but not be avoided.
Recommended