Updating RDFS ABoxes and TBoxes in SPARQL

Similar documents
SPARQL Update under RDFS Entailment in Fully Materialized and Redundancy-Free Triple Stores

SPARQL Update for Materialised Triple Stores under DL-Lite RDFS Entailment

Online Appendix to: Generalizing Database Forensics

Logical reconstruction of RDF and ontology languages

On the Hardness of Counting the Solutions of SPARQL Queries

Mastro Studio: a system for Ontology-Based Data Management

Non-homogeneous Generalization in Privacy Preserving Data Publishing

Coupling the User Interfaces of a Multiuser Program

Coloring RDF Triples to Capture Provenance

Coloring RDF Triples to Capture Provenance

Capturing Provenance of RDF Triples through Colors

Practical Aspects of Query Rewriting for OWL 2

Handling Inconsistencies due to Class Disjointness in SPARQL Updates. joint work with: Albin Ahmeti, Diego Calvanese, Vadim Savenkov.

Variable Independence and Resolution Paths for Quantified Boolean Formulas

COMP718: Ontologies and Knowledge Bases

On the Role of Multiply Sectioned Bayesian Networks to Cooperative Multiagent Systems

A Classification of 3R Orthogonal Manipulators by the Topology of their Workspace

MASTRO-I: Efficient integration of relational data through DL ontologies

Towards SPARQL instance-level Update in the Presence of OWL-DL TBoxes

The Reconstruction of Graphs. Dhananjay P. Mehendale Sir Parashurambhau College, Tilak Road, Pune , India. Abstract

SURVIVABLE IP OVER WDM: GUARANTEEEING MINIMUM NETWORK BANDWIDTH

Generalized Edge Coloring for Channel Assignment in Wireless Networks

Transient analysis of wave propagation in 3D soil by using the scaled boundary finite element method

BIJECTIONS FOR PLANAR MAPS WITH BOUNDARIES

Towards Equivalences for Federated SPARQL Queries

State Indexed Policy Search by Dynamic Programming. Abstract. 1. Introduction. 2. System parameterization. Charles DuHadway

An Algorithm for Building an Enterprise Network Topology Using Widespread Data Sources

Distributed Line Graphs: A Universal Technique for Designing DHTs Based on Arbitrary Regular Graphs

Kinematic Analysis of a Family of 3R Manipulators

Skyline Community Search in Multi-valued Networks

RDF Data Management: Reasoning on Web Data

Compiler Optimisation

Rewrite and Conquer: Dealing with Integrity Constraints in Data Integration

Updating data and knowledge bases

d 3 d 4 d d d d d d d d d d d 1 d d d d d d

CS269I: Incentives in Computer Science Lecture #8: Incentives in BGP Routing

Queueing Model and Optimization of Packet Dropping in Real-Time Wireless Sensor Networks

Random Clustering for Multiple Sampling Units to Speed Up Run-time Sample Generation

Generalized Edge Coloring for Channel Assignment in Wireless Networks

Message Transport With The User Datagram Protocol

Database Optimization Techniques for Semantic Queries

Updating data and knowledge bases

Algebraic transformations of Gauss hypergeometric functions

6.854J / J Advanced Algorithms Fall 2008

CS 106 Winter 2016 Craig S. Kaplan. Module 01 Processing Recap. Topics

Design of Policy-Aware Differentially Private Algorithms

Revisiting Blank Nodes in RDF to Avoid the Semantic Mismatch with SPARQL

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Proving Vizing s Theorem with Rodin

Supervised tracking and correction of inconsistencies in RDF data

Frequent Pattern Mining. Frequent Item Set Mining. Overview. Frequent Item Set Mining: Motivation. Frequent Pattern Mining comprises

Evaluation of Query Rewriting Approaches for OWL 2

Solution Representation for Job Shop Scheduling Problems in Ant Colony Optimisation

A Unified Logical Framework for Rules (and Queries) with Ontologies - position paper -

Intensive Hypercube Communication: Prearranged Communication in Link-Bound Machines 1 2

AnyTraffic Labeled Routing

On Reconciling Data Exchange, Data Integration, and Peer Data Management

Efficiently Managing Data Intensive Ontologies

Offloading Cellular Traffic through Opportunistic Communications: Analysis and Optimization

2-connected graphs with small 2-connected dominating sets

Characterizing Decoding Robustness under Parametric Channel Uncertainty

MORA: a Movement-Based Routing Algorithm for Vehicle Ad Hoc Networks

Shift-map Image Registration

Pairwise alignment using shortest path algorithms, Gunnar Klau, November 29, 2005, 11:

The onprom Toolchain for Extracting Business Process Logs using Ontology-based Data Access

Politecnico di Torino. Porto Institutional Repository

Learning convex bodies is hard

Table-based division by small integer constants

Using Vector and Raster-Based Techniques in Categorical Map Generalization

IEEE JOURNAL ON SELECTED AREAS IN COMMUNICATIONS, VOL. 31, NO. 4, APRIL

Lecture 1 September 4, 2013

Semantics. KR4SW Winter 2011 Pascal Hitzler 1

The Logic of the Semantic Web. Enrico Franconi Free University of Bozen-Bolzano, Italy

Learning Polynomial Functions. by Feature Construction

Polygon Simplification by Minimizing Convex Corners

Modifying ROC Curves to Incorporate Predicted Probabilities

Semantic data integration in P2P systems

A Convex Clustering-based Regularizer for Image Segmentation

TrOWL: Tractable OWL 2 Reasoning Infrastructure

Improving Spatial Reuse of IEEE Based Ad Hoc Networks

Computer Organization

Dense Disparity Estimation in Ego-motion Reduced Search Space

Divide-and-Conquer Algorithms

I DT MC. Operating Manual SINAMICS S120. Verification of Performance Level e in accordance with EN ISO

Foundations of SPARQL Query Optimization

Shift-map Image Registration

Classifying Facial Expression with Radial Basis Function Networks, using Gradient Descent and K-means

Toward Analytics for RDF Graphs

Optimal Routing and Scheduling for Deterministic Delay Tolerant Networks

Additional Divide and Conquer Algorithms. Skipping from chapter 4: Quicksort Binary Search Binary Tree Traversal Matrix Multiplication

DATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems

THE BAYESIAN RECEIVER OPERATING CHARACTERISTIC CURVE AN EFFECTIVE APPROACH TO EVALUATE THE IDS PERFORMANCE

Inconsistency Management in Generalized Knowledge and Action Bases.

Throughput Characterization of Node-based Scheduling in Multihop Wireless Networks: A Novel Application of the Gallai-Edmonds Structure Theorem

Data integration lecture 2

Figure 1: 2D arm. Figure 2: 2D arm with labelled angles

Open Access Adaptive Image Enhancement Algorithm with Complex Background

