Handling time in RDF Claudio Gutierrez (Joint work with C. Hurtado and A. Vaisman) Department of Computer Science Universidad de Chile UPM, Madrid, January 2009 Time in RDF – p. 1/15
Outline • Introducing time into RDF • Temporal RDF Graphs • Semantics of Temporal RDF Graphs • Syntax for Temporal Graphs • Querying Time in RDF Time in RDF – p. 2/15
� � � Introducing time into RDF �� �� Student �� �� � ����������� � � subC subC � � � � � � � � �� �� �� �� Grad UnderGrad �� �� �� �� subC �� �� M.Sc �� �� type �� �� John �� �� Time in RDF – p. 3/15
� � � Introducing time into RDF �� �� Student �� �� � ����������� � � subC subC � � � � � � � � �� �� �� �� Grad UnderGrad �� �� �� �� � � subC � � subC � � � � � �� �� �� �� Ph.D M.Sc �� �� �� �� � ���������� type �� �� John �� �� Time in RDF – p. 3/15
� � � � Introducing time into RDF �� �� Student �� �� � ����������� � � subC subC � � � � � � � � �� �� �� �� Grad UnderGrad �� �� �� �� � � subC � � subC � � � � � �� �� �� �� Ph.D M.Sc �� �� �� �� type �� �� John �� �� Time in RDF – p. 3/15
� � � � � Temporal Graph �� �� Student �� �� � ����������� � [0 ,Now ] [0 ,Now ] � � � � � � � � � �� �� �� �� Grad UnderGrad �� �� �� �� � [3 ,Now ] � � � [0 ,Now ] � � � � �� � �� �� �� Ph.D M.Sc �� �� �� �� � ���������� [3 , 4] [0 , 3] �� �� [4 ,Now ] John �� �� Time in RDF – p. 4/15
General Issues • Versioning versus Labeling – Label elements subject to change – Maintain a snapshot of each state of the graph Time in RDF – p. 5/15
General Issues • Versioning versus Labeling – Label elements subject to change – Maintain a snapshot of each state of the graph • Time Points versus Time Intervals. [4 , 31] = [4] ∪ [5] ∪ · · · ∪ [30] ∪ [31] Time in RDF – p. 5/15
General Issues • Versioning versus Labeling – Label elements subject to change – Maintain a snapshot of each state of the graph • Time Points versus Time Intervals. [4 , 31] = [4] ∪ [5] ∪ · · · ∪ [30] ∪ [31] • Temporal Query Language – Point based (variables refer to point times) – Interval based (variables refer to intervals) Time in RDF – p. 5/15
� � RDF Intrinsic Issues • Notion of temporal Entailment | = τ [2 , 7] [5 , 9] �� �� �� �� sc � �� �� Ph.D Grad Stud �� �� �� �� �� �� sc sc [5 , 7] Time in RDF – p. 6/15
� � � � � RDF Intrinsic Issues • Notion of temporal Entailment | = τ [2 , 7] [5 , 9] �� �� �� �� sc � �� �� Ph.D Grad Stud �� �� �� �� �� �� sc sc [5 , 7] • Treatment of temporal Blank Nodes: ? �� �� �� �� | = τ Student Student �� �� �� �� � [2 , 3] � � � [2 , 5] [3 , 5] � � � � � �� �� �� �� �� � �� Mary X John �� �� �� �� �� �� Time in RDF – p. 6/15
� � � � � RDF Intrinsic Issues • Notion of temporal Entailment | = τ [2 , 7] [5 , 9] �� �� �� �� sc � �� �� Ph.D Grad Stud �� �� �� �� �� �� sc sc [5 , 7] • Treatment of temporal Blank Nodes: ? �� �� �� �� | = τ Student Student �� �� �� �� � [2 , 3] � � � [2 , 5] [3 , 5] � � � � � �� �� �� �� �� � �� Mary X John �� �� �� �� �� �� • Vocabulary for temporal labeling Time in RDF – p. 6/15
Definitions Temporal Triple: an RDF triple with a temporal label, e.g. ( a, b, c )[ t ] Temporal Graph: set of temporal triples Snapshot of graph G at time t : G ( t ) = { ( a, b, c ) : ( a, b, c )[ t ] ∈ G } Notion of temporal entailment G 1 | = τ G 2 Time in RDF – p. 7/15
Semantics Ground Case: G 1 | = τ G 2 if for each t, G 1 ( t ) | = G 2 ( t ) Time in RDF – p. 8/15
Semantics Ground Case: G 1 | = τ G 2 if for each t, G 1 ( t ) | = G 2 ( t ) Non Ground Case: G 1 | = τ G 2 if there are ground instances µ 1 ( G 1 ) and µ 2 ( G 2 ) such that for each t : µ 1 ( G 1 )( t ) | = τ µ 2 ( G 2 )( t ) Time in RDF – p. 8/15
Semantics Ground Case: G 1 | = τ G 2 if for each t, G 1 ( t ) | = G 2 ( t ) Non Ground Case: G 1 | = τ G 2 if there are ground instances µ 1 ( G 1 ) and µ 2 ( G 2 ) such that for each t : µ 1 ( G 1 )( t ) | = τ µ 2 ( G 2 )( t ) Proposition. For ground graphs, G 1 | = τ G 2 implies G 1 ( t ) | = G 2 ( t ) for all times t . Time in RDF – p. 8/15
Semantics (cont.) The temporal closure tcl ( G ) is a maximal set of temporal triples G ′ such that: – G ′ contains G – G is equivalent to G ′ Proposition. = τ G 2 iff tcl ( G 1 ) | G 1 | = τ G 2 Proposition. Deciding if G ′ is the closure of G is DP-complete. Time in RDF – p. 9/15
� � � Syntax for ( a, b, c )[4 , 5] • Point version �� �� � �� �� Instant �� �� a 4 �� �� Y1 �� �� �� �� � ������������� � � temporal � � � � � � � tsubj � � �� �� � �� �� � �� �� � Instant �� �� � c X Y2 5 �� �� �� �� �� �� �� �� � ������������� tpred temporal tobj �� �� c �� �� Time in RDF – p. 10/15
� � � � � � � Syntax for ( a, b, c )[4 , 5] • Point version �� �� � �� �� Instant �� �� a 4 �� �� Y1 �� �� �� �� � ������������� � � temporal � � � � � � � tsubj � � �� �� � �� �� � �� �� � Instant �� �� � c X Y2 5 �� �� �� �� �� �� �� �� � ������������� tpred temporal tobj �� �� c �� �� • Interval version �� �� �� �� a 4 �� �� �� �� � ������������� � initial � � � � tsubj � temporal � �� �� � �� �� � �� �� Interval �� �� c X Y Z �� �� �� �� �� �� �� �� � ������������� � tpred � � � � � tobj final � �� �� �� �� c 5 �� �� �� �� Time in RDF – p. 10/15
� � � Syntax (cont.): rules Rule 1-2: Equivalence betwen point and interval versions Rule 3: Normalization of point-version: �� �� � �� �� �� �� a 4 �� �� Y �� �� �� �� � ������������� � Instant � � temporal � � � � � � tsubj � � �� �� � � �� �� � �� �� �� �� � c X Z 5 �� �� �� �� �� �� �� �� � ������������� Instant tpred temporal tobj �� �� c �� �� Time in RDF – p. 11/15
� � � � Syntax (cont.): rules Rule 1-2: Equivalence betwen point and interval versions Rule 3: Normalization of point-version: �� �� �� �� a 4 �� �� �� �� � ������������� � � � Instant � � � � � � tsubj � � �� �� � �� �� � �� �� Instant �� �� � c X V 5 �� �� �� �� �� �� �� �� � ������������� tpred temporal tobj �� �� c �� �� Time in RDF – p. 11/15
� � � � � � Syntax works well ( a, b, c )[ m, n ] . ( ) ∗ ( ) ∗ �� �� �� �� . a m �� �� �� �� � ������������� � � init � � � � � temp �� �� � �� �� Int � �� �� � �� �� c X Y Z �� �� �� �� �� �� �� �� � ������������� � � � � � � � fin � �� �� �� �� c n �� �� �� �� Time in RDF – p. 12/15
Syntax works well (cont.) Theorem. = τ G 2 implies ( G 1 ) ∗ | 1. G 1 | = ( G 2 ) ∗ 2. G 2 | = G 2 implies ( G 1 ) ∗ | = τ ( G 2 ) ∗ 3. ( G ∗ ) ∗ = G and G | = ( G ∗ ) ∗ Theorem. Let ⊢ be the deductive system formed by RDFS rules plus Temporal rules. Then: = τ G 2 iff ( G 1 ) ∗ ⊢ ( G 2 ) ∗ G 1 | Time in RDF – p. 13/15
Recommend
More recommend