350 likes | 638 Views
The MV3R-Tree: A Spatio-Temporal Access Method for Timestamp and Interval Queries. Yufei Tao and Dimitris Papadias Hong Kong University of Science and Technology Present by Guangyue Jia. Overview. Motivation Related works MV3R-tree Strong and weak points Relation to our project
E N D
The MV3R-Tree: A Spatio-Temporal Access Method for Timestamp and Interval Queries Yufei Tao and Dimitris Papadias Hong Kong University of Science and Technology Present by Guangyue Jia
Overview • Motivation • Related works • MV3R-tree • Strong and weak points • Relation to our project • Conclusion
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.
Overview • Motivation • Related works • MV3R-tree • Strong and weak points • Relation to our project • Conclusion
Related works • MVB-tree: • Multi-version B-tree • HR-tree • Historical R-tree • 3D R-tree • 3 Dimension R-tree
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. pversion =1/3 b=6 Example of MVB-tree
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.
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 of MVB-tree 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. Example of block overflow and version split
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.
Mergence and key split pversion =psvu=1/3 psvo=5/6 Root A B C <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, *> 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.
Mergence and key split pversion =psvu=1/3 psvo=5/6 Root A B C <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, *> 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.
Mergence and key split pversion =psvu=1/3 psvo=5/6 Root A B C <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, *> 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. C´ <72, 1, *> <78, 1, *> <83, 1, *> <99, 1, *> <102, 1, *>
Mergence and key split pversion =psvu=1/3 psvo=5/6 Root A B C <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, *> 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. C´ <43, 4, *> <72, 1, *> <78, 1, *> <83, 1, *> <99, 1, *> <102, 1, *>
Mergence and key split pversion =psvu=1/3 psvo=5/6 Root A B C <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, *> 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. D E <43, 4, *> <72, 1, *> <78, 1, *> <83, 1, *> <99, 1, *> <102, 1, *>
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
3D R-tree • Good for time interval queries A timestamp query in 3D R-tree
Overview • Motivation • Related works • MV3R-tree • Strong and weak points • Relation to our project • Conclusion
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
Introduction • An idea to deal with both timestamp and interval queries. • MVR-tree + 3DR-tree Overview of an MV3R-tree
MVR-Tree • Multi-version R-tree. • Can contain multiple R-trees. • Each entry has the form <s, tstart, tend, pointer> 1, A to G are object boxes. 2, H, I, and J are leaf nodes. 3, C, I and K are alive (unbounded). A small MVR-tree with height 2 b=3 pversion=1/3
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
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
Reinsertion • Any leaf node of MVR-trees can store a reinserted entry. • Different from MVB-tree. • If general key split fails.
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.
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). 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.) Borrowing a live entry from a sibling node b=8, Pversion=1/3
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.
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.
Overview • Motivation • Related works • MV3R-tree • Strong and weak points • Relation to our project • Conclusion
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.
Overview • Motivation • Related works • MV3R-tree • Strong and weak points • Relation to our project • Conclusion
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.
Overview • Motivation • Related works • MV3R-tree • Strong and weak points • Relation to our project • Conclusion
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.