OWL 2 Profiles. An Introduction to Lightweight Ontology Languages. Markus Krötzsch University of Oxford. Reasoning Web 2012

Backpressure-based Packet-by-Packet Adaptive Routing in Communication Networks

Secure Network Coding for Distributed Secret Sharing with Low Communication Cost

Transcription:

Upating RDFS ABoxes an TBoxes in SPARQL Albin Ahmeti 1, Diego Calvanese 2, an Axel Polleres 3 1 Vienna University of Technology, Favoritenstraße 9, 1040 Vienna, Austria 2 Faculty of Computer Science, Free University of Bozen-Bolzano, Bolzano, Italy 3 Vienna University of Economics an Business, Welthanelsplatz 1, 1020 Vienna, Austria Abstract. Upates in RDF stores have recently been stanarise in the SPARQL 1.1 Upate specification. However, computing entaile answers by ontologies is usually treate orthogonally to upates in triple stores. Even the W3C SPARQL 1.1 Upate an SPARQL 1.1 Entailment Regimes specifications explicitly exclue a stanar behaviour for entailment regimes other than simple entailment in the context of upates. In this paper, we take a first step to close this gap. We efine a fragment of SPARQL basic graph patterns corresponing to (the RDFS fragment of) DL-Lite an the corresponing SPARQL upate language, ealing with upates both of ABox an of TBox statements. We iscuss possible semantics along with potential strategies for implementing them. In particular, we treat both, (i) materialise RDF stores, which store all entaile triples explicitly, an (ii) reuce RDF Stores, that is, reunancy-free RDF stores that o not store any RDF triples (corresponing to DL-Lite ABox statements) entaile by others alreay. We have implemente all semantics prototypically on top of an off-the-shelf triple store an present some inications on practical feasibility. 1 Introuction The availability of SPARQL as a stanar for accessing structure Data on the Web may well be calle one of the key factors to the success an increasing aoption of RDF an the Semantic Web. Still, in its first iteration the SPARQL [24] specification has neither efine how to treat ontological entailments with respect to RDF Schema (RDFS) an OWL ontologies, nor provie means how to upate ynamic RDF ata. Both these gaps have been aresse within the recent SPARQL 1.1 specification, which provies both means to efine query answers uner ontological entailments (SPARQL 1.1 Entailment Regimes [9]), an an upate language to upate RDF ata store in a triple store (SPARQL 1.1 Upate [8]). Nonetheless, these specifications leave it open how SPARQL enpoints shoul treat entailment regimes other than simple entailment in the context of upates; the main issue here is how upates shall eal with implie statements: What oes it mean if an implie triple is explicitly (re-)inserte (or elete)? Which (if any) aitional triples shoul be inserte, (or, resp., elete) upon upates? For the sake of this paper, we aress such questions with the focus on a eliberately minimal ontology language, namely the minimal RDFS fragment of [19]. 4 As it turns out, 4 We ignore issues like axiomatic triples [13], blank noes [17], or, in the context of OWL, inconsistencies arising through upates [5]. Neither o we consier name graphs in SPARQL, which is why we talk about triple stores as oppose to graph stores [8].

Table 1. DL-LiteRDFS assertions vs. RDF(S), where A, A enote concept (or, class) names, P, P enote role (or, property) names, Γ is a set of constants, an x, y Γ. For RDF(S) vocabulary, we make use of similar abbreviations (sc, sp, om, rng, a) introuce in [19]. TBox RDFS 1 A A A sc A. 2 P P P sp P. TBox RDFS 3 P A P om A. 4 P A P rng A. ABox RDFS 5 A(x) x a A. 6 P (x, y) x P y. even in this confine setting, upates as efine in the SPARQL 1.1 Upate specification impose non-trivial challenges; in particular, specific issues arise through the interplay of INSERT, DELETE, an WHERE clauses within a single SPARQL upate operation, which to the best of our knowlege have not yet been consiere in this combination in previous literature on upates uner entailment (such as for instance [5, 11]). Example 1. As a running example, we assume a triple store G with RDF (ABox) ata an an RDFS ontology (TBox) O fam about family relationships (in Turtle syntax [2]), where :hasp, :hasm, an :hasf, resp., enote the parent, mother, an father relations. ABox: :joe :hasp :jack. :joe :hasm :jane. TBox: :Father sc :Parent. :Mother sc :Parent. :hasf sp :hasp. :hasm sp :hasp. :hasf rng :Father; om :Chil. :hasm rng :Mother; om :Chil. :hasp rng :Parent; om :Chil. The following query shoul return :jack an :jane as (RDFS entaile) answers: SELECT?Y WHERE { :joe :hasp?y. } SPARQL engines supporting simple entailment woul only return :jack, though. The intene behaviour for the query in Ex. 1 is typically achieve by either (i) query rewriting techniques computing entaile answers at query run-time, or (ii) by materialising all implie triples in the store, normally at loaing time. That is, on the one han, borrowing from query rewriting techniques from DL-Lite (such as, e.g., PerfectRef [4] 5 ) one can reformulate such a query to return also implie answers. While the rewritten query is worst case exponential wrt. the length of the original query (an polynomial in the size of the TBox), for moerate size TBoxes an queries rewriting is quite feasible. Example 2 (cont ). The rewriting of the query in Ex. 1 accoring to PerfectRef [4] with respect to O fam as a DL TBox in SPARQL yiels SELECT?Y WHERE { {:joe :hasp?y} UNION {:joe :hasf?y} UNION {:joe :hasm?y}} Inee, this query returns both :jane an :jack. On the other han, an alternative 6 is to materialise all inferences in the triple store, such that the original query can be use as is, for instance using the minimalistic inference rules for RDFS from [19] 7 shown in Fig. 1. 5 Alg. 1 in the Appenix shows a version of PerfectRef reuce to the essentials of RDFS. 6 This alternative is viable for RDFS, but not necessarily for more expressive DLs. 7 These rules correspon to rules 2), 3), 4) of [19]; they suffice since we ignore blank noes.

