<!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>Optimizing RDF Data Cubes for Efficient Processing of Analytical Queries</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kim A. Jakobsen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alex B. Andersen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Katja Hose</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Torben Bach Pedersen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, Aalborg University</institution>
          ,
          <country country="DK">Denmark</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In today's data-driven world, analytical querying, typically based on the data cube concept, is the cornerstone of answering important business questions and making data-driven decisions. Traditionally, the underlying analytical data was mostly internal to the organization and stored in relational data warehouses and data cubes. Today, external data sources are essential for analytics and, as the Semantic Web gains popularity, more and more external sources are available in native RDF. With the recent SPARQL 1.1 standard, performing analytical queries over RDF data sources has finally become feasible. However, unlike their relational counterparts, RDF data cubes stores lack optimizations that enable fast querying. In this paper, we present an approach to optimizing RDF data cubes that is based on three novel cube patterns that optimize RDF data cubes, as well as associated algorithms that transform the RDF data cube. An extensive experimental evaluation shows that the approach allows trading additional storage and/or load times in return for significantly increased query performance. We further provide guidelines for which patterns to apply for specific scenarios and systems.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Data has become the fundamental resource for making informed decisions in almost
every organization. Traditionally, the data used for analytics is mostly internal, e.g., sales,
finance, or HR data and is processed using heavy Extract-Transform-Load (ETL) flows
and stored in relational data warehouses. It is then analyzed, typically using tools based
on multidimensional data cube concepts, where important business facts, e.g., a specific
lineitem, with associated numerical measures, e.g., price or quantity, are organized in a
multidimensional (cube) space spanned by hierarchical dimensions characterizing the
fact, e.g., the product being bought, the customer placing the order, and the order date.
Data cubes enable easy and efficient analytical queries that aggregate measure values
up to the desired level of detail.</p>
      <p>
        External data sources are becoming more and more important to get the full picture
of the situation, often in combination with internal data. Given the growth of the
Semantic Web, such external sources become increasingly available in RDF format, e.g.,
due to efforts in publishing Open Data as Linked Open Data [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. It is hence desirable
to integrate and query external (and internal) data directly in RDF format [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
Furthermore, the powerful inference of RDF is available to use in the RDF data cubes. RDF
data cube vocabularies, such as QB4OLAP [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], which we use in this paper, can be used
to specify the desired multidimensional semantics of the RDF data. RDF data can be
queried using SPARQL1 which provides the functionality needed for analytical queries.
      </p>
      <sec id="sec-1-1">
        <title>1 http://www.w3.org/TR/sparql11-query/</title>
        <p>Popular RDF stores, such as Jena TDB2 still lack the efficiency of their relational
counterparts when answering complex analytical queries. There is thus a significant need for
specialized optimization techniques.</p>
        <p>
          This paper introduces cube patterns, or patterns in short, as specialized optimization
techniques of RDF data cubes. The patterns are inspired by effective relational
representations of data cubes and differ from each other in their level of denormalization. In
summary, this paper makes the following novel contributions:
– Proposing three patterns for capturing different levels of denormalization of RDF
data cubes: snowflake pattern, star pattern, and fully denormalized pattern.
– Proposing the Semantic Web OLAP Denormalizer (SWOD) transformation
algorithm that converts an RDF data cube into a cube in either star pattern or fully
denormalized pattern.
– Providing an extensive experimental evaluation, based on the well-known
TPCH dataset [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] transformed into RDF, showing that the proposed patterns allow
effective trade-offs between storage space/load times and query performance.
To the best of our knowledge, this is the first paper proposing specialized optimization
techniques for RDF data cubes.
        </p>
        <p>The remainder of this paper is structured as follows. In Section 2, we introduce basic
concepts of RDF graphs and multidimensional cubes. Then, Section 3 discusses related
work. The cube patterns are presented in Section 4. Section 5 explains the
transformation algorithms. The results of our experimental evaluation are discussed in Section 6.
Section 7 concludes the paper with an outlook to future work.
2</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>In this section, we define important concepts and provide a basic understanding of
concepts that the rest of the paper is based upon.</p>
      <p>RDF Graphs. An RDF graph can be represented as a set of triples of the form
(s, p, o) that are each defined by a subject s, a predicate p, and an object o. A triple
encodes the existence of a relationship between subject s and object o, the nature of this
relationship is described by predicate p.</p>
      <p>Given a set of IRIs U , a set of blank nodes B, and a set of literals L, a triple t is
defined as t = (s, p, o) ∈ (U ∪ B) × U × (U ∪ B ∪ L). An RDF graph G consists of
a set of triples: G ⊆ (U ∪ B) × U × (U ∪ B ∪ L).</p>
      <p>An intuitive way of querying a graph is using triple patterns. A triple pattern may
contain variables at any position of a triple. Variables are denoted by a leading “?” in
their names, e.g., (?s, p, o). A basic graph pattern (BGP) consists of a set of triple
patterns connected via logical conjunctions.</p>
      <p>Given a set of IRIs U , a set of blank nodes B, a set of literals L, and a set of variables
V , a triple pattern T P is defined as T P = (s, p, o) ∈ (U ∪ B ∪ V ) × (U ∪ V ) ×
(U ∪ B ∪ L ∪ V ). A Basic Graph Pattern BGP is a set of triple patterns: BGP ⊆
(U ∪ B ∪ V ) × (U ∪ V ) × (U ∪ B ∪ L ∪ V ). When two or more triple patterns share a
variable, we say that there is a join between these triple patterns and the shared variable
is the join variable.</p>
      <p>When evaluating a BGP, {(s1, p1, o1) , (s2, p2, o2) , . . . , (sn, pn, on)} over a graph
G we use the notation G (s1 p1 o1 . s2 p2 o2 . . . . . sn pn on). The result is a bag of</p>
      <sec id="sec-2-1">
        <title>2 http://jena.apache.org/</title>
        <p>bindings for the variables in the BGP. In addition to BGP queries, this paper considers
SPARQL 1.1 extensions, such as grouping and aggregation.</p>
        <p>
          Multidimensional Cube. A multidimensional cube is a data structure used for
capturing and analyzing data [
          <xref ref-type="bibr" rid="ref10 ref12">10,12</xref>
          ]; broadly used in Decision Support Systems (DSSs)
over relational data. We call a multidimensional cube consisting of RDF an RDF data
cube or just a cube. We use the QB4OLAP vocabulary [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] to define the structure of
cubes, we discuss the alternatives in Section 3; in Section 4 we show how we use
QB4OLAP to define the instance data of our cubes.
Decision Support Systems (DSS) have originally emerged from relational database
systems but recently started to consider RDF as well. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], for instance, proposes to use
RDF data as so-called situational data, which is data with a short life span. This
situational data augments the relational data cubes to form fusion cubes. [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] integrates
RDF/OWL ontologies describing domains into relational storage in order to construct
multidimensional cubes. Whereas these works focus on ad-hoc data integration using
RDF in a relational data warehouse to store and query the data, we examine the
possibilities of building a data warehouse based on Semantic Web standards, i.e., RDF and
SPARQL 1.1.
        </p>
        <p>
          There are in general two approaches for constructing RDF data cubes: 1) Explicit
