temporal alignment

Temporal Alignment os 1 ohlen 1 Johann Gamper 2 Anton Dign Michael - PowerPoint PPT Presentation

Temporal Alignment os 1 ohlen 1 Johann Gamper 2 Anton Dign Michael H. B 1 University of Z urich, Switzerland 2 Free University of Bozen-Bolzano, Italy SIGMOD 2012 May 24, 2012 - Scottsdale, Arizona, USA Outline Goal and Problem


  1. Temporal Alignment os 1 ohlen 1 Johann Gamper 2 Anton Dign¨ Michael H. B¨ 1 University of Z¨ urich, Switzerland 2 Free University of Bozen-Bolzano, Italy SIGMOD 2012 May 24, 2012 - Scottsdale, Arizona, USA

  2. Outline Goal and Problem Definition Temporal Primitives Properties of Temporal RA Implementation and Empirical Evaluation Related Work Summary and Future Work SIGMOD 2012 2/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  3. Temporal Data Example ◮ Input : Employee N works for department D during time T . R N D T Joe DB [ Feb , Jul ) r 1 r 2 Ann DB [ Feb , Sep ) Sam AI [ May , Oct ) r 3 ◮ Query : How did the average duration of contracts per department change? ◮ Result : Temporal Aggregation: D ϑ T AVG ( DUR ( T )) ( R ) AVG D T z 1 6 DB [ Feb , Jul ) z 2 7 DB [ Jul , Sep ) z 3 5 AI [ May , Oct ) Timestamps must be adjusted for the result. SIGMOD 2012 3/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  4. Temporal Data Example ◮ Input : Employee N works for department D during time T . R N D T Joe DB [ Feb , Jul ) r 1 r 2 Ann DB [ Feb , Sep ) Sam AI [ May , Oct ) r 3 ◮ Query : How did the average duration of contracts per department change? ◮ Result : Temporal Aggregation: D ϑ T AVG ( DUR ( T )) ( R ) AVG D T z 1 6 DB [ Feb , Jul ) z 2 7 DB [ Jul , Sep ) z 3 5 AI [ May , Oct ) Timestamps must be adjusted for the result. SIGMOD 2012 3/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  5. Temporal Data Example ◮ Input : Employee N works for department D during time T . R N D T Joe DB [ Feb , Jul ) r 1 r 2 Ann DB [ Feb , Sep ) Sam AI [ May , Oct ) r 3 ◮ Query : How did the average duration of contracts per department change? ◮ Result : Temporal Aggregation: D ϑ T AVG ( DUR ( T )) ( R ) AVG D T z 1 6 DB [ Feb , Jul ) z 2 7 DB [ Jul , Sep ) z 3 5 AI [ May , Oct ) Timestamps must be adjusted for the result. SIGMOD 2012 3/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  6. Requirements for Query Processing ◮ A temporal query must be reducible to a nontemporal query . ◮ A temporal query is defined by its corresponding nontemporal query. ◮ D ϑ T AVG . . . ⇒ D ϑ AVG . . . ◮ Original timestamps have to be accessible . ◮ Despite timestamp adjustment original timestamps are accessible. ◮ D ϑ T AVG ( DUR ( T )) ( R ) ◮ The boundaries of timestamps have to be preserved . ◮ Timestamps can not be split and/or merged arbitrarily. ◮ { (DB , 800k , [ Feb , Jul )) } � = { (DB , 800k , [ Feb , Apr )) , (DB , 800k , [ Apr , Jul )) } These are the requirements of the sequenced semantics . SIGMOD 2012 4/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  7. Requirements for Query Processing ◮ A temporal query must be reducible to a nontemporal query . ◮ A temporal query is defined by its corresponding nontemporal query. ◮ D ϑ T AVG . . . ⇒ D ϑ AVG . . . ◮ Original timestamps have to be accessible . ◮ Despite timestamp adjustment original timestamps are accessible. ◮ D ϑ T AVG ( DUR ( T )) ( R ) ◮ The boundaries of timestamps have to be preserved . ◮ Timestamps can not be split and/or merged arbitrarily. ◮ { (DB , 800k , [ Feb , Jul )) } � = { (DB , 800k , [ Feb , Apr )) , (DB , 800k , [ Apr , Jul )) } These are the requirements of the sequenced semantics . SIGMOD 2012 4/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  8. Requirements for Query Processing ◮ A temporal query must be reducible to a nontemporal query . ◮ A temporal query is defined by its corresponding nontemporal query. ◮ D ϑ T AVG . . . ⇒ D ϑ AVG . . . ◮ Original timestamps have to be accessible . ◮ Despite timestamp adjustment original timestamps are accessible. ◮ D ϑ T AVG ( DUR ( T )) ( R ) ◮ The boundaries of timestamps have to be preserved . ◮ Timestamps can not be split and/or merged arbitrarily. ◮ { (DB , 800k , [ Feb , Jul )) } � = { (DB , 800k , [ Feb , Apr )) , (DB , 800k , [ Apr , Jul )) } These are the requirements of the sequenced semantics . SIGMOD 2012 4/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  9. Goal and Problem Definition Goal: Reduction of sequenced algebra to nontemporal algebra with the help of timestamp adjustment. Problem Definition: Given a temporal operator ψ T of the sequenced semantics, and input relations r 1 , . . . r n , our goal is to express ψ T ( r 1 , . . . r n ) as follows: ψ T � � � � P T ( r 1 , . . . r n ) , . . . P T ( r n , . . . r 1 ) r 1 , . . . r n = ψ (reduction) where ψ is the nontemporal operator corresponding to ψ T , and P T ( r 1 , . . . r n ) adjusts the timestamps of r 1 . SIGMOD 2012 5/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  10. Goal and Problem Definition Goal: Reduction of sequenced algebra to nontemporal algebra with the help of timestamp adjustment. Problem Definition: Given a temporal operator ψ T of the sequenced semantics, and input relations r 1 , . . . r n , our goal is to express ψ T ( r 1 , . . . r n ) as follows: ψ T � � � � P T ( r 1 , . . . r n ) , . . . P T ( r n , . . . r 1 ) r 1 , . . . r n = ψ (reduction) where ψ is the nontemporal operator corresponding to ψ T , and P T ( r 1 , . . . r n ) adjusts the timestamps of r 1 . SIGMOD 2012 5/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  11. Solution ◮ Two new algebra operators (primitives) for adjustment of timestamps: ◮ Temporal Splitter N ◮ Temporal Aligner φ ◮ Adjustment must allow to propagate original timstamps. ◮ Adjustment must respect the lineage. ◮ Reduction rules from temporal RA to nontemporal RA. ◮ Timestamp propagation for accessing original timestamps. SIGMOD 2012 6/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  12. Temporal Primitives ◮ The purpose of a temporal primitive is to break timestamps into pieces. ◮ Two temporal primitives are required: ◮ One input tuple contributes to at most one result tuple per time point. ⇒ Temporal Splitter Example: Aggregation ◮ One input tuple contributes to more than one result tuple per time point. ⇒ Temporal Aligner Example: Joins SIGMOD 2012 7/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  13. Temporal Splitter ◮ Average duration of contracts per department: D ϑ T AVG ( DUR ( T )) ( R ) R N D T r 1 Joe DB [ Feb , Jul ) r 2 Ann DB [ Feb , Sep ) r 3 Sam AI [ May , Oct ) adjustment (disjoint) N D U T N D U T N D U T Joe DB [ Feb , Jul ) [ Feb , Jul ) Ann DB [ Feb , Sep ) [ Jul , Sep ) Sam AI [ May , Oct ) [ May , Oct ) Ann DB [ Feb , Sep ) [ Feb , Jul ) nontemporal aggregation AVG D T AVG D T AVG D T 6 DB [ Feb , Jul ) 7 DB [ Jul , Sep ) 5 AI [ May , Oct ) AVG D T 6 DB [ Feb , Jul ) 7 DB [ Jul , Sep ) 5 AI [ May , Oct ) ◮ One input tuple contributes to at most one result tuple per month. SIGMOD 2012 8/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  14. Temporal Splitter ◮ Average duration of contracts per department: D ϑ T AVG ( DUR ( T )) ( R ) R N D T r 1 Joe DB [ Feb , Jul ) r 2 Ann DB [ Feb , Sep ) r 3 Sam AI [ May , Oct ) adjustment (disjoint) N D U T N D U T N D U T Joe DB [ Feb , Jul ) [ Feb , Jul ) Ann DB [ Feb , Sep ) [ Jul , Sep ) Sam AI [ May , Oct ) [ May , Oct ) Ann DB [ Feb , Sep ) [ Feb , Jul ) nontemporal aggregation AVG D T AVG D T AVG D T 6 DB [ Feb , Jul ) 7 DB [ Jul , Sep ) 5 AI [ May , Oct ) AVG D T 6 DB [ Feb , Jul ) 7 DB [ Jul , Sep ) 5 AI [ May , Oct ) ◮ One input tuple contributes to at most one result tuple per month. SIGMOD 2012 8/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  15. Temporal Aligner ◮ Employees managed by manager: M ❞⑤❃❁⑤ T M . D = R . D R M R M D T N D T m 1 Tom DB [ Feb , Dec ) r 1 Joe DB [ Feb , Jul ) r 2 Ann DB [ Feb , Sep ) r 3 Sam AI [ May , Oct ) adjustment (overlapping) M D U T M D U T M D U T Tom DB [ Feb , Dec ) [ Feb , Jul ) Tom DB [ Feb , Dec ) [ Feb , Sep ) Tom DB [ Feb , Dec ) [ Sep , Dec ) N D V T N D V T N D V T Joe DB [ Feb , Jul ) [ Feb , Jul ) Ann DB [ Feb , Sep ) [ Feb , Sep ) nontemporal left outer join M D N T M D N T M D N T Tom DB Joe [ Feb , Jul ) Tom DB Ann [ Feb , Sep ) Tom DB ω [ Sep , Dec ) M D N T Tom DB Joe [ Feb , Jul ) Tom DB Ann [ Feb , Sep ) Tom DB ω [ Sep , Dec ) ◮ One input tuple contributes to more than one result tuple per month. E.g., m 1 contributes twice to month Feb . SIGMOD 2012 9/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

  16. Temporal Aligner ◮ Employees managed by manager: M ❞⑤❃❁⑤ T M . D = R . D R M R M D T N D T m 1 Tom DB [ Feb , Dec ) r 1 Joe DB [ Feb , Jul ) r 2 Ann DB [ Feb , Sep ) r 3 Sam AI [ May , Oct ) adjustment (overlapping) M D U T M D U T M D U T Tom DB [ Feb , Dec ) [ Feb , Jul ) Tom DB [ Feb , Dec ) [ Feb , Sep ) Tom DB [ Feb , Dec ) [ Sep , Dec ) N D V T N D V T N D V T Joe DB [ Feb , Jul ) [ Feb , Jul ) Ann DB [ Feb , Sep ) [ Feb , Sep ) nontemporal left outer join M D N T M D N T M D N T Tom DB Joe [ Feb , Jul ) Tom DB Ann [ Feb , Sep ) Tom DB ω [ Sep , Dec ) M D N T Tom DB Joe [ Feb , Jul ) Tom DB Ann [ Feb , Sep ) Tom DB ω [ Sep , Dec ) ◮ One input tuple contributes to more than one result tuple per month. E.g., m 1 contributes twice to month Feb . SIGMOD 2012 9/33 A. Dign¨ os, M. H. B¨ ohlen, J. Gamper

Recommend


More recommend