Example 3 (cont ). The materialise version of G woul contain the following triples for conciseness we only show assertional implie triples here, that is triples from the four leftmost rules in Fig. 1. :joe a :Chil; :hasp :jack; :hasm :jane; :hasp :jane. :jack a :Parent. :jane a :Mother, :Parent. On a materialise triple store, the query from Ex. 1 woul return the expecte results. However, in the context of SPARQL 1.1 Upate, things become less clear. Example 4 (cont ). The following operation tries to elete an implie triple an at the same time to (re-)insert another implie triple. DELETE {?X a :Chil} INSERT {?Y a :Mother} WHERE {?X :hasm?y} Existing triple stores offer ifferent solutions to these problems, ranging from ignoring entailments in upates altogether, to keeping explicit an implicit (materialise) triples separate an re-materialising upon upates. In the former case (ignoring entailments) upates only refer to explicitly asserte triples, which may result in non-intuitive behaviours, whereas the latter case (re-materialisation) may be very costly, while still not eliminating all non-intuitive cases, as we will see. The problem is aggravate by no systematic approach to the question of which implie triples to store explicitly in a triple store an which not. In this paper we try to argue for a more systematic approach for ealing with upates in the context of RDFS entailments. More specifically, we will istinguish between two kins of triple stores, that is (i) materialise RDF stores, which store all entaile ABox triples explicitly, an (ii) reuce RDF Stores, that is, reunancy-free RDF stores that o not store any assertional (ABox) triples alreay entaile by others. We propose alternative upate semantics that preserve the respective types (i) an (ii) of triple stores, an iscuss possible implementation strategies, partially inspire by query rewriting techniques from ontology-base ata access (OBDA) [15] an DL-Lite [4]. As alreay shown in [11], erasure of ABox statements is eterministic in the context of RDFS, but insertion an particularly the interplay of DELETE/INSERT in SPARQL 1.1 Upate has not been consiere therein. Finally, we relax the initial assumption that terminological statements (using the RDFS vocabulary) are static, an iscuss the issues that arise when also TBox statement are subject to upates. The remainer of the paper continues with preliminaries (RDFS, SPARQL, DL-Lite, SPARQL upate operations) in Sec. 2. We introuce alternative semantics for ABox upates in materialise an reuce triple stores in Sec. 3, an iscuss them in Sec. 4 an Sec. 5, respectively. In Sec. 6, we present our results on TBox upates. After presenting in Sec. 7 an implementation on top of an off-the-shelf triple store along with experiments, followe in Sec. 8 by a iscussion of future an relate work, we conclue in Sec. 9.?C sc?d.?s a?c.?s a?d.?p sp?q.?s?p?o.?s?q?o.?p om?c.?s?p?o.?s a?c.?p rng?c.?s?p?o.?o a?c.?c sc?d.?d sc?e.?c sc?e.?p sp?q.?q sp?r.?p sp?r. Fig. 1. Minimal RDFS inference rules

2 Preliminaries We introuce some basic notions about RDF graphs, RDFS ontologies, an SPARQL queries. Since we will raw from ieas coming from OBDA an DL-Lite, we introuce these notions in a way that is compatible with DLs. Definition 1 (RDFS ontology, ABox, TBox, triple store). We call a set T of inclusion assertions of the forms 1 4 in Table 1 an RDFS ontology, or (RDFS) TBox, a set A of assertions of the forms 5 6 in Table 1 an (RDF) ABox, an the union G = T A an (RDFS) triple store. In the context of RDF(S), the set Γ of constants coincies with the set I of IRIs. We assume the IRIs use for concepts, roles, an iniviuals to be isjoint from IRIs of the RDFS an OWL vocabularies. 8 In the following, we view RDF an DL notation interchangeably, i.e., we treat any RDF graph consisting of triples without non-stanar RDFS vocabulary as a set of TBox an ABox assertions. To efine the semantics of RDFS, we rely on the stanar notions of (first-orer logic) interpretation, satisfaction of assertions, an moel (cf. e.g., [1, Def. 14]). As for queries, we again treat the cases of SPARQL an DLs interchangeably. Let V be a countably infinite set of variables (written as? -prefixe alphanumeric strings). Definition 2 (BGP, CQ, UCQ). A conjunctive query (CQ) q, or basic graph pattern (BGP), is a set of atoms of the forms 5 6 from Table 1, where now x, y Γ V. A union of conjunctive queries (UCQ) Q, or UNION pattern, is a set of CQs. We enote with V(q) (or V(Q)) the set of variables from V occurring in q (resp., Q). Notice that in this efinition we are consiering only CQs in which all variables are istinguishe (i.e., are answer variables), an that such queries correspon to SPARQL basic graph patterns (BGPs). From the SPARQL perspective, we allow only for restricte forms of general SPARQL BGPs that correspon to stanar CQs as formulate over a DL ontology; that is, we rule out on the one han more complex patterns in SPARQL 1.1 [12] (such as OPTIONAL, NOT EXISTS, FILTER), an queries with variables in preicate positions, an on the other han terminological queries, e.g., {?x sc?y.}. We will relax this latter restriction later (see Sec. 6). Also, we o not consier here blank noes separately 9. By these restrictions, we can treat query answering an BGP matching in SPARQL analogously an efine it in terms of interpretations an moels (as usual in DLs). Specifically, an answer (uner RDFS Entailment) to a CQ q over a triple store G is a substitution θ of the variables in V(q) with constants in Γ such that every moel of G satisfies all facts in qθ. We enote the set of all such answers with ans rfs (q, G) (or simply ans(q, G)). The set of answers to a UCQ Q is q Q ans(q, G). From now on, let rewrite(q, T ) be the UCQ resulting from applying PerfectRef (or, equivalently, the own-strippe version Alg. 1) to a CQ q an a triple store G = T A, 8 That is, we assume no non-stanar use [23] of these vocabularies. While we coul assume concept names, role names, an iniviual constants mutually isjoint, we rather istinguish implicitly between them per use (in the sense of punning [18]) base on their position in atoms or RDF triples. 9 Blank noes in a triple store may be consiere as constants an we o not allow blank noes in queries, which oes not affect the expressivity of SPARQL.

