<!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>Exposing the Deep Web in the Linked Data Cloud</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrea Cal</string-name>
          <email>andrea@dcs.bbk.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe De Santis</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tommaso Di Noia</string-name>
          <email>tommaso.dinoia@poliba.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nicola Mincuzzi</string-name>
          <email>n.mincuzzig@studenti.poliba.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>London Knowledge Lab</institution>
          ,
          <addr-line>Birkbeck</addr-line>
          ,
          <institution>University of London</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>SisInf Lab, Politecnico di Bari</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>The Deep Web is constituted by dynamically generated pages, usually requested through a HTML form; it is notoriously di cult to query and to search, as its pages are obviously non-indexable. More recently, Deep Web data have been made accessible through RESTful services that return information usually structured in JSON or XML format. We propose techniques to make the Deep Web available in the Linked Data Cloud, and we study algorithms for processing queries, posed in a transparent way on the Linked Data, on the underlying Deep Web sources. The tool we developed mainly focuses on exposing RESTful services as Linked Data datasets thus allowing a smoother semantic integration of di erent structured information sources in a global dataand knowledge-space.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Slowly but steadily, the Web has moved from a huge collection of unstructured
textual documents to a gigantic repository of structured data. At a rst stage,
the original static Web pages have been replaced by dynamic ones fed by
information coming from Deep web data sources which cannot be directly queried.
Then we assisted to the ourishing of new services that expose structured data
by exploiting standard Web technologies thus making possible their composition
for the creation of new integrated applications (mash-ups [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]) and knowledge
spaces. Among the various technological proposals and approaches for data
publication on the Web which survived to the present days, the two most relevant
ones are for sure: RESTful services [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and Linked Data (LD) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The former is
a very agile way of exposing data in a request/response way over HTTP and has
been widely adopted by programmers thanks to its easiness of implementation.
Data are usually returned in XML or JSON documents after the invocation of a
service. Among the issues related to pure a RESTful approach we may mention:
{ no explicit semantics attached to the returned data1;
1 Actually, with JSON-LD this issue could be solved but this format is not widely
adopted yet.
{ lack of a unique query language to invoke services. Each service exposes its
own API which can considerably di er from each other even when they refer
to the same knowledge domain;
{ manual integration of di erent data sources.
      </p>
      <p>On the other side, the Linked Data (LD) approach bases on the idea that data
can be delivered on the Web together with their explicit semantics by means of
common vocabularies. Following the Linked Data principles2, datasets should be
accessible through a SPARQL endpoint. Moreover, by using federated queries3
an agent is able to automatically integrate data coming from di erent sources
thus creating a data space at a Web scale. Unfortunately, also the Linked Data
approach comes with its drawbacks:
{ the e ort in setting up a SPARQL endpoint is felt more di cult than a
RESTful approach from service providers. Nowadays, it is much easier to
nd a JSON-based service than a LD-based one.
{ programmers are more used to JSON services than to SPARQL endpoints;
{ service providers are usually not interested in exposing all the data they have
but only a small portion.</p>
      <p>Based on the above points we can see that while from the practical point of
view the champion is the RESTful approach, if we look at the knowledge point
of view Linked Data represents a much better alternative. This was the leading
observation that inspired us in the development of PoLDo. With PoLDo we can
expose an already existing RESTful service, even a third-party one, as a SPARQL
endpoint thus making it part of the Linked Data cloud. Thanks to a con gurable
query planner, PoLDo is able to break down a SPARQL query into a sequence of
RESTful service invocations. Starting from the retrieved data it then builds the
answer to the original SPARQL query.</p>
      <p>The remainder of this paper is structured as follows. In the next section we
report on some relevant related work on accessing the Deep Web while in Section
3 we describe PoLDo together with an explanatory example. Conclusion closes
the paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        The term Deep Web (sometimes also called Hidden Web) [
        <xref ref-type="bibr" rid="ref3 ref4 ref8 ref9">9,8,3,4</xref>
        ] refers to the
data content that is created dynamically as the result of a speci c search on the
web. For example, when we query a Yellow Pages website, the generated output
is the result of a query posed on an underlying database, and cannot be indexed
by a search engine. In this respect, the Deep Web content resides outside web
pages, and is only accessible through interaction with the web site { typically
via HTML forms.
2 https://www.w3.org/DesignIssues/LinkedData.html
3 https://www.w3.org/TR/sparql11-federated-query/
      </p>
      <p>
        As an example of Deep Web source, the whitepages.com website presents a
form where, when searching by name, the last name is a required eld. In order
to look for a person named Joseph Noto, living in New Jersey, we would ll
the form which in relational terms, corresponds to issuing a SQL query to the
underling database. Therefore, a Deep Web source can be naturally modeled as a
relational table (or a set of relational tables) where not all queries are allowed; in
fact, access limitations exist on such relations. In particular, they can be queried
only according to so-called access patterns, each of which enforces the selection
on some of the attributes (which corresponds to lling the corresponding eld
in the form with a value). It is believed that the size of the Deep Web is several
orders of magnitude larger [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] than that of the so-called Surface Web, i.e., the
web that is accessible and indexable by search engines. The information stored in
the Deep Web is invaluable, but at the same time hard to collect automatically
on a reasonably large scale.
      </p>
      <p>
        Two main approaches for accessing the Deep Web exist [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. In the vertical
data integration approach, each Deep Web site is a data source, and sources are
integrated and uni ed by a global schema representing the domain of interest.
Normally, in this approach one deals with a relatively small number of sources,
storing data related to a single domain of interest. In the Surfacing approach,
instead, answers are pre-computed from Deep Web sources by posing suitable
queries, and then the results are indexed as normal static pages in a search
engine. Accessing the Deep Web requires a variety of techniques and tools from
several areas of computer science. In this paper we survey some of the most
relevant approaches to querying and searching the Deep Web. One important
problem in accessing the Deep Web is the automatic understanding of the
semantics of the so-called query interfaces, that is, the forms that provide access to
Deep Web sources. Several approaches have been developed, based on heuristics
or learning from samples; some techniques involve domain-speci c knowledge
encoded in ontological rules. Processing structured query over Deep Web sources
is the key problem in the integration of such sources. Interestingly, when Deep
Web sources are modeled, as mentioned, as relations with access patterns (i.e.,
having certain attributes that are necessarily to be selected in order to query
the source), answering a simple conjunctive (select-project-join) query on such
sources may require, in the worst case, the evaluation of a recursive Datalog
query. This raises the issue of reducing the number of accesses to sources while
answering a query.
      </p>
      <p>
        The problem of answering a query over sources with access patterns falls into
the setting of vertical data integration, where a limited number of Deep Web
sources, whose interface is known (having been possibly understood
automatically), are queried in a structured way. But if we want to search via keyword
search the Deep Web together with the ordinary, \shallow" Web, we cannot rely
on a set of known sources, and therefore we have to adopt the surfacing approach.
Surfacing the Deep Web poses several challenges because it is not easy to get
a good coverage of the content of a source while at the same time limiting the
number of sampling accesses on it. Keyword search on relational databases has
been traditionally studied in several works in the literature (see e.g., [
        <xref ref-type="bibr" rid="ref1 ref6">1,6</xref>
        ]). It is
interesting to consider keyword search also on Deep Web sources, in the context
of vertical Deep Web integration. In this case, a suitable notion of answer to
keyword queries is needed.
3
      </p>
      <p>
        PoLDo
The high level architecture of PoLDo is represented in Fig. 1. The engine is
responsible of getting the SPARQL query and breaking it down to a sequence of
RESTful calls to a remote service. The transformation is made possible thanks
to a mapping le that maps Linked Data URIs to the elements of the signature
of the remote call. While querying the remote service, PoLDo feeds an RDF local
triple store (Jena Fuseki in its current implementation) which is in charge of
processing the actual SPARQL query. More in details, we have:
PoLDo engine It receives the SPARQL query and extracts all the constants from
the graph template in the WHERE clause. Then, by using the algorithm in
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], it uses the constants to query the external service and to get the data
that will be used to create a local RDF representation of the data space.
Thanks to the information encoded in the PoLDo mapping le, the engine is
able to feed a local repository of RDF triples.
      </p>
      <p>Jena Fuseki The triple store is used to save a LD version of the data which
are incrementally retrieved from the RESTful service. The availability of a
third-party triple store makes PoLDo able to support the full speci cation of
SPARQL query language. Furthermore, it is able to return the data in all
the formats supported by Jena Fuseki.</p>
      <p>PoLDo mapping le This le contains information about how to map the URIs
of the SPARQL query to inputs and outputs of the service. Moreover, it also
describes the entities represented by inputs and outputs as well as their
mutual relations.
3.1</p>
      <p>PoLDo mapping language
PoLDo mapping le allows the designer to create a link between URIs contained
in the SPARQL queries processed by the engine and, at the same time, to
enrich their semantics by explicitly adding information about the corresponding
OWL class or property that can be de ned also in an external vocabulary (e.g.
DBpedia). Mapping rules can also be created to describe RDF triples containing
information on how to relate values of an input parameter with the outputs of
the service invocation. All the rules contained in the PoLDo mapping le are, in
turn, represented as RDF triples which refers to a corresponding RDF-S
ontology. The main element of the PoLDo ontology is the class poldo:Service (see
Fig. 2). It describes each service in terms of its base URL (poldo:hasUrl), the</p>
      <p>
        HTTP method GET or POST (poldo:hasMethod), the language of the answer
to the service call, e.g. XML or JSON (poldo:hasLanguage) and its inputs and
outputs (poldo:hasInput and poldo:hasOutput). The ontological description
of poldo:Input and poldo:Output are represented respectively in Fig. 3 and
Fig. 4. As we can see, both inputs and outputs of a services can be mapped
as instances of a class or as a property. Indeed, especially when the type of
the corresponding value is di erent from a string, we may have cases when the
parameter is better represented by a property rather than the subject or
object of a triple. We may think at a geographical service returning places based
on their coordinates. In this case, coordinates are better mapped to the
properties geo:lat and geo:long of the Basic Geo vocabulary4. The modeling of
poldo:Input and poldo:Output classes try to catch all possible cases in the
description of the inputs and outputs of a service. For instance, the
parameter poldo:hasFixedValue is used when we need a key to access the RESTful
service. As for poldo:Output we just highlight that it possible to model the
4 https://www.w3.org/2003/01/geo/
situation when the service returns a single value or a list of values by means of
the poldo:hasStructure and rdf:li statements.
The main component of PoLDo is its query planner implemented in the PoLDo
engine module. It uses the algorithm presented in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] to iteratively query the
RESTful services and build a local cache containing the RDF version of the
data whose transformation follows the rules available in the PoLDo mapping le.
      </p>
      <p>For a better understanding of the overall approach, we now describe how
PoLDo engine works by means of an example. Suppose we have two services
related to music events in a city as in the following.</p>
      <p>service input output
http://example.com/api/returnSinger city title, singer
http://example.com/api/returnPlace singer city, country
Given a city, the rst service returns the title of the events in that city together
with the performing artist. The second service returns the birth place of an
artist. The corresponding mapping le will then contain the following triples:
:returnArtist a poldo:Service ;
poldo:hasURL ''http://example.com/api/returnSinger'' ;
poldo:hasLanguage ''JSON'' ;
poldo:hasMethod ''GET'' ;
poldo:hasInput :city ;
poldo:hasOutput :title ;
poldo:hasOutput :singer .
:returnPlace a poldo:Service ;
poldo:hasURL ''http://example.com/api/returnPlace'' ;
poldo:hasLanguage ''JSON'' ;
poldo:hasMethod ''GET'' ;
poldo:hasInput :singer ;
poldo:hasOutput :city ;
poldo:hasOutput :country ;
Now suppose we want to know the name of singers born in a speci c city. The
corresponding SPARQL query is then:
SELECT ?singer
WHERE {
?singer dbo:birthPlace ?city .
?city rdfs:label ''modena'' .
?singer a dbo:Person .</p>
      <p>?city a dbo:Place .
}
LIMIT 1
The only entry points PoLDo engine has to query the services are constant symbols,
in our case modena whose corresponding entity is declared to be a dbo:Place in the
SPARQL query. By looking at the mapping le, the engine discovers it can query the
service :returnArtist. Then, by using the outputs (constants) of the rst service,
the engine may query :returnPlace and, if lucky, it can get that one of the artists
returned by :returnArtist was born in modena. If this is not the case, the engine uses
the constants returned by :returnPlace to query again :returnArtist thus continuing
its search of the answer for the original SPARQL query. It is worth noticing that while
iteratively querying the services, PoLDo builds RDF triples by creating fresh entities
corresponding to the arriving constants and by enriching and connecting them thanks
to the rules states in rows 15-20 of the above mapping le. All the triples are saved in
the triple store which is then natively queried by means of the original SPARQL query.
PoLDo engine stops querying the original services in the following cases: (i) the answer
to the query is found; (ii) there are no more fresh constants and then the answer to
the original query can not be found; (iii) the execution time exceeds a timeout set by
the designer.
4</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>In this paper we presented PoLDo, that acts as a middleware between a RESTful service
and SPARQL endpoint. By means of PoLDo we are allowed to expose the Deep Web
data available via RESTful services as Linked Data that can be easily integrated in the
so called Linked Data Cloud. The tool we developed adopts algorithms and techniques
coming from the Deep Web literature to make possible the composition of services
at a data level. Via a mapping le, PoLDo is able to interpret a SPARQL query in
terms of a sequence of remote calls to external services and to translate the returned
data in a temporary RDF graph which is locally stored in a triple store. The approach
we developed is for sure a step forward the creation of a global, semantics-enabled,
integrated, gigantic data graph as in the original view of the Semantic Web.
Acknowledgments. Andrea Cal acknowledges partial support by the EPSRC project
\Logic-based Integration and Querying of Unindexed Data" (EP/E010865/1) and by
the EU COST Action IC1302 KEYSTONE.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>S.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chaudhuri</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Das</surname>
          </string-name>
          .
          <article-title>Dbxplorer: A system for keyword-based search over relational databases</article-title>
          .
          <source>In ICDE</source>
          , pages
          <volume>5</volume>
          {
          <fpage>16</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>C.</given-names>
            <surname>Bizer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Heath</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Berners-Lee</surname>
          </string-name>
          .
          <article-title>Linked data - the story so far</article-title>
          .
          <source>Int. J. Semantic Web Inf. Syst</source>
          ,
          <volume>5</volume>
          (
          <issue>3</issue>
          ):1{
          <fpage>22</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>A.</given-names>
            <surname>Cal</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Martinenghi</surname>
          </string-name>
          .
          <article-title>Querying data under access limitations</article-title>
          .
          <source>In Proceedings of the 24th IEEE International Conference on Data Engineering (ICDE</source>
          <year>2008</year>
          ), pages
          <fpage>50</fpage>
          {
          <fpage>59</fpage>
          . IEEE Computer Society Press,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>K.</given-names>
            <surname>Chen-Chuan Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>He</surname>
          </string-name>
          , and
          <string-name>
            <surname>Z. Zhang.</surname>
          </string-name>
          <article-title>Toward large scale integration: Building a metaquerier over databases on the web</article-title>
          .
          <source>In Proc. of CIDR</source>
          , pages
          <volume>44</volume>
          {
          <fpage>55</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>R. T.</given-names>
            <surname>Fielding</surname>
          </string-name>
          and
          <string-name>
            <given-names>R. N.</given-names>
            <surname>Taylor</surname>
          </string-name>
          .
          <article-title>Principled Design of the Modern Web Architecture</article-title>
          .
          <source>ACM Transactions on Internet Technology</source>
          ,
          <volume>2</volume>
          (
          <issue>2</issue>
          ):
          <volume>115</volume>
          {
          <fpage>150</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>V.</given-names>
            <surname>Hristidis</surname>
          </string-name>
          and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Papakonstantinou</surname>
          </string-name>
          . Discover:
          <article-title>Keyword search in relational databases</article-title>
          .
          <source>In Proceedings of the 28th International Conference on Very Large Data Bases, VLDB '02</source>
          , pages
          <fpage>670</fpage>
          {
          <fpage>681</fpage>
          . VLDB Endowment,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>G.</given-names>
            <surname>Kabra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Chen-Chuan Chang</surname>
          </string-name>
          .
          <article-title>Dewex: An exploration facility for enabling the deep web integration</article-title>
          .
          <source>In Proc. of ICDE</source>
          , pages
          <volume>1511</volume>
          {
          <fpage>1512</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>J.</given-names>
            <surname>Madhavan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Afanasiev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Antova</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A. Y.</given-names>
            <surname>Halevy</surname>
          </string-name>
          .
          <article-title>Harnessing the deep web: Present and future</article-title>
          .
          <source>In Proc. of the 4th Conf. on Innovative Database Research (CIDR</source>
          <year>2008</year>
          ),
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>D.</given-names>
            <surname>Martinenghi</surname>
          </string-name>
          .
          <article-title>Access pattern</article-title>
          . In H. C. A. van Tilborg and S. Jajodia, editors,
          <source>Encyclopedia of Cryptography and Security, 2nd Edition</source>
          , pages
          <volume>17</volume>
          {
          <fpage>20</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>A.</given-names>
            <surname>Soylu</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          <article-title>M dritscher</article-title>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wild</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. D.</given-names>
            <surname>Causmaecker</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Desmet</surname>
          </string-name>
          .
          <article-title>Mashups by orchestration and widgetbased personal environments: Key challenges, solution strategies, and an application</article-title>
          .
          <source>Program</source>
          ,
          <volume>46</volume>
          (
          <issue>4</issue>
          ):
          <volume>383</volume>
          {
          <fpage>428</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>