cube construction uses a vocabulary to define dimensions, measures, etc. The most
commonly used vocabularies to define cubes are: QB [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] and QB4OLAP [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. The W3C
standard QB is used to describe statistical cubes and defines the concepts of facts,
dimensions, and levels. The vocabulary QB4OLAP, has been created as an extension
of QB, and is more suited for OLAP cubes. It extends QB with aggregate functions,
cardinality, and hierarchies. We use QB4OLAP as our main vocabulary because of its
expressiveness and because it is specialized for OLAP. 2) Implicit cube construction
is when dimensions are implied by the structure of the data. [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] explains how to find
measures and dimensions based on a user-defined fact by analyzing an ontology.
Similarly, [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] generates an analytical schema which is a graph containing all facts; a fact
is selected and an analytical schema instance is created. By inference, a cube with the
selected fact can be constructed. Implicit cube construction techniques show much
potential but do not support construction of more advanced cubes, such as cubes with
multiple aggregation functions or complex hierarchies.
        </p>
        <p>
          [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] explores the performance of fully denormalized schemas, meaning that all
queries are performed on a single relational table – in some cases this improves query
evaluation time. For most cases, however, the denormalized schema is outperformed by
the snowflake schema. Our experiments show that denormalization improves query time
in most cases. In some cases, however, the redundant data cause a to large overhead.
        </p>
        <p>
          Several approaches addressing OLAP over graph data have been proposed [
          <xref ref-type="bibr" rid="ref13 ref4">4,13</xref>
          ].