an let mat(g) be the triple store obtaine from exhaustive application on G of the inference rules in Fig. 1. The next result follows immeiately from, e.g., [4, 11, 19] an shows that query answering uner RDF can be one by either query rewriting or materialisation. Proposition 1. Let G = T A be a triple store, q a CQ, an A the set of ABox assertions in mat(g). Then, ans(q, G) = ans(rewrite(q, T ), A) = ans(q, A ). Various triple stores (e.g., BigOWLIM [3]) perform ABox materialisation irectly upon loaing ata. However, such triple stores o not necessarily materialise the TBox: in orer to correctly answer UCQs as efine above, a triple store actually oes not nee to consier the two rightmost rules in Fig. 1. Accoringly, we will call a triple store or (ABox) materialise if in each state it always guarantees G T = mat(g) mat(t ). On the other extreme, we fin triple stores that o not store any reunant ABox triples. By re(g) we enote the hypothetical operator that prouces the reuce core of G, an we call a triple store (ABox) reuce if G = re(g). We note that this core is uniquely etermine in our setting whenever T is acyclic (which is usually a safe assumption) 10 ; it coul be naïvely compute by exhaustively marking each triple that can be inferre from applying any of the four leftmost rules in Fig. 1, an subsequently removing all marke elements of A. Lastly, we observe that, trivially, a triple store containing no ABox statements is both reuce an materialise. Finally, we introuce the notion of a SPARQL upate operation. Definition 3 (SPARQL upate operation). Let P an P i be BGPs, an P w a BGP or UNION pattern. Then an upate operation u(p, P i, P w ) has the form DELETE P INSERT P i WHERE P w. Intuitively, the semantics of executing u(p, P i, P w ) on G, enote as G u(p,p i,p w) is efine by interpreting both P an P i as templates to be instantiate with the solutions of ans(p w, G), resulting in sets of ABox statements A to be elete from G, an A i to be inserte into G. A naïve upate semantics follows straightforwarly. Definition 4 (Naïve upate semantics). Let G = T A be a triple store, an u(p, P i, P w ) an upate operation. Then, naive upate of G with u(p, P i, P w ), enote G u(p,p i,p w), is efine as (G A ) A i, where A = θ ans(p w,g) gr(p θ), A i = θ ans(p w,g) gr(p iθ), an gr(p ) enotes the set of groun triples in pattern P. As easily seen, this naïve semantics neither preserves reuce nor materialise triple stores. Consier, e.g., the upate from Ex. 4, respectively on the reuce triple store from Ex. 1 an on the materialise triple store from Ex. 3. 10 We note that even in the case when the TBox is cyclic we coul efine a eterministic way to remove reunancies, e.g., by preserving within a cycle only the lexicographically smallest ABox statements. That is, given TBox A B C A an ABox A(x), C(x); we woul elete C(x) an retain A(x) only, to preserve reuceness.

3 Defining Alternative Upate Semantics We investigate now alternative semantics for upates that preserve either materialise or reuce ABoxes, an iscuss how these semantics can similar to query answering be implemente in off-the-shelf SPARQL 1.1 triple stores. Definition 5 (Mat-preserving an re-preserving semantics). Let G an u(p, P i, P w ) be as in Def. 4. An upate semantics Sem is calle matpreserving, if G Sem u(p,p = i,p w) mat(gsem u(p,p i,p w) ), an it is calle re-preserving, if G Sem u(p,p = i,p w) re(gsem u(p,p ). i,p w) Specifically, we consier the following variants of materialise ABox preserving (or simply, mat-preserving) semantics an reuce ABox preserving (or simply, represerving) semantics, given an upate u(p, P i, P w ): 0 : As a baseline for a mat-preserving semantics, we apply the naïve semantics, followe by (re-)materialisation of the whole triple store. 1 : An alternative approach for a mat-preserving semantics is to follow the socalle elete an reerive algorithm [10] for eletions, that is: (i) elete the instantiations of P plus angling effects, i.e., effects of elete triples that after eletion are not implie any longer by any non-elete triples; (ii) insert the instantiations of P i plus all their effects. 2 : Another mat-preserving semantics coul take a ifferent viewpoint with respect to eletions, following the intention to: (i) elete the instantiations of P plus all their causes; (ii) insert the instantiations of P i plus all their effects. 3 : Finally, a mat-preserving semantics coul combine 1 an 2, by eleting both causes of instantiations of P an (recursively) angling effects. 11 Sem re 0 : Again, the baseline for a re-preserving semantics woul be to apply the naïve semantics, followe by (re-)reucing the triple store. Sem re 1 : This re-preserving semantics extens Sem re 0 by aitionally eleting the causes of instantiations of P. The efinitions of semantics 0 an Sem re 0 are straightforwar. Definition 6 (Baseline mat-preserving an re-preserving upate semantics). Let G an u(p, P i, P w ) be as in Def. 4. Then, we efine 0 an Sem re 0 as follows: G Semmat 0 u(p,p = mat(g i,p w) u(p,p i,p w)) G Semre 0 u(p,p = re(g i,p w) u(p,p i,p w)) Let us procee with a quick reality-check on these two baseline semantics by means of our running example. Example 5. Consier the upate from Ex. 4. It is easy to see that neither uner 0 execute on the materialise triple store of Ex. 3, nor uner Sem re 0 execute on the reuce triple store of Ex. 1, it woul have any effect. This behaviour is quite arguable. Hence, we procee with iscussing the implications of the propose alternative upate semantics, an how they coul be implemente. 11 Note the ifference to the basic elete an reerive approach. 1 in combination with the intention of 2 woul also mean to recursively elete effects of causes, an so forth.

4 Alternative Mat-Preserving Semantics We consier now in more etail the mat-preserving semantics. As for 1, we rely on a well-known technique in the area of upates for euctive atabases calle elete an reerive (DRe) [6, 10, 16, 26, 27]. Informally translate to our setting, when given a logic program Π an its materialisation TΠ ω, plus a set of facts A to be elete an a set of facts A i to be inserte, DRe (i) first eletes A an all its effects (compute via semi-naive evaluation [25]) from TΠ ω, resulting in (T Π ω), (ii) then, starting from (TΠ ω), re-materialises (Π A ) A i (again using semi-naive evaluation). The basic intuition behin DRe of eleting effects of elete triples an then rematerialising can be expresse in our notation as follows; as we will consier a variant of this semantics later on, we refer to this semantics as 1a. Definition 7. Let G = T A, u(p, P i, P w ), A, an A i be efine as in Def. 4. Then G Semmat 1a u(p,p = mat(t (A mat(t A i,p w) )) A i ). As oppose to the classic DRe algorithm, where Datalog istinguishes between view preicates (IDB) an extensional knowlege in the Database (EDB), in our setting we o not make this istinction, i.e., we o not istinguish between implicitly an explicitly inserte triples. This means that 1a woul elete also those effects that ha been inserte explicitly before. We introuce now a ifferent variant of this semantics, enote, that makes a istinction between explicitly an implicitly inserte triples. Definition 8. Let u(p, P i, P w ) be an upate operation, an G = T A expl A impl a triple store, where A expl an A impl respectively enote the explicit an implicit ABox triples. Then G Semmat u(p,p = T i,p w) A expl A impl, where A an A i are efine as in Def. 4, A expl = (A expl A ) A i, an A impl = mat(a expl T ) T. Note that in, as oppose to 1a, we o not explicitly elete effects of A from the materialisation, since the efinition just relies on re-materialisation from scratch from the explicit ABox A expl. Nonetheless, the original DRe algorithm can still be use for computing as shown by the following proposition. Proposition 2. Let us interpret the inference rules in Fig. 1 an triples in G respectively as rules an facts of a logic program Π; accoringly, we interpret A an A i from Def. 8 as facts to be elete from an inserte into Π, respectively. Then, the materialisation compute by DRe, as efine in [16], computes exactly A impl. None of 0, 1a, an are equivalent, as shown in Ex. 6 below. Example 6. Given the triple store G = {:C sc :D. :D sc :E}, on which we perform the operation INSERT{:x a :C, :D, :E.}, explicitly aing three triples, an subsequently perform DELETE{:x a :C, :E.}, we obtain, accoring to the three semantics iscusse so far, the following ABoxes: 0 : {:x a :D. :x a :E.} 1a : {} : {:x a :D. :x a :E.}

