<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">T-SPARQL: A TSQL2-Like Temporal Query Language for RDF</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author role="corresp">
							<persName><forename type="first">Fabio</forename><surname>Grandi</surname></persName>
							<email>fabio.grandi@unibo.it</email>
							<affiliation key="aff0">
								<orgName type="institution">Alma Mater Studiorum -Università di Bologna</orgName>
								<address>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">T-SPARQL: A TSQL2-Like Temporal Query Language for RDF</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">C6EE88FD95DD1F414F5645BDCEA04C3A</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T12:11+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>In this paper, we present a temporal extension of the SPARQL query language for RDF graphs. The new language is based on a temporal RDF database model employing triple timestamping with temporal elements, which best preserves the scalability property enjoyed by triple storage technologies, especially in a multi-temporal setting. The proposed SPARQL extensions are aimed at embedding several features of the TSQL2 consensual language designed for temporal relational databases.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>When an RDF graph <ref type="bibr" target="#b10">[11]</ref>, representing for instance the specification of an ontology, is changed, some applications require the past version to be maintained in addition to the new one. This is the case of the legal domain where ontologies must evolve as a natural consequence of the dynamics involved in normative systems <ref type="bibr" target="#b3">[4]</ref>. Agents in such a domain may often have to deal with a past perspective, like a Court having to judge today on a fact committed several years ago. Moreover, several time dimensions are usually important for computer applications in such domains <ref type="bibr" target="#b2">[3]</ref>.</p><p>In the design of semantics based information systems, triple store technology <ref type="bibr" target="#b11">[12]</ref> based on the RDF data model is supposed to provide scalability for querying and retrieval. Several temporal extensions of the RDF data model have been proposed <ref type="bibr" target="#b5">[6,</ref><ref type="bibr" target="#b9">10,</ref><ref type="bibr" target="#b16">17]</ref>, often in conjunction with special index structures which allow for efficient processing of temporal queries (e.g. tGRIN <ref type="bibr" target="#b9">[10]</ref> and keyTree <ref type="bibr" target="#b16">[17]</ref>). In order to preserve the scalability property of the triple storage approach as much as possible also in the presence of temporal semantics, we introduced in <ref type="bibr" target="#b4">[5]</ref> a temporal RDF data model aimed at preventing the proliferation of valueequivalent triples even in the presence of multiple temporal dimensions. In particular, this has been accomplished through the adoption of temporal elements <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b6">7]</ref> as timestamps and a careful definition of the operational semantics of modification statements.</p><p>In this work, we complete the proposal in <ref type="bibr" target="#b4">[5]</ref> by introducing a temporal extension of SPARQL <ref type="bibr" target="#b15">[16]</ref> which can be used as query language for the temporal data model of <ref type="bibr" target="#b4">[5]</ref>. The temporal extension is based on the lesson learned with the design of the temporal query language TSQL2 <ref type="bibr" target="#b13">[14]</ref>, from which it inherits part of the temporal expressiveness and user friendliness. The TSQL2 language was born as a follow-up of the 1993 ARPA/NSF International Workshop on an Infrastructure for Temporal Databases <ref type="bibr" target="#b8">[9]</ref>, after which Richard Snodgrass sent an invitation to form a committee for the design of a consensual temporal extension of the standard database query language SQL-92. The committee, gathering 18 people from the academic and industrial worlds, started its works in July 1993 and, after joint email discussions and voting on every aspect of the language, produced a first draft in March 1994 <ref type="bibr" target="#b12">[13]</ref>. The final specification and language commentaries appeared in a book published in 1995 <ref type="bibr" target="#b13">[14]</ref> (for a more detailed history, see http://www.cs.arizona.edu/people/rts/tsql2.html).</p><p>The rest of paper is organized as follows. In Section 2, the main features of the T-SPARQL query language are introduced and the TSQL2 heritage is underlined. In Section 3, the use and functioning of the language is exemplified through the presentation of a few temporal queries. Conclusions will be finally found in Section 4.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">T-SPARQL Definition</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">A multi-temporal RDF database model</head><p>We briefly recall here the base definitions of the underlying multi-temporal RDF database model <ref type="bibr" target="#b4">[5]</ref>, starting from an N -dimensional time domain</p><formula xml:id="formula_0">T = T 1 × T 2 × • • • × T N</formula><p>where T i = [0, uc] i is the i-th time domain. Right-unlimited time intervals are expressed as [t, uc], where uc means "Until Changed", though such a symbol is often used in temporal database literature <ref type="bibr" target="#b6">[7]</ref> for transaction time only (whereas, e.g. "forever" or ∞ is used for valid time). Such naming choice refers to the modeling of time-varying data, which are potentially subject to change with respect to all the underlying time dimensions.</p><p>A multi-temporal RDF triple is defined as:</p><formula xml:id="formula_1">(s, p, o | T )</formula><p>where s is a subject, p is a property, o is an object and T ⊆ T is a timestamp assigning a temporal pertinence to the RDF triple (s, p, o). We will also call the (non-temporal) triple (s, p, o) the value or the contents of the temporal triple (s, p, o | T ). The temporal pertinence of a triple is a subset of the multidimensional time domain which is represented by a temporal element <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b6">7]</ref>, that is a disjoint union of multidimensional temporal intervals, each one obtained as the Cartesian product of one time interval for each of the supported temporal dimensions:</p><formula xml:id="formula_2">T = 1≤j≤m I j = 1≤j≤m [t s j , t e j ] 1 × [t s j , t e j ] 2 × • • • × [t s j , t e j ] N</formula><p>where the unioned N -dimensional intervals are all disjoint (i.e. I j ∩ I k = ∅ for all 1 ≤ j &lt; k ≤ m).</p><p>A multi-temporal RDF database is defined as a set of timestamped RDF triples:</p><formula xml:id="formula_3">RDF-TDB = { (s, p, o | T ) | T ⊆ T }</formula><p>with the integrity constraint:</p><formula xml:id="formula_4">∀(s, p, o | T ), (s , p , o | T ) ∈ RDF-TDB: s = s ∧ p = p ∧ o = o =⇒ T = T</formula><p>which requires that no value-equivalent distinct triples exist.</p><p>The adoption of timestamps made-up of temporal elements instead of (multitemporal) simple intervals avoids the duplication of triples in the presence of a temporal pertinence with a complex shape. In fact, we store different triple versions only once with a complex timestamp rather than storing multiple copies of them with a simple timestamp as in <ref type="bibr" target="#b5">[6,</ref><ref type="bibr" target="#b9">10,</ref><ref type="bibr" target="#b16">17]</ref>. The memory saving we obtain grows with the dimensionality of the time domain, but it can even be appreciated with a monodimensional time domain, when the temporal pertinence of a triple is not a convex interval. For example, the temporal triples (s, p, o | [t ). Whereas the same space is basically required for globally storing the timestamps in both cases (i.e. the space needed by four time points), the space required for storing one occurrence of the triple contents (s, p, o) is saved in the latter case. Moreover, with element timestamping, according to the integrity constraint introduced above, no two temporal triples can have the same non-temporal contents and, thus, checking of uniqueness and of functional properties constraints can be performed more easily. As shown in <ref type="bibr" target="#b4">[5]</ref>, the semantics of modification operations can be defined in such a way that the integrity constraints concerning temporal elements are automatically preserved.</p><p>The controlled growth of value-equivalent triples made possible by temporal elements preserves, in a temporal setting, the scalability property of the triple storage approach. Furthermore, since temporal elements are closed under set union, intersection and complementation operations, they lead to query languages that are more natural <ref type="bibr" target="#b1">[2]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Time representation and manipulation</head><p>As in the TSQL2 model, time is considered discrete, with a minimal systemdependent representation unit called chronon <ref type="bibr" target="#b6">[7]</ref>. A mono-temporal chronon corresponds to an elementary interval on the time axis, whereas a multi-temporal chronon corresponds to a unit hypercube in the N -dimensional time domain (Cartesian product of one chronon per each dimension). As for SQL-92, three base temporal types have been defined for TSQL2 at the conceptual level: datetime, period and interval. The first one corresponds to an instantaneous event, without duration, which can be conventionally represented via a single chronon. The second one correspond to a set of consecutive chronons along the time axis and is characterized by two datetime constants which represent its boundaries. The third corresponds to a pure duration, non anchored on the time axis, and can be represented as a multiple of the chronon. Whereas the first and the third temporal types correspond to the XML Schema primitive datatypes xs:dateTime and xs:duration <ref type="bibr" target="#b17">[18]</ref>, respectively, we assume for the second one a special data type xs:period has been defined and a constructor function: fn:period($arg1 as xs:dateTime, $arg2 as xs:dateTime) as xs:period is available to build a monodimensional time period from two xs:dateTime (or xs:date or xs:time) values representing the period boundaries. However, for the sake of simplicity, we will also use in the rest of the paper period literal expressions like:</p><p>"[2010-01-01,2010-01-31]"^^xs:period as a shorthand for the use of the xs:period constructor like: fn:period("2010-01-01"^^xs:date, "2010-01-31"^^xs:date)</p><p>We further assume compatibility between the xs:period datatype and the standard gYearMonth and gYear datatypes, which leads for example to the equivalences: Without entering into details, we assume a suitable datatype xs:temporalElement, equipped with constructor and built-in functions, is available to manage temporal elements. In particular, like in TSQL2, we consider the two built-in functions: fn:first($arg1 as xs:temporalElement) as xs:period fn:last($arg1 as xs:temporalElement) as xs:period to have been defined to extract the first and last period from a monodimensional temporal element, respectively. For instance: yields "[2008-06-01,2009-07-15]"^^xs:period. In order to extract the first (last) chronon of a temporal element, we assume that the fn:begin() (fn:end()) function can also be directly applied to temporal elements (e.g. if T is a temporal element, fn:begin(T ) = fn:begin(fn:first(T ))).</p><p>Other functions and operators defined for XQuery and XPath <ref type="bibr" target="#b18">[19]</ref> to manipulate time and duration datatypes are assumed to be available. We further assume that, as it happens for TSQL2, casting from another temporal datatype to a duration can be used to calculate the overall duration of a time period or element by means of, for instance, type constructor functions: The TSQL2 language, which is based on a bitemporal data model, provides for functions to access the valid and transaction time components from a timestamp. Likewise, we assume similar functions to be available also for T-SPARQL: if T is a multi-dimensional time element, the expressions:</p><formula xml:id="formula_5">VALID(T ) TRANSACTION(T )</formula><p>can thus be used to express conditions on the valid and transaction time components of T , respectively. Similar functions can be defined for other time dimensions in a multi-temporal setting (e.g. EFFICACY() for efficacy time <ref type="bibr" target="#b2">[3,</ref><ref type="bibr" target="#b4">5]</ref>). Notice that such functions do not imply a projection onto the corresponding time axis with reduction of dimensionality of the timestamp: all the conditions expressed on different time dimensions are to be matched concurrently against the same multi-dimensional intervals composing the temporal element. For instance, if T = <ref type="bibr" target="#b9">[10,</ref><ref type="bibr">20]</ref>  <ref type="bibr" target="#b9">[10,</ref><ref type="bibr">20]</ref> v , then T does not qualify for the selection condition 12 ∈ TRANSACTION(T ) ∧ 17 ∈ VALID(T ).</p><formula xml:id="formula_6">t × [30, 40] v ∪ [30, 40] t ×</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Temporal selection</head><p>Temporal selection is the most qualifying feature of a temporal query language, as it allows to select data on the basis of their temporal properties. In order to add temporal selection capabilities to the SPARQL language, we extend the syntax of the basic graph pattern in the WHERE clause of the SELECT statement. As RDF triples are correspondingly augmented with the timestamp in the data model, graph patterns to be used in the T-SPARQL WHERE clause are extended with an optional fourth position where matching with the triple timestamps can be specified. For instance, in the graph pattern :e ex:Dept "Toys" | ?t the variable ?t binds to the timestamp of a temporal triple representing the fact that an employee denoted by the blank node :e has been working in the Toys department. This syntax, matching the (s, p, o | t) triple structure in the temporal RDF data model, seems more natural than introducing a distinguished variable type to denote timestamps (like in <ref type="bibr" target="#b7">[8]</ref>). If the fourth position (along with the " | " separator) in the pattern is not used, that is a standard SPARQL three-position pattern is used, the matching with a temporal triple is made regardless of its timestamp.</p><p>In the T-SPARQL FILTER clause, TSQL2 temporal (binary infix) predicates can be used, with the same semantics, to specify constraints over timestamp variables. For instance, the clause: A and B are identical (i.e. contain the same chronons) A OVERLAPS B the intersection of A and B is not empty A MEETS B END(A ) immediately precedes BEGIN(B ) A CONTAINS B each chronon in B is also contained in A They can be used to compare (monodimensional) temporal elements, periods and time points. Since all temporal types can be reduced to sets of chronons, such operators can also be used to compare operands with different temporal types <ref type="bibr" target="#b13">[14]</ref>. For instance, if A is an element and B is a period, then the expression "A PRECEDES B" is true if the last chronon belonging to A precedes the left boundary of B. All the comparison operators can be implemented on the basis of a primitive operator "Bef ore()" which defines the relation order on the time axis. It can also be easily checked that such operators guarantee the temporal completeness of the resulting language, as they allow users to check the occurrence of all the possible relationships between two periods or events <ref type="bibr" target="#b0">[1]</ref>. Such operator set has been chosen for TSQL2 also considering the user-friendliness of the language among the design principle. This lead to a non minimal set of comparison operators which are closer to their meaning in natural language than the artificial definition of operators which equip other temporal languages (e.g. based on Allen's algebra <ref type="bibr" target="#b0">[1]</ref>).</p><p>The OVERLAPS and CONTAINS operators can also be defined to work on multidimensional timestamps in a straightforward way.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.4">Temporal projection</head><p>Temporal projection is the operation which specifies the value of the timestamps to be assigned to the retrieved data. TSQL2 supports a VALID clause to specify valid-time projection, as the transaction time assigned to query results is always the current time and cannot be changed by the user. In T-SPARQL, temporal projection is only relevant where the query result has to be a temporal RDF graph consistent with the underlying data model. Otherwise, temporal data can simply be mixed with other data by putting temporal variables in the target list (e.g. see the first example in the next section). In the former case, the basic and most important operation is the construction of a new (temporal) RDF graph as a temporally consistent subset extracted from the multi-version RDF database, which takes the form of a snapshot query or timeslice query <ref type="bibr" target="#b6">[7]</ref>.</p><p>Snapshot queries are used to extract a single temporal version from a multiversion RDF graph. For instance, if the temporal RDF database encodes the definition of a multi-version ontology, the result of a snapshot query is a standard (non-temporal) RDF graph, which can be interpreted as a consistent single ontology version valid at a given time point. Given a multidimensional time point t = (t 1 , t 2 , . . . , t N ) ∈ T , we can define the snapshot valid at t as:</p><formula xml:id="formula_7">RDF-TDB( t) = { (s, p, o) | (s, p, o | T ) ∈ RDF-TDB ∧ t ∈ T }</formula><p>In T-SPARQL, the snapshot query above could be expressed via the following statement:</p><p>CONSTRUCT { ?s ?p ?o } WHERE { TGRAPH &lt;http://myExample.org/tGraph&gt; { ?s ?p ?o | ?t } . FILTER ?t CONTAINS "(t1, t2, . . . , tN )" . }</p><p>where the URI http://myExample.org/tGraph denotes a multi-temporal RDF triple store. The results make up a non temporal RDF graph. Timeslice queries are used to extract a temporally consistent set of consecutive temporal versions from a multi-version RDF graph. If the temporal RDF database encodes the definition of a multi-version ontology, the result of a timeslice query is a temporal RDF graph, which can be interpreted as the collection of all the temporally consistent ontology versions valid in a given period. Given a multi-dimensional time period Ī = I 1 × I 2 × • • • × I N ⊆ T , we can define the timeslice valid in Ī as:</p><formula xml:id="formula_8">RDF-TDB( Ī) = { (s, p, o | T ) | (s, p, o | T ) ∈ RDF-TDB ∧ T = T ∩ Ī = ∅}</formula><p>In T-SPARQL, the snapshot query above could be expressed by means of the statement which follows: The timestamps assigned to the triples in the result are computed as the intersection of the timestamp of the retrieved triples with the query period Ī. If the intersection is empty, the triple does not contribute to the results (and, thus, no additional temporal selection conditions are required in the WHERE clause).</p><formula xml:id="formula_9">TCONSTRUCT { ?s ?p ?o | INTERSECT( ?t, "I1 × I2 × • • • × IN " ) . } WHERE {</formula><p>Within the WHERE clause that can be added to such CONSTRUCT or TCONSTRUCT statements, temporal and non-temporal selection (via graph pattern matching) can be combined with temporal projection in a single statement.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Query Examples</head><p>Due to space limitations, the syntax and semantics of the T-SPARQL language is just illustrated by means of a few example queries shown in this section. We assume that ex: is a prefix referencing a namespace involving the definition of employee data: @prefix ex: &lt;http://myExample.org/employee/&gt; . The following is an example of query involving both temporal selection and projection, although the result is not organized as a temporal RDF graph: The (current) history of the the Tom's salary from 2007 to 2009 is retrieved. Following the same rule of TSQL2, a default TRANSACTION(?t) CONTAINS fn:current-date() conjunct in the FILTER clause is implied and, thus, can always be omitted when we are interested in current data. Indeed, an explicit condition involving transaction time must be specified when we want to roll-back the RDF database to a past point in time, as in the query: An optional modifier PERIOD, which corresponds to the partitioning unit which can be associated to tuple variables in the FROM clause of TSQL2 <ref type="bibr" target="#b14">[15]</ref>, can be specified in the declaration of temporal variables. When used, the timestamp bound to the variable is partitioned into maximal periods over which the variable ranges, yielding triple timestamping with periods. As many queries are interested in maximal periods, being able to partition a temporal element into such periods is highly useful. For instance, the query: SELECT ?ename WHERE { ?emp rdf:type ex:emp ; ex:Name ?ename ; ex:Dept "Sales" | ?t . FILTER ( xs:duration(VALID(?t)) &gt; "P2Y"^^xs:duration ) . } which retrieves the names of the employees who worked in the Sales department for more than two years (altogether), can be modified as follows:</p><p>SELECT ?ename WHERE { ?emp rdf:type ex:emp ; ex:Name ?ename ; ex:Dept "Sales" | ?t PERIOD . FILTER ( xs:duration(VALID(?t)) &gt; "P2Y"^^xs:duration ) . } to retrieve the names of the employees who worked continuously in the Sales department for a period longer than two years. Hence an employee who worked in the Sales department from January 2006 to July 2007 and from March 2009 to April 2010 qualifies for the former query but not for the latter, since he/she worked in Sales for 20 months altogether but at most for 17 consecutive months. This powerful tool also allows us to reference consecutive periods within the same data history as in the following query: which retrieves the name of the employees who returned to their previous job (which is also retrieved) after having been directors for some time.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Conclusions</head><p>In this paper, we presented T-SPARQL, a temporal SPARQL extension suited to the temporal RDF database model employing triple timestamping with temporal elements introduced in <ref type="bibr" target="#b4">[5]</ref>, which best preserves in the multi-temporal setting the scalability property enjoyed by triple storage technologies. The language T-SPARQL is equipped with the basic temporal constructs which have been designed for the well-known TSQL2 relational query language <ref type="bibr" target="#b13">[14]</ref> and work with an extended set of the temporal datatypes, functions and operators already present in the SPARQL specification <ref type="bibr" target="#b15">[16,</ref><ref type="bibr" target="#b17">18,</ref><ref type="bibr" target="#b18">19]</ref>. Advanced TSQL2 features (e.g. involving temporal aggregates, granularities, indeterminacy) could also easily be added to the T-SPARQL specification, provided that they can be supported by an underlying query engine.</p><p>In future research, we will consider the design and implementation of a query engine supporting the execution of T-SPARQL queries (possibly via the extension of a canonical SPARQL engine) and the adoption of suitable index and storage structures to facilitate the execution of T-SPARQL queries on temporal RDF graphs.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head></head><label></label><figDesc>"[2010-01-01,2010-01-31]"^^xs:period = "2010-01"^^xs:gYearMonth and: "[2009-01-01,2009-12-31]"^^xs:period = "2009"^^xs:gYear Like in TSQL2, the xs:period datatype is equipped with two built-in functions: fn:begin($arg1 as xs:period) as xs:dateTime fn:end($arg1 as xs:period) as xs:dateTime to extract the left and right period boundaries, respectively. For instance: fn:begin("[2010-01-01,2010-01-31]"^^xs:period) = "2010-01-01"^^xs:date and: fn:end("2009"^^xs:gYear) = "2009-12-31"^^xs:date</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>"</head><label></label><figDesc>[2008-06-01,2009-07-15]+[2009-11-01,2010-02-21]" is a valid xs:temporalElement literal and fn:first("[2008-06-01,2009-07-15]+[2009-11-01,2010-02-21]")</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head></head><label></label><figDesc>xs:duration($arg1 as xs:period) as xs:duration xs:duration($arg1 as xs:temporalElement) as xs:duration For example, the expression: xs:yearMonthDuration("[2009-02,2009-07]+[2009-11,2010-03]") which can also be written using the explicit cast operator as: "[2009-02,2009-07]+[2009-11,2010-03]"^^xs:temporalElement cast as xs:yearMonthDuration yields 11 (months).</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>FILTER</head><label></label><figDesc>( VALID(?t) CONTAINS "2009-06-01"^^xs:date ) only matches the timestamps bound to ?t whose (valid time) value contains the date 2009, June 1 st . The available comparison operators are the following: Operator Definition A PRECEDES B END(A) is earlier than BEGIN(B) A = B</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head></head><label></label><figDesc>1 , t 2 ]) and (s, p, o | [t 3 , t 4 ]), where t 2 + 1 &lt; t 3 , can be merged with temporal element timestamping into a single triple (s, p, o | [t 1 , t 2 ] ∪ [t 3 , t 4 ]</figDesc><table /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head></head><label></label><figDesc>TGRAPH &lt;http://myExample.org/tGraph&gt; { ?s ?p ?o | ?t } }</figDesc><table /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_3"><head></head><label></label><figDesc>which retrieves the history of the the Tom's salary from 2007 to 2009, as of the beginning of 2008.The query which follows, which retrieves the name of the employees who have worked in the Toys department longer than Ann has made $20,000, performs a sort of temporal join involving durations between two employees' data:</figDesc><table><row><cell>SELECT ?salary INTERSECT(?t,"[2007-01-01,2009-12-31]") WHERE {</cell></row><row><cell>?emp rdf:type ex:emp ;</cell></row><row><cell>ex:Name "Tom" ;</cell></row><row><cell>ex:Salary ?salary | ?t .</cell></row><row><cell>FILTER ( VALID(?t) OVERLAPS "[2007-01-01,2009-12-31]"^^xs:period</cell></row><row><cell>&amp;&amp; TRANSACTION(?t) CONTAINS "2008-01-01"^^xs:date ) . }</cell></row><row><cell>SELECT ?ename WHERE {</cell></row><row><cell>?emp1 rdf:type ex:emp ;</cell></row><row><cell>ex:Name "Ann" ;</cell></row><row><cell>ex:Salary ?salary | ?ts .</cell></row><row><cell>?emp2 rdf:type ex:emp ;</cell></row><row><cell>ex:Name ?ename ;</cell></row><row><cell>ex:Dept "Toys" | ?tt .</cell></row><row><cell>FILTER ( ?salary &gt; 20000</cell></row><row><cell>&amp;&amp; xs:duration(VALID(?tt)) &gt; xs:duration(VALID(?ts)) ) . }</cell></row></table></figure>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Maintaining Knowledge about Temporal Intervals</title>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">F</forename><surname>Allen</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Communications of the ACM</title>
		<imprint>
			<biblScope unit="volume">26</biblScope>
			<biblScope unit="issue">11</biblScope>
			<biblScope unit="page" from="832" to="843" />
			<date type="published" when="1983">1983</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">A homogeneous relational model and query language for temporal databases</title>
		<author>
			<persName><forename type="first">S</forename><surname>Gadia</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ACM Transactions on Database Systems</title>
		<imprint>
			<biblScope unit="volume">13</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="418" to="448" />
			<date type="published" when="1998">1998</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Temporal modelling of normative documents in XML format</title>
		<author>
			<persName><forename type="first">F</forename><surname>Grandi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Mandreoli</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Tiberio</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Data &amp; Knowledge Engineering</title>
		<imprint>
			<biblScope unit="volume">54</biblScope>
			<biblScope unit="page" from="327" to="354" />
			<date type="published" when="2005">2005</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">The Valid Ontology: A simple OWL temporal versioning framework</title>
		<author>
			<persName><forename type="first">F</forename><surname>Grandi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">R</forename><surname>Scalas</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of SEMAPRO Conf</title>
				<meeting>of SEMAPRO Conf</meeting>
		<imprint>
			<publisher>IEEE Computer Society</publisher>
			<date type="published" when="2009">2009</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Multi-temporal RDF Ontology Versioning</title>
		<author>
			<persName><forename type="first">F</forename><surname>Grandi</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of IWOD Workshop. CEUR-WS</title>
				<meeting>of IWOD Workshop. CEUR-WS</meeting>
		<imprint>
			<date type="published" when="2009">2009</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Introducing time into RDF</title>
		<author>
			<persName><forename type="first">C</forename><surname>Gutierrez</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Hurtado</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Vaisman</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Transactions on Knowledge and Data Engineering</title>
		<imprint>
			<biblScope unit="volume">19</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="207" to="218" />
			<date type="published" when="2007">2007</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">The consensus glossary of temporal database concepts -February 1998 version</title>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">S</forename><surname>Jensen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">E</forename><surname>Dyreson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">;</forename></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Böhlen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Clifford</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Elmasri</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><forename type="middle">K</forename><surname>Gadia</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Grandi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Hayes</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Jajodia</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Käfer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Kline</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Lorentzos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Mitsopoulos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Montanari</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Nonen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Peressi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Pernici</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">F</forename><surname>Roddick</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><forename type="middle">L</forename><surname>Sarda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">R</forename><surname>Scalas</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Segev</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">T</forename><surname>Snodgrass</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">D</forename><surname>Soo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Tansel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Tiberio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Wiederhold</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Temporal Databases -Research and Practice</title>
				<editor>
			<persName><forename type="first">O</forename><surname>Etzion</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">S</forename><surname>Jajodia</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">S</forename><surname>Sripada</surname></persName>
		</editor>
		<imprint>
			<publisher>Springer-Verlag</publisher>
			<date type="published" when="1399">1998. 1399</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<title level="m" type="main">SPARQL-ST: Extending SPARQL to Support Spatiotemporal Queries</title>
		<author>
			<persName><forename type="first">M</forename><surname>Perry</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">P</forename><surname>Sheth</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Jain</surname></persName>
		</author>
		<ptr target="http://knoesis.org/students/prateek/sparql-st-www09-tr.pdf" />
		<imprint/>
		<respStmt>
			<orgName>Kno.e.sis Center</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">Tech.Rep. KNOESIS-TR-09-01</note>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Towards an Infrastructure for temporal Databases: Report of an Invitational ARPA/NSF Workshop</title>
		<author>
			<persName><forename type="first">N</forename><surname>Pissinou</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">T</forename><surname>Snodgrass</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Elmasri</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><forename type="middle">S</forename><surname>Mumick</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">T</forename><surname>Özsu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Pernici</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Segev</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Theodoulidis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">U</forename><surname>Dayal</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ACM SIGMOD Record</title>
		<imprint>
			<biblScope unit="volume">23</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="35" to="51" />
			<date type="published" when="1994">1994</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Scaling RDF with Time</title>
		<author>
			<persName><forename type="first">A</forename><surname>Pugliese</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Udrea</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><forename type="middle">S</forename><surname>Subrahmanian</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of WWW Conf</title>
				<meeting>of WWW Conf</meeting>
		<imprint>
			<publisher>ACM Press</publisher>
			<date type="published" when="2008">2008</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<ptr target="http://www.w3.org/RDF/" />
		<title level="m">Resource description framework</title>
				<imprint/>
	</monogr>
	<note>W3C Consortium</note>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">An evaluation of triplestore technologies for large data stores</title>
		<author>
			<persName><forename type="first">K</forename><surname>Rohloff</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Dean</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Emmons</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Ryder</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Summer</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of OTM Workshops</title>
				<meeting>of OTM Workshops</meeting>
		<imprint>
			<publisher>Springer-Verlag</publisher>
			<date type="published" when="2007">2007</date>
			<biblScope unit="volume">4806</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">TSQL2 Language Specification</title>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">T</forename><surname>Snodgrass</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Ahn</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Ariav</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><forename type="middle">S</forename><surname>Batory</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Clifford</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">E</forename><surname>Dyreson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Elmasri</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Grandi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">S</forename><surname>Jensen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Käfer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Kline</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Kulkarni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><forename type="middle">Y C</forename><surname>Leung</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Lorentzos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">F</forename><surname>Roddick</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Segev</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">D</forename><surname>Soo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><forename type="middle">M</forename><surname>Sripada</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ACM SIGMOD Record</title>
		<imprint>
			<biblScope unit="volume">23</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="65" to="86" />
			<date type="published" when="1994">1994</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<monogr>
		<title level="m" type="main">The TSQL2 Temporal Query Language</title>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">T</forename><surname>Snodgrass</surname></persName>
		</author>
		<author>
			<persName><forename type="first">;</forename><forename type="middle">)</forename></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Ahn</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Ariav</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Batory</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Clifford</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">E</forename><surname>Dyreson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Elmasri</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Grandi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">S</forename><surname>Jensen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Käfer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Kline</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Kulkarni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><forename type="middle">Y</forename><surname>Leung</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Lorentzos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Ramakrishnan</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">F</forename><surname>Roddick</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Segev</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">D</forename><surname>Soo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><forename type="middle">M</forename><surname>Sripada</surname></persName>
		</author>
		<imprint>
			<date type="published" when="1995">1995</date>
			<publisher>Kluwer Academic Publishers</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<monogr>
		<title level="m" type="main">The From Clause</title>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">T</forename><surname>Snodgrass</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">S</forename><surname>Jensen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Grandi</surname></persName>
		</author>
		<imprint/>
	</monogr>
	<note>Ch. 12</note>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">SPARQL query language for RDF</title>
		<ptr target="http://www.w3.org/TR/rdf-sparql-query/" />
	</analytic>
	<monogr>
		<title level="m">W3C Consortium</title>
				<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<analytic>
		<title level="a" type="main">Applied temporal RDF: Efficient temporal querying of RDF data with SPARQL</title>
		<author>
			<persName><forename type="first">J</forename><surname>Tappolet</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Bernstein</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of ESWC Conf</title>
				<meeting>of ESWC Conf</meeting>
		<imprint>
			<publisher>Springer-Verlag</publisher>
			<date type="published" when="2009">2009</date>
			<biblScope unit="volume">5554</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b17">
	<monogr>
		<ptr target="http://www.w3.org/TR/xmlschema-2/" />
		<title level="m">XML Schema Part 2: Datatypes. W3C Consortium</title>
				<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b18">
	<monogr>
		<ptr target="http://www.w3.org/TR/xpath-functions/" />
		<title level="m">XQuery 1.0 and XPath 2.0 Functions and Operators</title>
				<imprint/>
	</monogr>
	<note>W3C Consortium</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