The proposed techniques are highly optimized for graph stores representing data as
matrices. [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] relies on an extension of SPARQL, uses attribute graphs, and a special
framework. Likewise, [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] outlines a system featuring a special storage architecture
and components optimized to support analytical queries. If the queries are known
beforehand, then further optimization is possible by pre-computing results in the form of
materialized cubes [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. The techniques we propose in this paper, however, build upon
existing standards, efficiently support arbitrary queries, and can be implemented in any
triple store – the only requirement being that SPARQL 1.1 is supported.
4
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Cube Patterns</title>
      <sec id="sec-3-1">
        <title>In this section, we present three patterns for</title>
        <p>RDF data cubes: snowflake pattern, star
pattern, and fully denormalized pattern. We will
discuss the relationship between the different
patterns and how to derive them in Section 5.</p>
        <p>Snowflake Pattern. An RDF data cube
in snowflake pattern is normalized such that
each level is represented by one class in the
ontology; an instance of a level is called a
level member. Levels are arranged in
hierarchies that are organized in dimensions. Facts
Fig. 2: Snowflake pattern example
link to level members of the bottom level of a dimension. Figure 2 illustrates the
fact representing Ben’s purchase, :Lineitem 1 1, linking to a level member at
the Order level, :Order 1, which links to its parent at the Customer level member,
:Customer 1, and so on. In this example, there is a single attribute describing each
level member; in practice, more attributes are often used.</p>
        <p>Star Pattern. In a star pattern RDF data cube, all levels have been denormalized
into a dimension. An instance of a dimension is called a dimension member, e.g.,
:Order 1. A dimension member is a resource that has all attributes of all levels
in the given dimension. Figure 3 shows the Order dimension and a fact relating to
Ben’s purchase modeled as star pattern. In Figure 3, the level members :Region 3,
:Nation 7, :Customer 1, and :Order 1 from Figure 2 are merged into a
dimension member, called :Order 1.</p>
        <p>Fully Denormalized Pattern. In the fully denormalized pattern, in short
denormalized pattern, all level attributes are attached directly to the facts. In Figure 4 we
see Ben’s purchase modeled as denormalized pattern. The level members :Region 3,
:Nation 7, :Customer 1, and :Order 1 from Figure 2 are directly connected to
the fact :Lineitem 1 1.
5</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Denormalization Algorithms</title>
      <p>In this section, we discuss how to convert an RDF data cube from snowflake pattern
into star pattern and denormalized pattern by using the SWOD (Semantic Web OLAP
Denormalizer) algorithm. For ease of presentation, we first present the conversion from
snowflake pattern into star pattern and afterwards we highlight the differences for the
denormalized pattern. We first explain SwodStar (Algorithm 1), which is the main
algorithm and then proceed with its auxiliary functions. We assume that a cube is in
snowflake pattern because the commonly used multidimensional vocabularies
encourage this, and it is arguably the most intuitive way of organizing an RDF data cube. We
assume that the give QB4OLAP ontology strictly describe a single cube.</p>
      <p>Notation. We use two kinds of variables in the algorithms: BGP variables, which
are prefixed with a question mark “?”, and regular algorithm variables. In some places,
we use an algorithm variable in a BGP, which represents a constant (URI, literal, or
blank node) in the BGP. A graph G0 can be constructed by evaluating a BGP on a graph
G e.g., G0 = {(s, p, o) ∈ G (?s rdf:type t . ?s ?p ?o)}. G0 contains all triples with the
subject s that are instances of class t in graph G. If a BGP does not contain variables,
the result of its evaluation is a boolean value indicating whether the represented set of
triples is present in a given graph. We say that we merge a triple a into another triple b
in a graph G, when a triple is created with the subject of b and the predicate and object
of a. Note that we use [] to represent a blank node.
end
foreach (fact, prop, obj) ∈ cube(?fact qb:dataSet [ ] . ?fact ?prop ?obj) do
if onto(?structure qb:component ?component. ?component qb:attribute prop.) 6= ∅ ∨
onto(?structure qb:component ?component. ?component qb:measure prop.) 6= ∅ then</p>
      <p>cube0 = cube0 ∪ {(fact, prop, obj)};
Alg. 1: Conversion of an RDF data cube in snowflake pattern to star pattern
Cube Denormalization. SwodStar (Algorithm 1) converts an RDF data cube
from snowflake pattern into star pattern. It has two input parameters: the RDF data cube
in snowflake pattern (cube), see Figure 2, and the ontology describing the QB4OLAP
cube (onto), see Figure 1. SwodStar outputs an RDF data cube (cube0) in star pattern,
see Figure 3.</p>
      <p>The function GetBottemLevels finds the bottom level for each dimension and
returns a set of pairs (level, dim) (line 3). This is possible by traversing the levels
(qb4o:level) defined in the QB4OLAP ontology and finding the levels that are
not a parent level (qb4o:parentLevel), see Figure 1. The resulting set of pairs
is used as input to MergeLevel (Algorithm 2) along with cube and onto. The
MergeLevel algorithm (Algorithm 2) is called (line 5) to recursively merge level
members with their ancestors into dimension members, the obtained triples are added
to the new snowflake pattern cube cube 0. Next, SwodStar connects the
dimension members to the facts (line 6), see Figure 3; the algorithm creates triples such as
(:Lineitem 1 1, :has order, :Order 1). These triples are inserted into the star
pattern cube (cube0). The next step is to loop through the fact triples in the snowflake
pattern cube and add them to cube 0 (lines 8–12). In our example, we only have a single
fact :Lineitem 1 1, which has a single measure, namely :extendedprice; we
add this triple to cube0. Finally, we have converted the RDF data cube from snowflake
pattern into star pattern.</p>
      <p>
        Unbalanced Hierarchies. As dimension hierarchies may be unbalanced [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], it is
important to handle such cases. In Figure 5, we see an abstract example of an
unbalanced hierarchy. The circles represent level members, which have arrows labeled with
numbers representing the number of their attribute sets. An attribute set is the set of
attributes of a level member.
      </p>
      <p>When denormalizing, level members are merged into the bottom level member. In
the case where a level member does not have any children but is not the bottom level of
the dimension, then the ancestor level members are merged into it. For example the
Customer (cust0) does not have any orders and the Nation (nation) and Region (region) level
members are merged into the Customer (cust0) along with their attributes (Figure 6). In
the denormalized pattern, the same principle is used (Figure 7).
end</p>
      <p>end
Merging Level Members. The MergeLevel function (Algorithm 2) recursively
merges level members in a top down manner into dimension members. It has four input
parameters: a RDF data cube (cube), a QB4OLAP ontology (onto), the current level
(level) and the dimension of the level (dim). If the level member (level) has any parent
levels, then we recursively call MergeLevel for each of the parent levels (line 4).
When a top level member is reached then no parent levels will exist, thus line 5–12
will be skipped. dimMembers contains all attributes of the ancestor level members,
we merge the attributes of the current level member with these (line 15). The function
MergeURIs creates new attributes to avoid ambiguity among properties used in
multiple levels. We add the level name as a prefix to the property e.g., :name becomes
:nation name. We create mapping between the old and the new properties, so that
we can always rewrite queries to match a given triple pattern. The final step adds a triple
with the name of the current level (line 17).</p>
      <p>When we return from the recursion in line 4, we loop through every instance of the
parent levels (line 5). We merge the parent level members with the current level member
(line 7). To handle unbalanced hierarchies, we add ancestor level members that do not
have any children in the current level (lines 9–11).Every subsequent return is handled
in the same way. The returned triples of the initial call are dimension members, rather
than level members as illustrated in Figure 3.</p>
      <p>Fully Denormalized Cube. To construct a denormalized pattern cube, we use
similar algorithms as for the star pattern cube. In addition to creating the dimension
members, we further merge them with the facts, see Figure 4. To avoid ambiguity among
properties used in multiple dimensions, we additionally add the dimension name as
a prefix to the property e.g., :order nation name. In case of unbalanced
hierarchies, e.g., a customer without any orders, we create dimension members that are not
connected to any facts, as oppose to level members.</p>
      <p>Query Rewriting. To enable transparency for the user, formulating a query in
snowflake pattern, we need to rewrite the query such that it matches the structure of the
data in star pattern or denormalized pattern. In principle, a query formulated on the RDF
data cube in snowflake pattern can be transformed in a similar way as the cubes. More
precise, we loop through the triple patterns in the original query and determine the
referenced levels and dimensions using the QB4OLAP ontology. If the subject in the triple
pattern does not correspond to a bottom level, then we merge it with the corresponding
bottom level in the dimension and change the predicate to match the naming scheme,
e.g., ?nation :name ?name becomes ?order :nation name ?name.
Recall that level members are connected with the skos:broader predicate, see
Figure 2. When we denormalize the cube the level members are merged, thus triple patterns
with the skos:broader predicate can be removed. Query 1.1 is in snowflake pattern
and finds how much money customers from all nations have spent. Query 1.2 shows the
same query rewritten to match the star pattern.</p>
      <p>SELECT ? name sum ( ? p r i c e )
WH?ERliEn efi t e m : e x t e n d e d p r i c e ? p r i c e ;</p>
      <p>: h a s o r d e r ? o r d e r .
? o r d e r s k o s : b r o a d e r ? c u s t o m e r .
? c u s t o m e r s k o s : b r o a d e r ? n a t i o n .</p>
      <p>? n a t i o n : name ? name .
g
GROUP BY ? name</p>
      <p>Query 1.1: Snowflake pattern query
SELECT ? name sum ( ? p r i c e )
WH?ERliEn efi t e m : e x t e n d e d p r i c e ? p r i c e ;</p>
      <p>: h a s o r d e r ? o r d e r .</p>
      <p>? o r d e r : n a t i o n n a m e ? name .
g
GROUP BY ? name</p>
      <sec id="sec-4-1">
        <title>Query 1.2: Star pattern query</title>
        <p>In some cases query rewriting is not trivial. Assume, we are looking for the
number of orders placed by the customer whose name is Ben. The triple :Customer 1
:name "Ben" would be a match in the snowflake pattern (see Figure 2) and we can
use the triple pattern ?order skos:broader :Customer 1 to find his orders.
For the star pattern, however, we would find several triples, such as :Order 1 :name
"Ben" and :Order 2 :customer name "Ben". Here we do not know if Ben
and Ben is the same person. When the object is a literal (e.g. Ben) and the predicate
:name has not been defined as a functional property, we cannot know if it is the same
customer or not. In this case, we have to augment the query with a triple pattern using
the functional predicate of the customer and add a group by statement e.g., GROUP BY
?customer ID. If no functional property exist then we use the URI of the customer
resource to group the customers uniquely.
6</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Experiments</title>
      <p>In this section, we present the results of evaluating the techniques and report on the
performance of generating, loading, and querying the three patterns using data sets of
different sizes.</p>
      <p>Hardware platform. The experiments were run on a HP ProLiant DL385 server
with an AMD Opteron(tm) processor 6376 with 32 cores, it has 256 GB DDR3 RAM
and is running Ubuntu 14.04.1 LTS (Trusty Tahr). The data was stored on a 1 TB SCSI
disks running in a HP Smart Array.</p>
      <p>
        Dataset and queries. We use the well-known TPC-H benchmark [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], which was
designed for relational data warehouses and comes with a CSV data generator as well
as with 22 complex and challenging analytical queries.
      </p>
      <p>The TPC-H benchmark data is structured data about sales modeled as a snowflake
schema. The analytical queries in the benchmark are originally provided as SQL query
templates. We created SPARQL query templates based on the provided SQL
benchmark query templates; we transformed the query template such that they match the star
pattern and denormalized pattern, hence we have three sets of 22 query templates. The
query templates and further details are available at our homepage3.</p>
      <p>Pattern generation. We generated the Scale factor
TPC-H dataset at different scale factors us- 0.1 0.2 0.3 0.5
ing the supplied DBGEN program4. We Snowflake 15.2 30.4 45.5 75.9
defined cubes by converting the generated Star 17.7 35.4 53.0 88.4
comma separated files using the csv2ttl pro- Denormalized 41.5 82.9 124.5 207.3
gram, which is a part of the BIBM project, Table 1: Dataset sizes (millions of
and manually defined a snowflake pattern triples)
cube using QB4OLAP. This cube is loaded
into Virtuoso-opensource 7.10, where we run the SWOD algorithm, as a result we
obtain cubes in star pattern and denormalized pattern. Table 1 shows the sizes of the test
data sets in millions of triples The star pattern (denormalized pattern) cubes are about
16% (173%) bigger in terms of the number of triples than the snowflake pattern cubes.</p>
      <p>40
)
tse 30
u
n
i
m
(e 20
m
i
t
aod 10
L
0</p>
      <p>Snowflake
Star
Denormalized
0.1
0.2 0.3</p>
      <p>Scale factor
(a) Virtuoso
0.5</p>
      <p>100
)se 80
t
u
inm 60
(
e
itm 40
d
aoL 20
0
0.1
0.2 0.3</p>
      <p>Scale factor
(b) Jena
0.5</p>
      <p>Load times. We loaded the three cubes into two different stores: we use Apache
Jena 2.12 TDB and Virtuoso-opensource 7.10. Figures 8(a) and 8(b) report the times
for loading the generated cubes. Virtuoso uses on average 12.5% more time to load the
star pattern cube than the snowflake pattern cube and Jena uses 14.2% more time. The
denormalized pattern cube takes on average 138.3% longer in Virtuoso, while it takes
Jena 183% longer, again compared to the snowflake pattern cube. The increased load
time is due to the increased number of triples.</p>
      <p>Query evaluation. Each of the three sets of the 22 queries are executed on the
two triple stores (Jena TDB and Virtuoso). The queries were run in random order with</p>
      <sec id="sec-5-1">
        <title>3 http://extbi.cs.aau.dk/swod</title>
      </sec>
      <sec id="sec-5-2">
        <title>4 http://sourceforge.net/projects/bibm/</title>
        <sec id="sec-5-2-1">
          <title>Scale factor 0.2</title>
          <p>Virtuoso Jena
Snow Star Denorm Snow Star Denorm
7.3 7.2 7.3 71.8 78.4 76.3
1.7 1.9 1.1 5.7 8.0 54.5
2.9 0.4 1.3 30.0 33.0 25.9
8.8 8.3 3.0 33.57 35.7 31.9
4.3 1.3 0.2 38.6 37.1 23.0
1.8 1.8 1.8 19.6 20.8 21.1
7.8 1.8 0.7 35.5 31.6 20.5
2.5 0.2 0.1 51.8 36.8 25.0
31 6.0 8.4 65.3 47.0 33.4
– 1.2 2.2 15.8 15.2 13.5
1.2 0.3 0.7 0.6 0.6 2.3
1.6 1.6 2.6 26.3 27.2 23.5
1.6 1.7 7.3 8.4 9.7 32.7
2.3 8.4 1.1 21.7 24.0 23.5
3.2 19.4 2.9 31.1 377.7 –
1.8 1.7 4.4 2.1 5.0 34.9
3.6 0.1 0.1 91.8 40 54.2
2.0 1.9 2.0 18.4 19.9 19.9
4.1 2.9 1.5 21.4 27.7 21.8
3.1 1.6 11.2 – – –
9.3 2.2 0.6 43.8 39.4 29.2
0.2 1.7 2.6 3.6 10.5 42.6
50.1 3.3 2.9 74.4 87.5 118.6
3.9 1.8 1.5 22.6 27 35.9
4 11 11 11 2 9</p>
        </sec>
        <sec id="sec-5-2-2">
          <title>Scale factor 0.5</title>
          <p>Virtuoso Jena
Snow Star Denorm Snow Star Denorm
15.0 14.9 14.8 180.9 193.4 184.6
2.1 2.9 2.4 31.5 34.6 244.5
6.2 0.8 2.7 77.0 78.3 62.2
22.7 20.1 7.4 86.9 125.1 135
7.8 3.3 0.4 97.6 86.2 56.6
2.7 2.8 2.6 47.9 51.2 51.0
19.9 4.4 1.6 90.2 77.6 49.7
7.1 0.4 0.2 131.4 90.7 59.9
82 16.9 23.6 167.9 110.4 78.7
– 1.9 2.8 39.2 37.1 31.7
1.7 0.5 1.2 1.2 1.3 5.5
3.0 3.1 5.8 63.6 66.4 54.2
4.8 5.1 19.7 – – –</p>
          <p>5 25.3 2.0 53.8 57.0 55.4
5.9 55 6.3 106.9 – –
4.5 4.1 11.2 5.2 11.8 81.1
6.2 0.2 0.2 – – –
4.4 3.9 4.2 228.8 206.2 169.7
8.1 6.5 2.7 52.3 64.0 52.1
6.2 3.9 28.6 – – –
21.5 5.1 1.2 107.7 93.5 71.0
0.4 3.5 5.7 3.7 28.4 103.0
56.2 8.4 6.7 207.9 246.1 252.1
7.8 3.8 3.2 74.4 91.3 109.3</p>
          <p>
            5 8 10 9 0 10
random parameters as specified by the TPC-H manual [
            <xref ref-type="bibr" rid="ref16">16</xref>
            ]. We ran all query sets 12
times, removed the slowest and the fastest run, and took the average of the remaining 10.
          </p>
          <p>Table 2 shows the detailed query runtimes for scale factors 0.2 and 0.5. Due to
space limitations and because the observations for these results also hold for the other
scale factors, we omit detailed runtimes for the remaining ones. Some queries time out
and are marked with “–”, symbolizing that the query time exceeds 1000 seconds. We
calculated the minimum average and minimum geometric mean (G.M.), we refer to this
as minimum because queries that time out are contributing to these numbers with a
runtime of 1000 seconds but in reality exceed 1000 seconds. For each query, pattern,
and store we mark the fastest execution.</p>
          <p>As we can see in Table 2, Virtuoso shows a low average and geometric mean for
the denormalized pattern in both scale factors. On average, in Virtuoso, the star pattern
(denormalized pattern) is 6 (8) times faster than the snowflake pattern, which is
particularly interesting because the snowflake pattern is the pattern in which most RDF data
cubes are available. In Virtuoso at scale factor 0.5, 11 out of the 22 queries are fastest
on either the star pattern or the denormalized pattern – and only 4 on the snowflake
pattern. This shows that Virtuoso is able to handle the increased amount of data and
benefits from the denormalization.</p>
          <p>For Jena, the results are quite different; the snowflake pattern is the fastest in terms
of average/geometric mean. We see that the snowflake pattern cube in scale factor 0.2
has 11 of the fastest query times and in scale factor 0.5 it has nine. The TDB database
in Jena is, unlike Virtuoso, experiencing difficulties with high numbers of triples, thus
several queries times out, especially when the cubes are denormalized.</p>
          <p>For some queries, the two stores perform best on different patterns for the same
query. This is caused by the differences in storage, caching, and optimization techniques
of the two triple stores. In Virtuoso, query 12 is fastest on the snowflake pattern and star
pattern. In Jena, however, the denormalized pattern is fastest. Query 15 contains three
subqueries and is not able to execute in denormalized pattern in Jena and in scale factor
0.5 star pattern also exceeds the timeout limit; this illustrates how big a difference the
query optimizer makes.</p>
          <p>When comparing the results of the two stores for scale factors 0.2 and 0.5, we see
only few changes regarding which pattern is fastest on the different queries. For most of
the queries where this is changing, e.g., queries 1, 6, and 18, the runtimes for all patterns
are very close. Query 6 does not query any levels but only facts, this means that only
subject-subject joins are made. The runtimes for the snowflake pattern, the star pattern,
and the denormalized pattern are relatively similar in both stores. This indicates that
queries of this particular type do not benefit from denormalization.</p>
          <p>For some queries, both Jena and Virtuoso performs best on the same pattern. Query
5, for instance, involves seven different levels, this entails many subject-object joins,
which resemble long path queries in the snowflake pattern and the star pattern but only
a short path in the denormalized pattern. Therefore, query 5 is evaluated fastest on the
denormalized pattern.</p>
          <p>In general, we observe the tendency that queries that span many distinct levels
benefit from denormalization while the opposite is also true: queries that span only a few
levels perform better on the snowflake pattern.</p>
          <p>Conclusion of the experiments. Based on the three measures load time, storage
size, and query time we have gained a deeper understanding of when to use the three
patterns. We see that the denormalized pattern has more than twice as many triples as
the other patterns and much larger load time but shows the most potential in terms of
query time for Virtuoso, for which the denormalized pattern performs up to 35 times
faster (in scale factor 0.5). In Virtuoso the star pattern cube represents a sweet spot
between query time, load time, and amount of triples. Jena does not in general gain a
performance increase in terms of query time when using denormalization.</p>
          <p>The fully denormalized pattern is highly recommended for Virtuoso when dealing
with static datasets – for frequently changing data, the update costs are too high. This
pattern also requires a hardware platform with sufficient storage due to the introduced
data redundancy and an underlying system that can efficiently handle a high number of
triples. Alternatively, we recommend using the star pattern because of the modest
increase in triples and load time – as compared to the snowflake pattern– while on average
yielding more than 6 times faster query times in Virtuoso. Based on our experimental
results, we do not recommend denormalization in Jena.
7</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>Motivated by the increasing need to store and query analytical data in RDF format, this
paper presented query optimization techniques to increase the performance of queries
on RDF data cubes. Inspired by relational data cube representations, the paper proposed
three novel cube patterns for RDF data cubes: snowflake pattern, star pattern, and fully
denormalized pattern. Furthermore, this paper presented the Semantic Web OLAP
Denormalizer (SWOD) algorithm that transforms the pattern of the RDF instance data.
Finally, the paper provided an extensive experimental evaluation, based on an RDF
version of the TPC-H benchmark, examining storage space, load time, and query time.
The evaluation showed that the proposed patterns are effective for improving query
performance at the expense of additional storage space and that their performance also
depends on the underlying triple store. Interesting directions for future work include
implementing additional optimizations for data cube processing, such as materialized
views, as well as the integration of the proposed approach directly within a triple store.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgment</title>
      <p>This research was partially funded by the Danish Council for Independent Research
(DFF) under grant agreement No. DFF-4093-00301.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. A. Abello´,
          <string-name>
            <given-names>J.</given-names>
            <surname>Darmont</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Etcheverry</surname>
          </string-name>
          , and et al.
          <source>Fusion Cubes: Towards Self-Service Business Intelligence. IJDWM</source>
          ,
          <volume>9</volume>
          (
          <issue>2</issue>
          ),
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>A. B. Andersen</surname>
            , N. Gu¨r, K. Hose,
            <given-names>K. A.</given-names>
          </string-name>
          <string-name>
            <surname>Jakobsen</surname>
            , and
            <given-names>T. B.</given-names>
          </string-name>
          <string-name>
            <surname>Pedersen</surname>
          </string-name>
          .
          <article-title>Publishing Danish Agricultural Government Data as Semantic Web Data</article-title>
          .
          <source>In JIST</source>
          , pages
          <fpage>178</fpage>
          -
          <lpage>186</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. S.
          <string-name>
            <surname>-M.-R. Beheshti</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Benatallah</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Motahari-Nezhad</surname>
            , and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Allahbakhsh</surname>
          </string-name>
          .
          <article-title>A Framework and a Language for On-Line Analytical Processing on Graphs</article-title>
          .
          <source>In WISE'12</source>
          , pages
          <fpage>213</fpage>
          -
          <lpage>227</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>C.</given-names>
            <surname>Chen</surname>
          </string-name>
          and et al.
          <article-title>Graph OLAP: a multi-dimensional framework for graph data analysis</article-title>
          .
          <source>Knowledge and Information Systems</source>
          ,
          <volume>21</volume>
          (
          <issue>1</issue>
          ),
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>D.</given-names>
            <surname>Colazzo</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          <article-title>Goasdoue´, I. Manolescu, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Roatis</surname>
          </string-name>
          .
          <article-title>RDF analytics: lenses over semantic graphs</article-title>
          .
          <source>In WWW</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>J. a. P.</given-names>
            <surname>Costa</surname>
          </string-name>
          , J. Cec´ılio, P. Martins, and
          <string-name>
            <given-names>P.</given-names>
            <surname>Furtado. ONE</surname>
          </string-name>
          :
          <article-title>A Predictable and Scalable DW Model</article-title>
          . In DaWaK,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Reynolds</surname>
          </string-name>
          .
          <article-title>The RDF Data Cube Vocabulary</article-title>
          . http://www.w3.org/ TR/2014/REC-vocab
          <string-name>
            <surname>-</surname>
          </string-name>
          data-cube-
          <volume>20140116</volume>
          /.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>L.</given-names>
            <surname>Etcheverry</surname>
          </string-name>
          and
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Vaisman</surname>
          </string-name>
          .
          <article-title>QB4OLAP: A Vocabulary for OLAP Cubes on the Semantic Web</article-title>
          .
          <source>In COLD</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>D.</given-names>
            <surname>Ibragimov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Hose</surname>
          </string-name>
          , T. B.
          <string-name>
            <surname>Pedersen</surname>
            , and
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Zima</surname>
          </string-name>
          <article-title>´nyi. Processing Aggregate Queries in a Federation of SPARQL Endpoints</article-title>
          .
          <source>In ESWC</source>
          , pages
          <fpage>269</fpage>
          -
          <lpage>285</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>C. S. Jensen</surname>
          </string-name>
          , T. B.
          <string-name>
            <surname>Pedersen</surname>
            , and
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Thomsen</surname>
          </string-name>
          .
          <article-title>Multidimensional Databases and Data Warehousing</article-title>
          . Morgan &amp; Claypool Publishers,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. B.
          <article-title>Ka¨mpgen and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Harth</surname>
          </string-name>
          .
          <article-title>No Size Fits All - Running the Star Schema Benchmark with SPARQL and RDF Aggregate Views</article-title>
          .
          <source>In ESWC</source>
          , pages
          <fpage>290</fpage>
          -
          <lpage>304</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>R.</given-names>
            <surname>Kimball</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Ross</surname>
          </string-name>
          .
          <article-title>The Data Warehouse Toolkit: The Complete Guide to Dimensional Modeling</article-title>
          . Wiley, 2. edition,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>N.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Guan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Ren</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Wu</surname>
          </string-name>
          , J. Han, and
          <string-name>
            <given-names>X.</given-names>
            <surname>Yan</surname>
          </string-name>
          . Iceberg:
          <article-title>Towards iceberg analysis in large graphs</article-title>
          .
          <source>In ICDE</source>
          , pages
          <fpage>1021</fpage>
          -
          <lpage>1032</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. M.
          <article-title>Niinima¨ki and</article-title>
          <string-name>
            <given-names>T.</given-names>
            <surname>Niemi</surname>
          </string-name>
          .
          <article-title>An ETL Process for OLAP Using RDF/OWL Ontologies</article-title>
          .
          <source>Journal on Data Semantics</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>O.</given-names>
            <surname>Romero</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Abello</surname>
          </string-name>
          <article-title>´. Open Access Semantic Aware Business Intelligence</article-title>
          . In eBISS, pages
          <fpage>121</fpage>
          -
          <lpage>149</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Transaction</surname>
          </string-name>
          <article-title>Processing Performance Council (TPC). TPC BENCHMARKTMH (Decision Support) Standard Specification</article-title>
          ,
          <source>revision 2.16.0 edition</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>M. Wylot</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Pont</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Wisniewski</surname>
            , and
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Cudre</surname>
          </string-name>
          ´-Mauroux. dipLODocus[RDF]
          <article-title>- Short and Long-Tail RDF Analytics for Massive Webs of Data</article-title>
          .
          <source>In ISWC</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>