While after this upate 0 an eliver the same result, the ifference between these two is shown by the subsequent upate DELETE{:x a :D.} 0 : {:x a :E.} 1a : {} : {} As for the subtle ifference between 1a an, we point out that none of [16, 26], who both refer to using DRe in the course of RDF upates, make it clear whether explicit an implicit ABox triples are to be treate ifferently. Further, continuing with Ex. 5, the upate from Ex. 4 still woul not have any effect, neither using 1a, nor. That is, it is not possible in any of these upate semantics to remove implicit information (without explicitly removing all its causes). 2 aims at aressing this problem concerning the eletion of implicit information. As it turns out, while the intention of 2 to elete causes of eletions cannot be capture just with the mat operator, it can be achieve fairly straightforwarly, builing upon ieas similar to those use in query rewriting. As we have seen, in the setting of RDFS we can use Alg. 1 rewrite to expan a CQ to a UCQ that incorporates all its causes. A slight variation can be use to compute the set of all causes, that is, in the most naïve fashion by just flattening the set of sets returne by Alg. 1 to a simple set; we enote this flattening operation on a set S of sets as flatten(s). Likewise, we can easily efine a moifie version of mat(g), applie to a BGP P using a TBox T 12. Let us call the resulting algorithm mat eff (P, T ) 13. Using these consierations, we can thus efine both rewritings that consier all causes, an rewritings that consier all effects of a given (insert or elete) pattern P : Definition 9 (Cause/Effect rewriting). Given a BGP insert or elete template P for an upate operation over the triple store G = T A, we efine the all-causes-rewriting of P as P caus = flatten(rewrite(p, T )); likewise, we efine the all-effects-rewriting of P as P eff = mat eff (P, T ). This leas (almost) straightforwarly to a rewriting-base efinition of 2. Definition 10. Let u(p, P i, P w ) be an upate operation. Then where P fvars G Semmat 2 u(p,p i,p w) = G u(p caus,p eff,{p i w}{p fvars }), = {?v a rfs:resource. for each?v Var(P caus ) Var(P )}. The only tricky part in this efinition is the rewriting of the WHERE clause, where P w is joine 14 with a new pattern P fvars that bins free variables (i.e., the fresh variables enote by _ in Table 2, introuce by Alg. 1, cf. Appenix) in the rewritten DELETE clause, P caus. Here,?v a rfs:resource. is a shortcut for a pattern which bins?v to any term occurring in G, cf. Sec. 7 below for etails. 12 This coul be viewe as simply applying the first four inference rules in Fig. 1 exhaustively to P T, an then removing T. 13 Note that it is not our intention to provie optimise algorithms here, but just to convey the feasibility of this rewriting. 14 A sequence of {} -elimite patterns in SPARQL correspons to a join, where such joins can again be neste with UNIONs, with the obvious semantics, for etails cf. [12].

Example 7. Getting back to the materialise version of the triple store G from Ex. 3, the upate u from Ex. 4 woul, accoring to 2, be rewritten to DELETE {?X a :Chil.?X :hasf?x1.?x :hasm?x2.?x :hasp?x3.} INSERT {?Y a :Mother.?Y a :Parent. } WHERE {{?X :hasm?y.} {?x1 a rfs:resource.?x2 a rfs:resource.?x3 a rfs:resource.}} with G Semmat 2 u containing :jane a :Mother, :Parent. :jack a :Parent. It is easy to argue that 2 is mat-preserving. However, this semantics might still result in potentially non-intuitive behaviours. For instance, subsequent calls of INSERTs an DELETEs might leave traces, as shown by the following example. Example 8. Assume G = O fam from Ex. 1 with an empty ABox. Uner 2, the following sequence of upates woul leave as a trace among others the resulting triples as in Ex. 7, which woul not be the case uner the naïve semantics. DELETE{} INSERT {:joe :hasm :jane; :hasf :jack} WHERE{}; DELETE {:joe :hasm :jane; :hasf :jack} INSERT{} WHERE{} 3 tries to aress the issue of such traces, but can no longer be formulate by a relatively straightforwar rewriting. For the present, preliminary paper we leave out a etaile efinition/implementation capturing the intention of 3 ; there are two possible starting points, namely combining 1a + 2, or + 2, respectively. We emphasise though, that inepenently of this choice, a semantics that achieves the intention of 3 woul still potentially run into arguable cases, since it might run into removing seemingly isconnecte implicit assertions, whenever remove assertions cause these, as shown by the following example. Example 9. Assume a materialise triple store G consisting only of the TBox triples :Father sc :Person, :Male. The behaviour of the following upate sequence uner a semantics implementing the intention of 3 is arguable: DELETE {} INSERT {:x a :Father.} WHERE {}; DELETE {:x a :Male.} INSERT {} WHERE {} We leave it open for now whether recursive eletion of angling effects is intuitive: in this case, shoul upon eletion of x being Male, also be elete that x is a Person? In a strict reaing of 3 s intention, :x a :Person. woul count as a angling effect of the cause for :x a :Male., since it is an effect of the inserte triple with no other causes in the store, an thus shoul be remove upon the elete operation. Lastly, we point out that while implementations of (materialise) triple stores may make a istinction between implicit an explicitly inserte triples (e.g., by storing explicit an implicit triples separately, as sketche in alreay), we consier the istinction between implicit triples an explicitly inserte ones non-trivial in the context of SPARQL 1.1 Upate: for instance, is a triple inserte base upon implicit binings in the WHERE clause of an INSERT statement to be consiere explicitly inserte or not? We ten towars avoiing such istinction, but we have more in-epth iscussions of such philosophical aspects of possible SPARQL upate semantics on our agena. For now, we turn our attention to the potential alternatives for re-preserving semantics.

