A Broad Class of First-Order Rewritable Tuple-Generating Dependencies Datalog 2.0 Workshop 2012 C. Civili and R. Rosati Department of Computer, Control, and Management Engineering Antonio Ruberti, Sapienza University of Rome, Italy
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Outline 1 Introduction 2 Preliminaries 3 Weakly Recursive simple TGDs 4 Query Rewriting 5 Conclusions A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Introduction • Interesting recent works on Datalog extensions are based on the idea of extending Datalog rules with existential variables in rule heads . • This kind of rules correspond to tuple-generating dependencies (TGDs), a well-known form of database dependencies in database theory. • The problem of reasoning over Datalog programs with existential variables in rule heads corresponds to the problem of reasoning over a database with TGDs under an open-world assumption . • Almost all the recent approaches to this problem focus on conjunctive query answering under TGDs. A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions The Problem • We are interested in first-order rewritable TGDs , i.e., classes of TGDs for which conjunctive query answering can be reduced to the evaluation of a first-order query over the database. • Very important both from the theoretical and the practical viewpoint. • Such classes of TGDs could be used for building efficient query answering systems that delegate data management to standard relational database technology, like in ontology-based data access (OBDA) systems. • Our aim is to identify a broader class of TGDs that comprises all known FOL-rewritable classes of TGDs, and in particular acyclic TGDs , multi-linear TGDs , and sticky-join TGDs . A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Our Contributions 1 We define the class of weakly recursive TGDs . 2 We prove that weakly recursive TGDs are first-order rewritable , by defining an algorithm that is able to compute the first-order rewriting of conjunctive queries over weakly recursive TGDs and proving termination of this algorithm over weakly recursive TGDs. 3 We prove that, under the restriction to simple TGDs, weakly recursive TGDs comprise and generalize every previously known FOL-rewritable class of TGDs , in particular, acyclic TGDs , linear TGDs , multi-linear TGDs , sticky TGDs , sticky-join TGDs . A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Our Contributions 1 We define the class of weakly recursive TGDs . 2 We prove that weakly recursive TGDs are first-order rewritable , by defining an algorithm that is able to compute the first-order rewriting of conjunctive queries over weakly recursive TGDs and proving termination of this algorithm over weakly recursive TGDs. 3 We prove that, under the restriction to simple TGDs, weakly recursive TGDs comprise and generalize every previously known FOL-rewritable class of TGDs , in particular, acyclic TGDs , linear TGDs , multi-linear TGDs , sticky TGDs , sticky-join TGDs . A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Our Contributions 1 We define the class of weakly recursive TGDs . 2 We prove that weakly recursive TGDs are first-order rewritable , by defining an algorithm that is able to compute the first-order rewriting of conjunctive queries over weakly recursive TGDs and proving termination of this algorithm over weakly recursive TGDs. 3 We prove that, under the restriction to simple TGDs, weakly recursive TGDs comprise and generalize every previously known FOL-rewritable class of TGDs , in particular, acyclic TGDs , linear TGDs , multi-linear TGDs , sticky TGDs , sticky-join TGDs . A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Our Contributions 1 We define the class of weakly recursive TGDs . 2 We prove that weakly recursive TGDs are first-order rewritable , by defining an algorithm that is able to compute the first-order rewriting of conjunctive queries over weakly recursive TGDs and proving termination of this algorithm over weakly recursive TGDs. 3 We prove that, under the restriction to simple TGDs, weakly recursive TGDs comprise and generalize every previously known FOL-rewritable class of TGDs , in particular, acyclic TGDs , linear TGDs , multi-linear TGDs , sticky TGDs , sticky-join TGDs . A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Outline 1 Introduction 2 Preliminaries 3 Weakly Recursive simple TGDs 4 Query Rewriting 5 Conclusions A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Syntax • A tuple-generating dependency (TGD) R is an expression of the form β 1 , . . . , β n → α 1 , . . . , α m , where α 1 , . . . , α m , β 1 , . . . , β n are atoms and m ≥ 1, n ≥ 1. • Given an atom γ , we denote by Rel ( γ ) the relation symbol of γ . • We call distinguished variables of R the variables occurring in the head and in the body of R , existential body variables of R the ones occurring only in the body of R , and existential head variables of R the ones occurring only in the head of R . • We focus on simple TGDs , i.e., TGDs in which every atom does not contain occurrences of constants and does not contain repeated occurrences of variables. • A CQ q is an expression of the form q ( x ) :- α 1 , . . . , α n , where α 1 , . . . , α n ( body ) is a sequence of atoms. • A UCQ is a set of CQs of the same arity. A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Syntax • A tuple-generating dependency (TGD) R is an expression of the form β 1 , . . . , β n → α 1 , . . . , α m , where α 1 , . . . , α m , β 1 , . . . , β n are atoms and m ≥ 1, n ≥ 1. • Given an atom γ , we denote by Rel ( γ ) the relation symbol of γ . • We call distinguished variables of R the variables occurring in the head and in the body of R , existential body variables of R the ones occurring only in the body of R , and existential head variables of R the ones occurring only in the head of R . • We focus on simple TGDs , i.e., TGDs in which every atom does not contain occurrences of constants and does not contain repeated occurrences of variables. • A CQ q is an expression of the form q ( x ) :- α 1 , . . . , α n , where α 1 , . . . , α n ( body ) is a sequence of atoms. • A UCQ is a set of CQs of the same arity. A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Syntax • A tuple-generating dependency (TGD) R is an expression of the form β 1 , . . . , β n → α 1 , . . . , α m , where α 1 , . . . , α m , β 1 , . . . , β n are atoms and m ≥ 1, n ≥ 1. • Given an atom γ , we denote by Rel ( γ ) the relation symbol of γ . • We call distinguished variables of R the variables occurring in the head and in the body of R , existential body variables of R the ones occurring only in the body of R , and existential head variables of R the ones occurring only in the head of R . • We focus on simple TGDs , i.e., TGDs in which every atom does not contain occurrences of constants and does not contain repeated occurrences of variables. • A CQ q is an expression of the form q ( x ) :- α 1 , . . . , α n , where α 1 , . . . , α n ( body ) is a sequence of atoms. • A UCQ is a set of CQs of the same arity. A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Introduction Preliminaries Weakly Recursive simple TGDs Query Rewriting Conclusions Syntax • A tuple-generating dependency (TGD) R is an expression of the form β 1 , . . . , β n → α 1 , . . . , α m , where α 1 , . . . , α m , β 1 , . . . , β n are atoms and m ≥ 1, n ≥ 1. • Given an atom γ , we denote by Rel ( γ ) the relation symbol of γ . • We call distinguished variables of R the variables occurring in the head and in the body of R , existential body variables of R the ones occurring only in the body of R , and existential head variables of R the ones occurring only in the head of R . • We focus on simple TGDs , i.e., TGDs in which every atom does not contain occurrences of constants and does not contain repeated occurrences of variables. • A CQ q is an expression of the form q ( x ) :- α 1 , . . . , α n , where α 1 , . . . , α n ( body ) is a sequence of atoms. • A UCQ is a set of CQs of the same arity. A Broad Class of First-Order Rewritable Tuple-Generating Dependencies C. Civili and R. Rosati
Recommend
More recommend