Indexing RDF data using materialized SPARQL queries

The vision of the Semantic Web to enrich the hyperlinked information published on the Web has gained a lot of attention of the scientific community. The main idea is to transform the up to now only human readable web pages into computer-processable data by adding semantic metadata that describe resources and relations among them. The Resource Description Framework (RDF) has been introduced by the W3C as a data model for annotations. RDF encodes information in triples consisting of subject, predicate, and object. A triple specifically describes one property of the subject, given by the object, related to it by means of the predicate. A multitude of triples together builds an RDF dataset. Currently, large RDF datasets are available on the Web that consists of millions of triples. Efficiently querying this information has become a crucial task. SPARQL is a declarative query language proposed by the W3C to extract information from RDF data. SPARQL queries are formulated in a similar fashion as selectproject-join operations in relational databases. However, querying RDF datasets is complex due to the graph structure of the data and the often complex structure of a given query. In this thesis, we propose to use materialized queries as a special index structure for RDF data. We strive to reduce the query processing time by minimizing the number of comparisons between the query and the RDF dataset. We also emphasize the role of cost models in the selection of execution plans as well as index sets for a given workload. We first introduce related approaches for RDF indexing and query processing. We provide an overview of the materialized view selection problem in relational databases and discuss its application for optimization of query processing. Inspired by these techniques, we introduce RDFMatView, a framework for answering SPARQL queries using materialized views as indexes. We provide algorithms to discover those indexes that can be used to process a given query and we develop different strategies to integrate these views in query execution plans. We show that our techniques yield large improvements in processing time, depending on the selected execution plan. The selection of an efficient execution plan states the topic of our second major contribution. We introduce three different cost models designed for SPARQL query processing with materialized views. A detailed comparison of these models reveals that a model based on index and predicate statistics provides the most accurate cost estimation. We show that selecting an execution plan using this cost model yields a reduction of processing time with several orders of magnitude compared to standard SPARQL query processing. Finally, we propose a simple yet effective strategy for the materialized view selection problem applied to RDF data. Based on a given workload of SPARQL queries we provide algorithms for selecting a set of indexes that minimizes the workload processing time. We create a candidate index by retrieving all connected components from query patterns. Our evaluation shows that using the set of suggested indexes usually achieves larger runtime savings than other index sets regarding the given workload.