5 Alternative Re-Preserving Semantics Again, similar to 3, for both baseline semantics Sem re 0 an Sem re 1 we leave it open whether they can be implemente by rewriting to SPARQL upate operations following the naïve semantics, i.e., without the nee to apply re(g) over the whole triple store after each upate; a strategy to avoi calling re(g) woul roughly inclue the following steps: elete the instantiations P plus all the effects of instantiations of P i, which will be implie anyway upon the new insertion, thus preserving reuce; insert instantiations of P i only if they are not implie, that is, they are not alreay implie by the current state of G or all their causes in G were to be elete. We leave further investigation of whether these steps can be cast into upate requests irectly by rewriting techniques to future work. Rather, we show that we can capture the intention of Sem re 1 by a straightforwar extension of the baseline semantics. Definition 11 (Sem re 1 ). Let u(p, P i, P w ) be an upate operation. Then where P caus G Semre 1 u(p,p i,p w) = re(g u(p caus an P fvars are as before.,p i,{rewrite(p w)}{p fvars }) ), Example 10. Getting back to the reuce version of the triple store G from Ex. 1, the upate u from Ex. 4 woul, accoring to Sem re 1, be rewritten to DELETE {?X a :Chil.?X :hasfather?x1.?x :hasmother?x2.?x :hasparent?x3. } INSERT {?Y a :Mother. } WHERE { {?X :hasmother?y. } {?x1 a rfs:resource.?x2 a rfs:resource.?x3 a rfs:resource.} } with G Semre 1 u containing the triple :jane a :Mother.. Observe here the eletion of the triple :joe :hasparent :jack., which some might view as non-intuitive. In a reuce store effects of P nee not be elete, which makes the consierations that lea us to 3 irrelevant for a re-preserving semantics, as shown next. Example 11. Uner Sem re 1, as oppose to 2, the upate sequence of Ex. 8 woul leave no traces. However, the upate sequence of Ex. 9 woul likewise result in an empty ABox, again losing iempotence of single triple insertion followe by eletion. Note that, while the rewriting for Sem re 1 is similar to that for 2, postprocessing for preserving reuceness is not available in off-the-shelf triple stores. Instea, 2 coul be reaily execute by rewriting on existing triple stores, preserving materialisation.

