<!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>Visual Query Environment over RDF Data</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kārlis Čerāns</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jūlija Ovčiņņikova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lelde Lāce</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jūlija Hodakovska</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Aiga Romāne</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mikus Grasmanis</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Elīna Kalniņa</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Artūrs Sproģis</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Agris Šostaks</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Mathematics and Computer Science, University of</institution>
          <country country="LV">Latvia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We demonstrate the interactive ViziQuer environment for composing rich visual queries (including aggregation, nesting and data expressions) over SPARQL endpoints. We describe the interactive means for building the visual constructs of the query language and discuss the user study results on the query environment usability. The ViziQuer tool environment is publicly available and open source.</p>
      </abstract>
      <kwd-group>
        <kwd>Visual queries</kwd>
        <kwd>query environment</kwd>
        <kwd>ad-hoc queries</kwd>
        <kwd>RDF</kwd>
        <kwd>SPARQL</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Visual query composition paradigm (cf. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]) along with facet-based
([
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]) and controlled natural language based ([
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]) approaches offers a promising
avenue for involving end-users in query composition over SPARQL endpoints (cf. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]).
      </p>
      <p>
        The recent ViziQuer notation ([
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]) allows for visual presentation of rich instance
level and aggregate queries, involving data expressions, as well as query nesting, with
expressive power approaching that of the full SPARQL 1.1 [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The corresponding
query construction environment reported so far [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] has been rather basic with
hierarchic property pane of the visual elements as the primary query building tool.
      </p>
      <p>
        We shall report in this paper and present in the demonstration:
 Interactive rich visual query building environment with class tree basis and
context-based query construction options;
 Context-dependent code completion of attribute and condition expressions and
property paths;
 Ready-to-use data schemas over a number of existing public Linked data
endpoints (the query examples in this paper are over Scholarly data endpoint [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]).
      </p>
      <p>The user studies identifying the strengths as well as remaining areas of necessary
attention within the visual query creation environment are discussed, as well.</p>
      <p>
        There are interactive multi-modal visual query creation environments available in
Optique VQs [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and LinDA [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] visual query systems. The ViziQuer system considered
here is meant for much wider visual query range (including aggregation and subqueries,
as well as textual language for conditions and attribute expressions).
      </p>
      <p>The open source ViziQuer query environment and its supporting resources are
available from the home page http://viziquer.lumii.lv/, including the tool local set up options.</p>
    </sec>
    <sec id="sec-2">
      <title>Notation Examples</title>
      <p>The visual queries are formulated in the context of a data dictionary that is a part of the
data schema used by the ViziQuer tool (cf. Section 3), the data dictionary maps the
entity short names used in the visual query presentations to their full IRIs.</p>
      <p>
        Each query is a connected graph with one main query node (orange round rectangle).
The query examples in Table 1, formulated over Scholarly Data schema [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], show a
class-attribute-link-condition option (1), queries with aggregation and grouping (2 and
3), queries with nested aggregation (4 and 5) and queries with advanced structure (6
and 7). The ViziQuer notation is explained in detail in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and the ViziQuer tool
home page. The new notations here, if compared to [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], involve explicit grouping (3),
instance IRI references (4 and 7) and distinct values concrete syntax (5).
6. For every conference find the
number of persons that are either authors
of its proceeding papers or have some
role during the conference.
      </p>
      <p>The visual links from the union node
[+] describe the data links from the
Conference instances.
7. Find the keywords used in
proceeding papers of both iswc and eswc
conferences in 2017, with respective
usage counts, order descending by the
usage count in iswc 2017.</p>
      <p>The unit node [] is a wrapper around
the two subquery results (there can be
combining, filtering, or even further
aggregation within wrapper nodes).
3</p>
    </sec>
    <sec id="sec-3">
      <title>Query Environment</title>
      <p>The query environment serves the creation of queries (such as the ones listed in Table
1) over a knowledge graph schema describing the structure of the data to be analyzed.</p>
      <p>The query environment setup requires loading the data schema, listing the available
entity names and connections. The data schema can be extracted either from an OWL
ontology or directly from the SPARQL endpoint. There is a list of pre-built schemas,
as well as the reference to the schema extraction service available at the ViziQuer
Schema Store1. The Scholarly data schema used in the Section 2 examples has been
retrieved into the Schema Store from the Scholarly Data SPARQL endpoint2. There is
also an example project with the Scholarly data queries available in the Schema Store.</p>
      <p>The reference to a SPARQL endpoint is to be specified within a project (in the
project parameter window), if the queries are to be directly executed over the endpoint.</p>
      <p>The query creation process typically starts by double clicking a node in the class tree
(Fig. 1, left) thus adding a query node (orange round rectangle) with this class into the
query pane. Figure 1, center, shows the context menu available for nodes within the
visual diagram. The attributes, ascribed to the class (or to its superclass, or a subclass)
in the data schema, can be checked to be added to the query output via the Add
Attributes context menu item (the attribute choice dialogue example is in Figure 1, right; the
(select this) option adds the class instance URI itself; the [+] button expands the choice
list to offer object property selection options, as well).</p>
      <p>At this point the query SPARQL form can be generated or the query can be executed
over the provided SPARQL endpoint using the respective context menu commands.
1 http://viziquer.lumii.lv/schema-store/index.html
2 http://www.scholarlydata.org/sparql/</p>
      <p>There are also separate context menu items for aggregation (e.g. count) option and
condition introduction into the query nodes. The full editing facilities of the visual
query element properties are available in the designated property pane that can be used
for structural element introduction, fine-tuning, editing and deleting alike.</p>
      <p>There are two options of linked node introduction into a query: either by introducing
both nodes (typically, classes) into the query pane and then connecting the nodes by a
link from the diagram symbol palette, or the Add Link option from the class context
menu that suggests adding the links with schema-defined properties for the class,
together with the property target classes. Both link creation options distinguish the class
join links from the nested query links (links with black bullets, as e.g. in Table 1
examples 4, 5, 6 and 7). The Add Link dialogue further on offers a wizard for fast introducing
of aggregation into the nested query, together with its result handling within the host
query, as e.g. in query 4 in Table 1.</p>
      <p>The textual expression information entry within attribute expression and condition
fields and in line property paths is supported by a code completion option that is aware
of the expression focus placement with respect to the data schema and the field position
within the query. So, entering the property paths e.g. in queries 3, 5 and 6 in Table 1,
each property name in the path is gradually offered to the end user after the entry of the
previous property name, followed by the dot that indicates the continued navigation.</p>
      <p>The query re-shape options involve a service for changing the query main class, and
a more fundamental Add Outer Query option that adds a non-data node ‘[ ]’ introducing
the outer query level around the current base query, as e.g. in query 7 in Table 1.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Discussion and Conclusions</title>
      <p>
        An earlier user study with Computer Science master’s degree students has shown [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
that for persons literate in computing the visual query composition is easier than
corresponding query writing directly in SPARQL. Still, the study indicated not very high
productivity in visual query creation (on average just 5.27 successful queries within 70
minutes [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]). To test the query composition environment improvements from [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], we repeated the test (the visual notation part) with 28 similarly prepared
participants (the students of the same study course the next year), and the average correctly
completed query score has risen to 7.5 under similar conditions. Meanwhile, the most
difficult query task with aggregating over attribute under the condition of existential
nested query that has reached only 25% (2 of 8) correct score among those attempted
the query in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], did receive the rather unconvincing 45% (9 of 20) here. The analysis
of the study results has allowed to identify issues in query composition, resolved in the
current tool release, leading to a hope that the ViziQuer tool can ease the query
composition task over RDF data stores at least for technically literate persons.
      </p>
      <p>The ViziQuer tool is open source. To ease the local ViziQuer server usage, a
prebuilt Docker environment with the tool is offered. The further usability improvements
including the integrated and more efficient data schema retrieval is work in progress.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Soylu</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giese</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jimenez-Ruiz</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vega-Gorgojo</surname>
          </string-name>
          , G..,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Experiencing OptiqueVQS: A Multi-paradigm and Ontology-based Visual Query System for End Users</article-title>
          .
          <source>Universal Access in the Information Society, March</source>
          <year>2016</year>
          , Volume
          <volume>15</volume>
          , Issue 1, pp
          <fpage>129</fpage>
          -
          <lpage>152</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Zviedris</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barzdins</surname>
          </string-name>
          , G.:
          <article-title>ViziQuer: A Tool to Explore and Query SPARQL Endpoints</article-title>
          .
          <source>In: The Semantic Web: Research and Applications</source>
          ,
          <string-name>
            <surname>LNCS</surname>
          </string-name>
          , Volume
          <volume>6644</volume>
          , pp.
          <fpage>441</fpage>
          -
          <lpage>445</lpage>
          , (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>B.</given-names>
            <surname>Kapourani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Fotopoulou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Papaspyros</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zafeiropoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mouzakitis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.Koussouris.</given-names>
            ,
            <surname>Propelling SMEs Business Intelligence</surname>
          </string-name>
          <article-title>Through Linked Data Production and Consumption</article-title>
          ,
          <source>In OTM OTM 2015</source>
          Workshops pp
          <fpage>107</fpage>
          -
          <lpage>116</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Haag</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lohmann</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Siek</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ertl</surname>
          </string-name>
          , T.:
          <article-title>QueryVOWL: Visual Composition of SPARQL Queries</article-title>
          . In: The Semantic Web:
          <article-title>ESWC 2015 Satellite Events</article-title>
          .
          <source>LNCS</source>
          , Vol.
          <volume>9341</volume>
          , pp.
          <fpage>62</fpage>
          -
          <lpage>66</lpage>
          . Springer, (
          <year>2015</year>
          ), http://vowl.visualdataweb.org/queryvowl/
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>K.</given-names>
            <surname>Cerans</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Barzdins</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sostaks</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Ovcinnikova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Lace</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Grasmanis</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Sprogis</surname>
          </string-name>
          .
          <article-title>Extended UML Class Diagram Constructs for Visual SPARQL Queries in ViziQuer/</article-title>
          web In Voila!
          <year>2017</year>
          , CEUR Workshop Proceedings, Vol.
          <year>1947</year>
          , (
          <year>2017</year>
          ) pp.
          <fpage>87</fpage>
          -
          <lpage>98</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>G.</given-names>
            <surname>Vega-Gorgojo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Giese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Heggestoyl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Soylu</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. Waaler.</surname>
          </string-name>
          <article-title>PepeSearch: Semantic Data for the Masses</article-title>
          .
          <source>In: PLoS ONE 11(3): e0151573. doi: 10.1371/journal.pone.0151573</source>
          ,
          <year>2016</year>
          . http://dx.doi.org/10.1371/journal.pone.0151573
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>A.</given-names>
            <surname>Khalili</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Meroño-Peñuela. WYSIWYQ --- What You See Is What You</surname>
          </string-name>
          <article-title>Query</article-title>
          . In Voila!
          <year>2017</year>
          ,
          <string-name>
            <surname>CEUR</surname>
          </string-name>
          , Vol.
          <year>1947</year>
          , (
          <year>2017</year>
          ) pp.
          <fpage>123</fpage>
          -
          <lpage>130</lpage>
          . http://ceur-ws.
          <source>org/</source>
          Vol-1947/paper11.pdf
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8. S.Ferré:
          <article-title>Sparklis: An expressive query builder for SPARQL endpoints with guidance in natural language</article-title>
          ,
          <source>Semantic Web</source>
          ,
          <year>2017</year>
          , Vol
          <volume>8</volume>
          , pp
          <fpage>405</fpage>
          -
          <lpage>418</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Čerāns</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Šostaks</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bojārs</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bārzdiņš</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ovčiņņikova</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lāce</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grasmanis</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Sproģis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <article-title>ViziQuer: A Visual Notation for RDF Data Analysis Queries</article-title>
          .
          <source>In Research Conference on Metadata and Semantics Research</source>
          . Springer CCIS, Vol.
          <volume>846</volume>
          , pp.
          <fpage>50</fpage>
          -
          <lpage>62</lpage>
          ,
          <year>2018</year>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <article-title>SPARQL 1.1 Query Language</article-title>
          .
          <source>W3C Recommendation 21 March</source>
          <year>2013</year>
          , http://www.w3.org/TR/2013/REC-sparql11
          <string-name>
            <surname>-</surname>
          </string-name>
          query-20130321/
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Čerāns</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Šostaks</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bojārs</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ovčiņņikova</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lāce</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grasmanis</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Romāne</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sproģis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bārzdiņš</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <article-title>ViziQuer: A Web-Based Tool for Visual Diagrammatic Queries Over RDF Data</article-title>
          . In:
          <article-title>ESWC 2018 Satellite Events</article-title>
          .
          <source>LNCS</source>
          , vol
          <volume>11155</volume>
          , pp.
          <fpage>158</fpage>
          -
          <lpage>163</lpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>A. L.</given-names>
            <surname>Gentile</surname>
          </string-name>
          and
          <string-name>
            <given-names>A. G.</given-names>
            <surname>Nuzzolese.</surname>
          </string-name>
          cLODg - Conference Linked Open Data Generator.
          <source>In ISWC 2015 Posters &amp; Demonstrations Track, CEUR-WS.org</source>
          , Vol.
          <volume>1486</volume>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>