<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Gize: A Time Warp in the Web of Data</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Valeria Fionda</string-name>
          <email>fionda@mat.unical.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Melisachew Wudage Chekol</string-name>
          <email>mel@informatik.uni-mannheim.de</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe Pirro</string-name>
          <email>pirro@icar.cnr.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for High Performance Computing and Networking</institution>
          ,
          <addr-line>ICAR-CNR</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Calabria</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Mannheim</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We introduce the Gize framework for querying historical RDF data. Gize builds upon two main pillars: a lightweight approach to keep historical data, and an extension of SPARQL called SPARQ{LTL, which incorporates temporal logic primitives to enable a rich class of queries. One striking point of Gize is that its features can be readily made available in existing query processors.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Introduction
Querying historical data is of utmost importance in many contexts, from city
monitoring, where one needs to track di erent aspects (e.g., pollution,
population) to generic exploratory research, where one is interested in posing queries
like \Retrieve players that are now managing some club they played for" or
\Retrieve the annotation of a gene since the discovery of a particular interaction".
The classical approach for querying RDF data (e.g., via SPARQL endpoints)
only considers the latest version. In fact, querying of historical RDF data poses
some challenges. The rst concerns the representation and storing of historical
data. Some approaches (e.g., [
        <xref ref-type="bibr" rid="ref4 ref7">4, 7</xref>
        ]) allow to retrieve data by providing
timestamps. Other resort to dedicated indexing structures (e.g., [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]) to speed-up query
processing. The second problem concerns what type of querying primitive to
provide. The most common approach is to devise SPARQL extensions that work
with intervals or SPARQL translations into temporal logic. The addition of
adhoc components either in terms of data representation, query language or both,
hinders the applicability on existing RDF (query) processing infrastructures.
      </p>
      <p>
        To cope with these issues we present the Gize4 framework. Gize is built
around two main components. The rst is a lightweight approach to store RDF
data, where each version of the data is stored in a separate named graph. The
second component is a powerful extension of SPARQL called SPARQ{LTL. This
language inherits a variety of temporal operators from Linear Temporal Logics
(LTL) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. To evaluate SPARQ{LTL on existing SPARQL processors we devise
a translation to standard SPARQL queries.
      </p>
      <p>4Gize (</p>
      <p>) is the Ethiopian word for time.</p>
      <p>
        Related Work. Approaches like the DBpedia Wayback Machine [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] allow to
retrieve data at a certain timestamp (provided by the user). Other approaches
(e.g.,[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]) access historical data via (HTTP) content negotiation, typically using
the Memento framework. Yet other approaches (e.g., [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]) introduce timestamps
into RDF triples along with ad-hoc indexing strategies. In Description Logics,
some proposals focus on temporal conjunctive query answering (e.g., [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]); other
e orts (e.g., [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]) have focused on the translation of SPARQL into LTL.
Surprisingly, the design of solutions for querying historical RDF data on existing
SPARQL processors is still in its infancy. Gize lls this gap by contributing
an extension of SPARQL, called SPARQ{LTL, that allows for a rich class of
temporal primitives borrowed from LTL (e.g., SINCE, NEXT, PREVIOUS) along
with a translation from SPARQ{LTL queries into standard SPARQL queries.
2
      </p>
      <p>The Gize Framework
Representing Historical RDF Data. The tenet of Gize is to enable querying
of historical RDF data on existing processors. To represent versions, Gize
leverages the notion of RDF quad. An RDF quad (for simplicity, we omit bnodes) is
a tuple of the form hs; p; o; ci 2 I I (I [ L) I, where I (IRIs) and L (literals)
are countably in nite sets. The forth element of the quad represents that named
graph to which the triple belongs.</p>
      <p>June 2012 &lt;http://gize.org/v1&gt; March 2014 &lt;http://gize.org/v2&gt; September 2014 &lt;http://gize.org/v3&gt;
Jddubbnpp:eUoE:dd2FrbAb0ep_p:g1EIdotiau6b:lroypoc_np:ConeaaaaeltniscoN_ahnCaraehml__aefmPo&lt;orpdatibhonbddandptlbbs_ehoppttliep:ooiapc::mun:nraa/rmm/eeengtdibdpzdb:bGeppi:a:.AUmnEopdFrarA...eo_galEo_/_uPrPvoiar_l4z2oz0&gt;i1n2i dJbupoly:rd2deb0bgpdpdb1io:Ipbto:6a:pUncly:ECao_FnleaAasNc_taiahoErnmuear_eol_Ppfeordaaobnntbp_daCoeld&lt;h_l:biatnehmpaatopmmi:otenndspahbm:ippe/dob:/dpndb:gAabpipnm:G:deLzriuaeecmaa...._p_PaoAiornrllootog_nP/ealvziz5in&gt;i dbdpbdopb::pUr:EIdteauFbglAyppdi__:dnbEAoaaupnntritotaoooepn:lneacNial_ooanf_o_amCoCcethbohaanmlt_epteiodaanmbdshpdiopdi:tbicdopubonrp:rodnbe:apnnm:UtaeEmFeAdd_bbEppu:M...r:doAa_ent2tld0ee1roet6_ia_oDq_nauParmilriflyioainng
dbpod:bdprb:epItagodliyb:_opcnn:oaAaatniolctnoNhanal_imofoe_oCtbodadnblbt_peptoeoa::mnnaammee ddbbpp:M:Aanttder...oe_aD_Parirmloian dbddpbbopdp:bo:Irtp:a:elcGyg_oiniaaaomctinohpnaiaellr_Nofoa_omVtbeeanl_tudterbaapmo:dnbapmoe:ndabdpbm:peM:Aa...tntedore_aD_aPrmirlioan DBpedia Update Statistics about People
dbp:UEFA_European_Chadmbppioon:shcipurrent dbp:UEFA_Euro_2016 dbp:UEFA_European_Championsdhbippo:currendtbp:UEFA_Euro_2016</p>
      <p>Fig. 1. An exceprt of evolving data from DBpedia.</p>
      <p>Fig. 1 shows the evolution of some data taken from DBpedia. Each of the
5 versions considered is represented by a named graph. From this small data
sample one may notice that Italy has changed 3 coaches from July 2012 (C.
Prandelli) to July 2016 (G. Ventura). Interestingly, the latest coach (G. Ventura)
will start on July 18th. One may also notice that some players like A. Pirlo were
part of the team along the whole period, while some other like G. Pazzini or
M. Darmiani were left out or added, respectively. The gure also shows (bottom
right corner) update statistics about People in DBpedia. Each percentage is
computed wrt the previous version. The availability of historical data allows to
pose queries like \Find all players that played with the highest number of coaches"
or \Find players that played since C. Prandelli was the coach". Most of existing
approaches either are not able to express such kind of queries or have to resort
to ad-hoc processing infrastructures.</p>
      <p>The SPARQ{LTL Language. The syntax of SPARQ{LTL is shown below
while Table 1 provides a description of the temporal operators. Let q be a
SPARQ{LTL query, H = fh1; h2; : : : ; hmg be the set of versions, and hc be
the current (not necessarily the latest) version of the data.</p>
      <p>QP ::= QP1 : QP2 j fQP1g UNION fQP2g j fQP1g MINUS fQP2g j QP1 OPTIONAL fQP2g j
j GRAPH I [ VQP1 j QP1 FILTER fRg j t = (I [ V) (I [ V) (I [ L [ V) j
j XfQPg j WfQPg j FfQPg j GfQPg j fQP1g U fQP2g j
j YfQPg j ZfQPg j PfQPg j HfQPg j fQP1g S fQP2g
Operator SPARQ{LTL Syntax Meaning
X q NEXT Evaluate q on version hc+1
F q EVENTUALLY Evaluate q on all versions hc; ::::hm
G q ALWAYS The evaluation of q must be the same on all versions hc; ::::hm
q1 U q2 UNTIL If S2 is the solution of q2 in a version, hk 2 fhc; ::::hmg then
there exists a solution S1 of q1 on hc such that</p>
      <p>S1 is compatible with S2 in all versions fhc; ::::hkg
Y q PREVIOUS Evaluate q on version hc 1
P q PAST Evaluate q on all versions h1; ::::hc
H q ALWAYSPAST The evaluation of q must be the same on all versions h1; ::::hc
q1 S q2 SINCE If S2 is the solution of q2 in a version, hk 2 fh1; ::::hcg then
there exists a solution S1 of q1 on fhk; ::::hcg such that</p>
      <p>S1 is compatible with S2 in all versions fhk; ::::hcg</p>
      <p>Example 2. Find the name of the coach of the Italian national football team after
the sacking of Cesare Prandelli.
SELECT ?n WHERE {
PAST {
dbp:INFT dbpo:coach dbp:CP.</p>
      <p>NEXT {
dbp:INFT dbpo:coach ?n.</p>
      <p>FILTER (?n != dbp:CP )
}
}
}</p>
      <p>Translation into SPARQL
SELECT ?n WHERE {
{GRAPH &lt;http://gize.org/v5&gt; {
dbp:INFT dbpo:coach dbp:CP.</p>
      <p>GRAPH &lt;http://gize.org//v6&gt;
{dbp:INFT dbpo:coach ?n. FILTER (?n != dbp:CP )}</p>
      <p>} } UNION ...... UNION
{GRAPH &lt;http://gize.org//v1&gt; {
dbp:INFT dbpo:coach dbp:CP.</p>
      <p>GRAPH &lt;http://gize.org//v2&gt;
{dbp:INFT dbpo:coach ?n. FILTER (?n != dbp:CP )
} } }}</p>
      <p>In the previous query, dbp:CP is a shorthand for dbp:Cesare_Prandelli.
As before, the translation of PAST makes usage of UNION queries over each
versions vi; then, for each vi, NEXT checks in version vi+1 (via a FILTER) that the
coach changed.
3</p>
      <p>
        Conclusions
We have outlined Gize, which enables to set-up an infrastructure for
querying historical RDF data on existing SPARQL processors. Gize adopts a simple
approach to store di erent versions of the data and a powerful temporal
extension of SPARQL called SPARQ{LTL. As a future work, we are considering
approaches like RDF HDT [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] to improve the storage space consumption.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>S.</given-names>
            <surname>Borgwardt</surname>
          </string-name>
          , M. Lippmann, and
          <string-name>
            <given-names>V.</given-names>
            <surname>Thost</surname>
          </string-name>
          .
          <source>Temporalizing Rewritable Query Languages Over Knowledge Bases. JWS</source>
          ,
          <volume>33</volume>
          :
          <fpage>50</fpage>
          {
          <fpage>70</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>G. D. De Giacomo</surname>
            and
            <given-names>M. Y.</given-names>
          </string-name>
          <string-name>
            <surname>Vardi</surname>
          </string-name>
          .
          <article-title>Linear Temporal Logic and Linear Dynamic Logic on Finite Traces</article-title>
          .
          <source>In IJCAI</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Fernandez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Mart</surname>
          </string-name>
          nez-Prieto,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gutierrez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Polleres</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Arias</surname>
          </string-name>
          .
          <article-title>Binary RDF Representation for Publication and Exchange</article-title>
          . JWS,
          <volume>19</volume>
          :
          <fpage>22</fpage>
          {
          <fpage>41</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Fernandez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Schneider</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and J.</given-names>
            <surname>Umbrich</surname>
          </string-name>
          .
          <article-title>The DBpedia Wayback Machine</article-title>
          .
          <source>In SEMANTICS</source>
          , pages
          <volume>192</volume>
          {
          <fpage>195</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>S.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Gu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Zaniolo.</surname>
          </string-name>
          RDF-TX:
          <article-title>A Fast, User-Friendly System for Querying the History of RDF Knowledge Bases</article-title>
          .
          <source>In EDBT</source>
          , pages
          <volume>269</volume>
          {
          <fpage>280</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>R.</given-names>
            <surname>Mateescu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Meriot</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Rampacek</surname>
          </string-name>
          .
          <source>Extending SPARQL with Temporal Logic. Report</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>7. H. Van de Sompel</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Sanderson</surname>
            ,
            <given-names>M. L.</given-names>
          </string-name>
          <string-name>
            <surname>Nelson</surname>
            ,
            <given-names>L. L.</given-names>
          </string-name>
          <string-name>
            <surname>Balakireva</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Shankar</surname>
            , and
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Ainsworth</surname>
          </string-name>
          .
          <article-title>An HTTP-based Versioning Mechanism for Linked Data</article-title>
          .
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>