6 TBox Upates So far, we have consiere the TBox as static. As alreay note in [11], aitionally allowing TBox upates consierably complicates issues an opens aitional egrees of freeom for possible semantics. While it is out of the scope of this paper to explore all of these, we limit ourselves to sketch these ifferent egrees of freeom an suggest one pragmatic approach to exten upates expresse in SPARQL to RDFS TBoxes. In orer to allow for TBox upates, we have to exten the upate language: in the following, we will assume general BGPs, extening Def. 2. Definition 12 (general BGP). A general BGP is a set of triples of any of the forms from Table 1, where x, y, A, A, P, P Γ V. We observe that with this relaxation for BGPs, upates as per Def. 3 can query TBox ata, since they amit TBox triples in P w. In orer to aress this issue we nee to also generalise the efinition of query answers. 15 Definition 13. Let Q be a union of general BGPs an [[Q] G the simple SPARQL semantics as per [21], i.e., essentially the set of query answers obtaine as the union of answers from simple pattern matching of the general BGPs in Q over the graph G. Then we efine ans RDFS (Q, G) = [[Q] mat(g). In fact, Def. 13 oes not affect ABox inferences, that is, the following corollary follows immeiately from Prop. 1 for non-general UCQs as per Def. 2. Corollary 1. Let Q be a UCQ as per Def. 2. Then ans RDFS (Q, G) = ans rfs (Q, G). As oppose to the setting iscusse so far, where the last two rules in Fig. 1 use for TBox materialisation were ignore, we now focus on the iscussion of terminological upates uner the stanar intensional semantics (essentially efine by the inference rules in Fig. 1) an attempt to efine a reasonable (that means computable) semantics uner this setting. Note that upon terminological queries, the RDFS semantics an DL semantics iffer, since this intensional semantics oes not cover all terminological inferences erivable in DL, cf. [7]; we leave the etails of this aspect to future work. Observation 1. TBox upates potentially affect both materialisation an reuceness of the ABox, that is, (i) upon TBox insertions a materialise ABox might nee to be re-materialise in orer to preserve materialisation, an, respectively, a reuce ABox might no longer be reuce; (ii) upon TBox eletions in a materialise setting, we have a similar issue to what we calle angling effects earlier, whereas in a reuce setting inirect eletions of implie triples coul cause unintuitive behaviour. Observation 2. Whereas eletions of implicit ABox triples can be achieve eterministically by eleting all single causes, TBox eletions involving sc an sp chains can be achieve in several istinct ways, as alreay observe by [11]. Example 12. Consier the graph G = {:A sc :B. :B sc :C. :B sc :D. :C sc :E. :D sc :E. :E sc :F.} with the upate DELETE{:A sc :F.} Inepenent of whether we assume a materialise TBox, we woul have various choices here to remove triples, to elete all the causes for :A sc :F. 15 As mentione in Fn. 8, elements of Γ may act as iniviuals, concept, or roles names in parallel.

In orer to efine a eterministic semantics for TBox upates, we nee a canonical way to elete implicit an explicit TBox triples. Minimal cuts are suggeste in [11] in the sc (or sp, resp.) graphs as caniates for eletions of sc (or sp, resp.) triples. However, as easily verifie by Ex. 12, minimal multicuts are still ambiguous. Here, we suggest two upate semantics using rewritings to SPARQL 1.1 property path patterns [12] that yiel canonical minimal cuts. Definition 14. Let u(p, P i, P w ) be an upate operation where P, P i, P w are general BGPs. Then G Semmat outcut u(p,p = mat(g i,p w) u(p,pi,p w ) ), where each triple {A 1 scp A 2 } P such that scp {sc, sp} is replace within P by {A 1 scp?x.}, an we a to P w the property path pattern {A 1 scp?x.?x scp * A 2 }. Analogously, incut is efine by replacing {?x scp A 2 } within P, an aing {A 1 scp *?x.?x scp A 2 } within P w instea. Both outcut an incut may be viewe as straightforwar extensions of 0, i.e., both are mat-preserving an equivalent to the baseline semantics for non-general BGPs (i.e., on ABox upates): Proposition 3. Let u(p, P i, P w ) be an upate operation, where P, P i, P w are (nongeneral) BGPs. Then G Semmat outcut u(p,p i,p w) = G Semmat incut u(p,p i,p w) = G Semmat 0 u(p,p i,p w). The intuition behin the rewriting in outcut is to elete for every elete A scp B. triple, all irectly outgoing scp eges from A that lea into paths to B, or, resp., in incut all irectly incoming eges to B. The intuition to choose these canonical minimal cuts is motivate by the following proposition. Proposition 4. Let u = DELETE {A scp B}, an G a triple store with materialise TBox T. Then, the TBox statements elete by G Semmat outcut incut u(p,p i,p w) (or, GSemmat u(p,p, resp.) i,p w) form a minimal cut [11] of T isconnecting A an B. Proof (Sketch). In a materialise TBox, one can reach B from A either irectly or via n irect neighbours C i B, which (in)irectly connect to B. So, a minimal cut contains either the multicut between A an the C i s, or between the C i s an B; the latter multicut requires at least the same amount of eges to be elete as the former, which in turn correspons to the outboun cut. This proves the claim for outcut. We can procee analogously for incut. The following example illustrates that the generalisation of Prop. 4 to upates involving the eletion of several TBox statements at once oes not hol. Example 13. Assume the materialise triple store G = {:A scp :B,:C,:D. :B scp :C, :D.} an u = DELETE{:A scp :C. :A scp :D.}. Here, incut oes not yiel a minimal multicut in G wrt isconnecting (:A,:C) an (:A,:D). 16 As the example shows, the extension of the baseline ABox upate semantics to TBox upates alreay yiels new egrees of freeom. We leave a more in-epth iscussion of TBox upates also extening the other semantics from Sec. 3 for future work. 16 We can give an analogous example where outcut oes not yiel a minimal multicut.

7 Prototype an Experiments We have implemente the ifferent upate semantics iscusse above in Jena TDB 17 as a triple store that both implements the latest SPARQL 1.1 specification an supports rule base materialisation: our focus here was to use an existing store that allows us to implement the ifferent semantics with its on-boar features; that is, for computing mat(g) we use the on-boar, forwar-chaining materialisation in Jena. 18 We have implemente all the above-mentione mat-preserving semantics, with two concrete variants of P fvars. In the first variant, we replace?v a rfs:resource by {{?v?v p?v o } UNION {?v s?v?v o } UNION {?v s?v p?v}}, to achieve a pattern that bins?v to every possible term in G. This is not very efficient. In fact, note that P fvars is neee just to bin free variables?v (corresponing to _ in Table 2) in patterns P?v of the form P (x,?v) or P (?v, x) in the rewritten DELETE clause. Thus, we can equally use P fvars = {OPTIONAL{?v Var(P caus ) Var(P )} P?v}. We enote implementations using the latter variant 2 an Semre 1, respectively. As for reuce semantics, remarkably, for the restricte set of ABox rules in Fig. 1 an assuming an acyclic TBox, we can actually compute re(g) also by on-boar means of SPARQL 1.1 compliant triple-stores, namely by using SPARQL 1.1 Upate in combination with SPARQL 1.1 property paths [12, Section 9] with the following upate: DELETE {?S1 a?d1.?s2 a?c2.?s3?q3?o3.?o4 a?c4. } WHERE {{?C1 sc+?d1.?s1 a?c1. } UNION {?P2 om/sc*?c2.?s2?p2?o2. } UNION {?P3 sp+?q3.?s3?p3?o3. } UNION {?P4 rng/sc*?c4.?s4?p4?o4. }} We emphasise that performance results shoul be unerstoo as proviing a general inication of feasibility of implementing these semantics in existing stores rather than actual benchmarking: on the one han, the ifferent semantics are not comparable in terms of performance benchmarking, since they provie ifferent results; on the other han, for instance, we only use naive re-materialisation provie by the triple store in our prototype, instea of optimise versions of DRe, such as [26]. For initial experiments we have use ata generate by the LUBM generator for 5, 10 an 15 Universities, which correspon to ifferent ABox sizes merge together with an RDFS version of the LUBM ontology as TBox; this version of LUBM has no complex restrictions on roles, no transitive roles, no inverse roles, an no equality axioms, an axioms of type A B C are split into two axioms A B an A C. Besies, we have esigne a set of 7 ifferent ABox upates in orer to compare the propose mat-preserving an re-preserving semantics. Both our prototype, as well as files containing the ata, ontology, an the upates use for experiments are available on a eicate Web page. 19 We first compare, for each upate semantics, the time elapse for rewriting an executing the upate. Seconly, in orer to compare mat-preserving an re-preserving semantics, we also nee to take into account that re-preserving semantics imply aitional effort on subsequent querying, since rewriting is require (cf. Prop. 1). In orer 17 http://jena.apache.org/ocumentation/tb/ 18 http://jena.apache.org/ocumentation/inference/ 19 http://bai.tuwien.ac.at/user/ahmeti/sparqlupate-rewriter/

to reflect this, we also measure the aggregate times for executing an upate an subsequently processing the stanar 14 LUBM benchmark queries in sequence. Details of the results can be foun on the above-mentione Web page, we only provie a brief summary here: In general, among the mat-preserving semantics, the semantics implementable in terms of rewriting ( 2 ) perform better than those that nee rematerialisation ( 1a,b ), as coul be expecte. There might be potential for improvement here on the latter, when using tailore implementaions of DRe. Also, for both mat-preserving ( 2 ) an re-preserving (Semre 1 ) semantics that rely on rewritings for eleting causes, the optimisation of using variant P fvars instea of P fvars pai off for our queries. As for a comparison between mat-preserving vs. re-preserving, in our experiments re-reuction upon upates seems quite afforable, whereas the aitionally neee query rewriting for subsequent query answering oes not a ramatic costs. Thus, we believe that, epening on the use case, keeping reuce stores upon upates is a feasible an potentially useful strategy, particularly since as shown above re(g) can be implemente with off-the-shelf feratures of SPARQL 1.1. While further optimisations, an implementations in ifferent triple stores remain on our agena, the experiments confirm our expectations so far. 8 Further Relate Work an Possible Future Directions Previous work on upates in the context of tractable ontology languages such as RDFS [11] an DL-Lite [5] typically has treate DELETEs an INSERTs in isolation, but not both at the same time nor in combination with templates fille by WHERE clauses, as in SPARQL 1.1; that is, these approaches are not base on BGP matching but rather on a set of ABox assertions to be upate, known a priori. Pairing both DELETE an INSERT, as in our case, poses new challenges, which we trie to aress here in the practically relevant context of both materialise an reuce triple stores. In the future, we plan to exten our work in the context of DL-Lite, where we coul buil upon thoroughly stuie query rewriting techniques (not necessarily relying on materialisation), an at the same time benefit from a more expressive ontology language. Expaning beyon our simple minimal RDFS language towars more features of DL-Lite or coverage of unrestricte RDF graphs woul impose new challenges: for instance, consistency checking an consistency-preserving upates (as those treate in [5]), which o not yet play a role in the setting of RDFS, woul become relevant; extensions in these irections, as well as practically evaluating the propose semantics on existing triple stores is on our agena. As for further relate works, in the context of reuce stores, we refer to [22], where the cost of reunancy elimination uner various (rule-base) entailment regimes, incluing RDFS, is iscusse in etail. In the area of atabase theory, there has been a lot of work on upating logical atabases: Winslett [28] istinguishes between moelbase an formula-base upates. Our approach clearly falls in the latter category; more concretely, ABox upates coul be viewe as sets of propositional knowlege base upates [14] generate by SPARQL instantiating DELETE/INSERT templates. Let us further note that in the more applie area of atabases, there are obvious parallels between some of our consierations an CASCADE DELETEs in SQL (that is, eletions uner

foreign key constraints), in the sense that we trigger aitional eletions of causes/effects in some of the propose upate semantics iscusse herein. 9 Conclusions We have presente possible semantics of SPARQL 1.1 Upate in the context of RDFS. To the best of our knowlege, this is the first work to iscuss how to combine RDFS with the new SPARQL 1.1 Upate language. While we have been operating on a very restricte setting (only capturing minimal RDFS entailments, restricting BGPs to isallow nonstanar use of the RDFS vocabulary), we coul emonstrate that even in this setting the efinition of a SPARQL 1.1 Upate semantics uner entailments is a non-trivial task. We propose several possible semantics, neither of which might seem intuitive for all possible use cases; this suggests that there is no one-size-fits-all upate semantics. Further, while ontologies shoul be reay for evolution [20], we believe that more work into semantics for upates of ontologies alongsie with ata (TBox & ABox) is still neee to groun research in Ontology Evolution into stanars (SPARQL, RDF, RDFS, OWL), particularly in the light of the emerging importance of RDF an SPARQL in omains where ata is continuously upate (ealing with ynamics in Linke Data, querying sensor ata, or stream reasoning). We have taken a first step in this paper. Acknowlegments This work has been fune by WWTF (project ICT12-015), by the Vienna PhD School of Informatics, an by EU Project Optique (grant n. FP7-318338). References 1. Ahmeti, A., Calvanese, D., Polleres, A.: Upating RDFS ABoxes an TBoxes in SPARQL. CoRR Tech. Rep. arxiv:1403.7248 (2014), http://arxiv.org/abs/1403.7248 2. Beckett, D., Berners-Lee, T., Pru hommeaux, E., Carothers, G.: RDF 1.1 Turtle Terse RDF Triple Language. W3C Rec. (Feb 2014) 3. Bishop, B., Kiryakov, A., Ognyanoff, D., Peikov, I., Tashev, Z., Velkov, R.: OWLIM: A family of scalable semantic repositories. Semantic Web J. 2(1), 33 42 (2011) 4. Calvanese, D., De Giacomo, G., Lembo, D., Lenzerini, M., Rosati, R.: Tractable reasoning an efficient query answering in escription logics: The DL-Lite family. J. of Automate Reasoning 39(3), 385 429 (2007) 5. Calvanese, D., Kharlamov, E., Nutt, W., Zheleznyakov, D.: Evolution of DL-Lite knowlege bases. In: Proc. of ISWC. pp. 112 128 (2010) 6. Ceri, S., Wiom, J.: Deriving incremental prouction rules for euctive ata. Information Systems 19(6), 467 490 (1994) 7. Franconi, E., Gutierrez, C., Mosca, A., Pirrò, G., Rosati, R.: The logic of extensional RDFS. In: Proc. of ISWC. LNCS, vol. 8218, pp. 101 116. Springer (Oct 2013) 8. Gearon, P., Passant, A., Polleres, A.: SPARQL 1.1 Upate. W3C Rec. (Mar 2013) 9. Glimm, B., Ogbuji, C.: SPARQL 1.1 Entailment Regimes. W3C Rec. (Mar 2013) 10. Gupta, A., Mumick, I.S., Subrahmanian, V.S.: Maintaining views incrementally. In: Proc. of ACM SIGMOD. pp. 157 166 (1993) 11. Gutierrez, C., Hurtao, C., Vaisman, A.: Upating RDFS: from theory to practice. In: Proc. of ESWC (2011) 12. Harris, S., Seaborne, A.: SPARQL 1.1 Query Language. W3C Rec. (Mar 2013)

13. Hayes, P.: RDF Semantics. W3C Rec. (Feb 2004) 14. Katsuno, H., Menelzon, A.O.: A unifie view of propositional knowlege base upates. In: Proc. of IJCAI. pp. 1413 1419 (1989) 15. Kontchakov, R., Roriguez-Muro, M., Zakharyaschev, M.: Ontology-base ata access with atabases: A short course. In: Reasoning Web Tutorial Lectures, LNCS, vol. 8067, pp. 194 229. Springer (2013) 16. Kotowski, J., Bry, F., Brot, S.: Reasoning as axioms change - Incremental view maintenance reconsiere. In: Proc. of RR. LNCS, vol. 6902, pp. 139 154. Springer (2011) 17. Mallea, A., Arenas, M., Hogan, A., Polleres, A.: On blank noes. In: Proc. of ISWC. LNCS, vol. 7031, pp. 421 437. Springer (2011) 18. Motik, B.: On the properties of metamoeling in OWL. J. of Logic an Computation 17(4), 617 637 (2007) 19. Muñoz, S., Pérez, J., Gutiérrez, C.: Minimal euctive systems for RDF. In: Proc. of ESWC. pp. 53 67 (2007) 20. Noy, N.F., Klein, M.C.A.: Ontology evolution: Not the same as schema evolution. Knowlege an Information Systems 6(4), 428 440 (2004) 21. Pérez, J., Arenas, M., Gutierrez, C.: Semantics an complexity of SPARQL. ACM Trans. on Database Systems 34(3), 16:1 16:45 (2009) 22. Pichler, R., Polleres, A., Skritek, S., Woltran, S.: Complexity of reunancy etection on RDF graphs in the presence of rules, constraints, an queries. Semantic Web J. 4(4) (2013) 23. Polleres, A., Hogan, A., Delbru, R., Umbrich, J.: RDFS & OWL reasoning for linke ata. In: Reasoning Web Tutorial Lectures, LNCS, vol. 8067, pp. 91 149. Springer (2013) 24. Pru hommeaux, E., Seaborne, A.: SPARQL Query Language for RDF. W3C Rec. (Jan 2008) 25. Ullman, J.D.: Principles of Database an Knowlege-Base Systems, vol. 1. Computer Science Press (1988) 26. Urbani, J., Margara, A., Jacobs, C.J.H., van Harmelen, F., Bal, H.E.: DynamiTE: Parallel materialization of ynamic RDF ata. In: Proc. of ISWC. LNCS, vol. 8218. Springer (2013) 27. Volz, R., Staab, S., Motik, B.: Incrementally maintaining materializations of ontologies store in logic atabases. J. on Data Semantics 2, 1 34 (2005) 28. Winslett, M.: Upating Logical Databases. Cambrige University Press (2005) Appenix Algorithm 1: rewrite(q, T ) Input: Conjunctive query q, TBox T Output: Union (set) of conjunctive queries 1 P := {q} 2 repeat 3 P := P 4 foreach q P o 5 foreach g in q o // expansion 6 foreach inclusion assertion I in T o 7 if I is applicable to g then 8 P := P { q[g/ gr(g, I)] } 9 until P = P 10 return P Table 2. Semantics of gr(g, I) in Alg.1 g I gr(g/i) A(x) A A A (x) A(x) P A P (x, _) A(x) P A P (_, x) P 1(x, y) P 2 P 1 P 2(x, y) Here, _ stans for a fresh variable.