117
Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine Amarilli 1 , Silviu Maniu 2 1 Télécom ParisTech 2 LRI November 23rd, 2015 Thanks to Pierre Senellart for proofreading these slides. 1/37

Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Uncertain Data ManagementOpen-World Query Answering

Antoine Amarilli1, Silviu Maniu2

1Télécom ParisTech

2LRI

November 23rd, 2015

Thanks to Pierre Senellart for proofreading these slides. 1/37

Page 2: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Table of contents

1 Basics

2 Contexts

3 Languages

4 Chase

5 Advanced topics

2/37

Page 3: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Incompleteness

We have an instance IThe true state of the world is WWe may have I ̸= W

I may be correct: I ⊆ WI may be complete: W ⊆ I

→ Today, I is correct but not complete

3/37

Page 4: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Incompleteness

We have an instance IThe true state of the world is WWe may have I ̸= WI may be correct: I ⊆ WI may be complete: W ⊆ I

→ Today, I is correct but not complete

3/37

Page 5: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Incompleteness

We have an instance IThe true state of the world is WWe may have I ̸= WI may be correct: I ⊆ WI may be complete: W ⊆ I

→ Today, I is correct but not complete

3/37

Page 6: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Incompleteness and query evaluation

We know: evaluate a query Q on IWe want: evaluate Q on W

We don’t have W→ What can we do?!

4/37

Page 7: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Incompleteness and query evaluation

We know: evaluate a query Q on IWe want: evaluate Q on WWe don’t have W

→ What can we do?!

4/37

Page 8: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Constraints to the rescue!

We know that I ⊆ W (correct)We know that W satisfies some logical constraints Θ

Q is entailed if W |= Q for all W ⊇ I such that W |= Θ

Definition (Open-World Query Answering – OWQA)Given an instance I, Boolean CQ Q, and constraints Θ, decidewhether all W ⊇ I that satisfy Θ also satisfy Q.

Combined complexity. Input is I, Θ, QData complexity. Input is I

5/37

Page 9: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Constraints to the rescue!

We know that I ⊆ W (correct)We know that W satisfies some logical constraints Θ

Q is entailed if W |= Q for all W ⊇ I such that W |= Θ

Definition (Open-World Query Answering – OWQA)Given an instance I, Boolean CQ Q, and constraints Θ, decidewhether all W ⊇ I that satisfy Θ also satisfy Q.

Combined complexity. Input is I, Θ, QData complexity. Input is I

5/37

Page 10: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Constraints to the rescue!

We know that I ⊆ W (correct)We know that W satisfies some logical constraints Θ

Q is entailed if W |= Q for all W ⊇ I such that W |= Θ

Definition (Open-World Query Answering – OWQA)Given an instance I, Boolean CQ Q, and constraints Θ, decidewhether all W ⊇ I that satisfy Θ also satisfy Q.

Combined complexity. Input is I, Θ, QData complexity. Input is I

5/37

Page 11: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Constraints to the rescue!

We know that I ⊆ W (correct)We know that W satisfies some logical constraints Θ

Q is entailed if W |= Q for all W ⊇ I such that W |= Θ

Definition (Open-World Query Answering – OWQA)Given an instance I, Boolean CQ Q, and constraints Θ, decidewhether all W ⊇ I that satisfy Θ also satisfy Q.

Combined complexity. Input is I, Θ, QData complexity. Input is I

5/37

Page 12: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

ExampleRelation Class in I

date teacher resp name num2015-11-23 Antoine Fabian Uncert. Data Mgmt 12015-11-30 Antoine Fabian Uncert. Data Mgmt 2

Book in Idate room prof2015-12-01 E242 John

Θ : ∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

“Every class has a booking.”

Q : ∃t r Book(“2015-11-23”, t, r)“Is there a room booked on Nov 23rd?”

6/37

Page 13: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

ExampleRelation Class in I

date teacher resp name num2015-11-23 Antoine Fabian Uncert. Data Mgmt 12015-11-30 Antoine Fabian Uncert. Data Mgmt 2

Book in Idate room prof2015-12-01 E242 John

Θ : ∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

“Every class has a booking.”

Q : ∃t r Book(“2015-11-23”, t, r)“Is there a room booked on Nov 23rd?”

6/37

Page 14: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

ExampleRelation Class in I

date teacher resp name num2015-11-23 Antoine Fabian Uncert. Data Mgmt 12015-11-30 Antoine Fabian Uncert. Data Mgmt 2

Book in Idate room prof2015-12-01 E242 John

Θ : ∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

“Every class has a booking.”

Q : ∃t r Book(“2015-11-23”, t, r)“Is there a room booked on Nov 23rd?” 6/37

Page 15: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Table of contents

1 Basics

2 Contexts

3 Languages

4 Chase

5 Advanced topics

7/37

Page 16: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Logical satisfiability

OWQA is equivalent to:

is I ∧Θ ∧ ¬Q satisfiable?

Is it just logical satisfiability then?!I is where we want to scaleΘ and Q are usually different languages...... if we express both in the same language,it will be hard to achieve good complexities!(or even decidability...)

8/37

Page 17: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Logical satisfiability

OWQA is equivalent to:

is I ∧Θ ∧ ¬Q satisfiable?

Is it just logical satisfiability then?!

I is where we want to scaleΘ and Q are usually different languages...... if we express both in the same language,it will be hard to achieve good complexities!(or even decidability...)

8/37

Page 18: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Logical satisfiability

OWQA is equivalent to:

is I ∧Θ ∧ ¬Q satisfiable?

Is it just logical satisfiability then?!I is where we want to scale

Θ and Q are usually different languages...... if we express both in the same language,it will be hard to achieve good complexities!(or even decidability...)

8/37

Page 19: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Logical satisfiability

OWQA is equivalent to:

is I ∧Θ ∧ ¬Q satisfiable?

Is it just logical satisfiability then?!I is where we want to scaleΘ and Q are usually different languages...

... if we express both in the same language,it will be hard to achieve good complexities!(or even decidability...)

8/37

Page 20: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Logical satisfiability

OWQA is equivalent to:

is I ∧Θ ∧ ¬Q satisfiable?

Is it just logical satisfiability then?!I is where we want to scaleΘ and Q are usually different languages...... if we express both in the same language,it will be hard to achieve good complexities!(or even decidability...)

8/37

Page 21: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Repairing the database

Classdate teacher resp name num2015-11-23 Antoine Fabian Uncert. Data Mgmt 12015-11-30 Antoine Fabian Uncert. Data Mgmt 22015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4

? Fabian ? ? ?? ? ? ? 1

Constraints:The responsible for a class must teach some classEvery class must have a first session

→ What can we deduce?→ Q is true iff it is true on all completions

9/37

Page 22: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Repairing the database

Classdate teacher resp name num2015-11-23 Antoine Fabian Uncert. Data Mgmt 12015-11-30 Antoine Fabian Uncert. Data Mgmt 22015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4

? Fabian ? ? ?? ? ? ? 1

Constraints:The responsible for a class must teach some classEvery class must have a first session

→ What can we deduce?

→ Q is true iff it is true on all completions

9/37

Page 23: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Repairing the database

Classdate teacher resp name num2015-11-23 Antoine Fabian Uncert. Data Mgmt 12015-11-30 Antoine Fabian Uncert. Data Mgmt 22015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4? Fabian ? ? ?

? ? ? ? 1

Constraints:The responsible for a class must teach some classEvery class must have a first session

→ What can we deduce?

→ Q is true iff it is true on all completions

9/37

Page 24: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Repairing the database

Classdate teacher resp name num2015-11-23 Antoine Fabian Uncert. Data Mgmt 12015-11-30 Antoine Fabian Uncert. Data Mgmt 22015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4? Fabian ? ? ?? ? ? ? 1

Constraints:The responsible for a class must teach some classEvery class must have a first session

→ What can we deduce?

→ Q is true iff it is true on all completions

9/37

Page 25: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Repairing the database

Classdate teacher resp name num2015-11-23 Antoine Fabian Uncert. Data Mgmt 12015-11-30 Antoine Fabian Uncert. Data Mgmt 22015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4? Fabian ? ? ?? ? ? ? 1

Constraints:The responsible for a class must teach some classEvery class must have a first session

→ What can we deduce?→ Q is true iff it is true on all completions

9/37

Page 26: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

But why deal with broken databases?

The data may have come from a different sourceThe constraints may have been imposed after the factUser input may be incorrectYou want a resilient system...

10/37

Page 27: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

But why deal with broken databases?

The data may have come from a different sourceThe constraints may have been imposed after the factUser input may be incorrectYou want a resilient system...

10/37

Page 28: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Reasoning (AI)

Artificial reasoning: draw consequences from what you knowI contains the factsΘ are the reasoning rulesQ is what we want to figure out

→ Can we deduce Q from I using Θ?→ Is Q certain to hold?

11/37

Page 29: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Reasoning (AI)

Artificial reasoning: draw consequences from what you knowI contains the factsΘ are the reasoning rulesQ is what we want to figure out

→ Can we deduce Q from I using Θ?→ Is Q certain to hold?

11/37

Page 30: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Data integration

I contains I1, . . . , In, the course databases of all D&K schoolsWe want to create a virtual global database I of classes

Fix a relation Class for the global databaseΘ: whenever some Ii contains a class, create it in RClass1

date name2015-11-23 UDM2015-11-30 UDM2015-12-07 UDM2015-12-14 UDM

Classdate teacher resp name num2015-11-23 ? ? UDM ?2015-11-30 ? ? UDM ?2015-12-07 ? ? UDM ?2015-12-14 ? ? UDM ?

12/37

Page 31: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Data integration

I contains I1, . . . , In, the course databases of all D&K schoolsWe want to create a virtual global database I of classesFix a relation Class for the global databaseΘ: whenever some Ii contains a class, create it in RClass1

date name2015-11-23 UDM2015-11-30 UDM2015-12-07 UDM2015-12-14 UDM

Classdate teacher resp name num2015-11-23 ? ? UDM ?2015-11-30 ? ? UDM ?2015-12-07 ? ? UDM ?2015-12-14 ? ? UDM ?

12/37

Page 32: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Data integration

I contains I1, . . . , In, the course databases of all D&K schoolsWe want to create a virtual global database I of classesFix a relation Class for the global databaseΘ: whenever some Ii contains a class, create it in RClass1

date name2015-11-23 UDM2015-11-30 UDM2015-12-07 UDM2015-12-14 UDM

Classdate teacher resp name num

2015-11-23 ? ? UDM ?2015-11-30 ? ? UDM ?2015-12-07 ? ? UDM ?2015-12-14 ? ? UDM ?

12/37

Page 33: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Data integration

I contains I1, . . . , In, the course databases of all D&K schoolsWe want to create a virtual global database I of classesFix a relation Class for the global databaseΘ: whenever some Ii contains a class, create it in RClass1

date name2015-11-23 UDM2015-11-30 UDM2015-12-07 UDM2015-12-14 UDM

Classdate teacher resp name num2015-11-23 ? ? UDM ?2015-11-30 ? ? UDM ?2015-12-07 ? ? UDM ?2015-12-14 ? ? UDM ?

12/37

Page 34: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Ontology-based data access

In general: use a common schema for reasoningI contains heterogeneous data sourcesΘ describes mappings from sources to common schemaand reasoning rules and constraints on the common schemaQ is the query posed the common schema

���������������������������

������ ������������

���������

�������

�������

13/37

Page 35: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Table of contents

1 Basics

2 Contexts

3 Languages

4 Chase

5 Advanced topics

14/37

Page 36: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

First-order logic

All constraints for Θ are in first-order logic (FO):contains atoms R(x, y, z)closed under Boolean AND, OR, NOTexistential quantification ∃x ϕ(x)universal quantification ∀x ϕ(x)

→ Why not just use FO for constraints then?!

15/37

Page 37: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

First-order logic

All constraints for Θ are in first-order logic (FO):contains atoms R(x, y, z)closed under Boolean AND, OR, NOTexistential quantification ∃x ϕ(x)universal quantification ∀x ϕ(x)

→ Why not just use FO for constraints then?!

15/37

Page 38: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

FO is undecidable!

Given an input FO formula Θ, is it satisfiable?(i.e., OWQA with I = ∅ and Q : False).

→ This problem is undecidable!Proof: Encode a tiling system, orencode transition rules for a Turing machine

→ We consider weaker languages

16/37

. . .

. . .

. . .... ... ... ... ... . . .

Page 39: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

FO is undecidable!

Given an input FO formula Θ, is it satisfiable?(i.e., OWQA with I = ∅ and Q : False).→ This problem is undecidable!

Proof: Encode a tiling system, orencode transition rules for a Turing machine

→ We consider weaker languages

16/37

. . .

. . .

. . .... ... ... ... ... . . .

Page 40: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

FO is undecidable!

Given an input FO formula Θ, is it satisfiable?(i.e., OWQA with I = ∅ and Q : False).→ This problem is undecidable!

Proof: Encode a tiling system, orencode transition rules for a Turing machine

→ We consider weaker languages

16/37

. . .

. . .

. . .... ... ... ... ... . . .

Page 41: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

FO is undecidable!

Given an input FO formula Θ, is it satisfiable?(i.e., OWQA with I = ∅ and Q : False).→ This problem is undecidable!

Proof: Encode a tiling system, orencode transition rules for a Turing machine

→ We consider weaker languages

16/37

. . .

. . .

. . .... ... ... ... ... . . .

Page 42: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Tuple-generating dependenciesTuple-generating dependencies (TGDs), classical database rules:

∀x Q′(x) ⇒ ∃y Q′′(x,y)where Q′ and Q′′ are CQs.

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Intuition: facts cause more facts to be createdUseful for:

Integrity constraints: see aboveSchema mappings: copy facts from I1 to IReasoning: ∀x Human(x) ⇒ Mortal(x)

17/37

Page 43: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Tuple-generating dependenciesTuple-generating dependencies (TGDs), classical database rules:

∀x Q′(x) ⇒ ∃y Q′′(x,y)where Q′ and Q′′ are CQs.

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Intuition: facts cause more facts to be created

Useful for:Integrity constraints: see aboveSchema mappings: copy facts from I1 to IReasoning: ∀x Human(x) ⇒ Mortal(x)

17/37

Page 44: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Tuple-generating dependenciesTuple-generating dependencies (TGDs), classical database rules:

∀x Q′(x) ⇒ ∃y Q′′(x,y)where Q′ and Q′′ are CQs.

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Intuition: facts cause more facts to be createdUseful for:

Integrity constraints: see aboveSchema mappings: copy facts from I1 to IReasoning: ∀x Human(x) ⇒ Mortal(x)

17/37

Page 45: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for TGDs is undecidable!

Satisfiability of TGDs Θ is trivial...

→ take W = ∅Satisfiability of TGDs Θ and instance I is easy...→ always possible – infinite repair of violations

(the chase – see later)

OWQA for I, Θ and Q is undecidable!from [Chandra et al., 1981, Beeri and Vardi, 1981]

→ We need less expressive languages

18/37

Page 46: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for TGDs is undecidable!

Satisfiability of TGDs Θ is trivial...→ take W = ∅

Satisfiability of TGDs Θ and instance I is easy...→ always possible – infinite repair of violations

(the chase – see later)

OWQA for I, Θ and Q is undecidable!from [Chandra et al., 1981, Beeri and Vardi, 1981]

→ We need less expressive languages

18/37

Page 47: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for TGDs is undecidable!

Satisfiability of TGDs Θ is trivial...→ take W = ∅

Satisfiability of TGDs Θ and instance I is easy...

→ always possible – infinite repair of violations(the chase – see later)

OWQA for I, Θ and Q is undecidable!from [Chandra et al., 1981, Beeri and Vardi, 1981]

→ We need less expressive languages

18/37

Page 48: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for TGDs is undecidable!

Satisfiability of TGDs Θ is trivial...→ take W = ∅

Satisfiability of TGDs Θ and instance I is easy...→ always possible – infinite repair of violations

(the chase – see later)

OWQA for I, Θ and Q is undecidable!from [Chandra et al., 1981, Beeri and Vardi, 1981]

→ We need less expressive languages

18/37

Page 49: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for TGDs is undecidable!

Satisfiability of TGDs Θ is trivial...→ take W = ∅

Satisfiability of TGDs Θ and instance I is easy...→ always possible – infinite repair of violations

(the chase – see later)

OWQA for I, Θ and Q is undecidable!from [Chandra et al., 1981, Beeri and Vardi, 1981]

→ We need less expressive languages

18/37

Page 50: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for TGDs is undecidable!

Satisfiability of TGDs Θ is trivial...→ take W = ∅

Satisfiability of TGDs Θ and instance I is easy...→ always possible – infinite repair of violations

(the chase – see later)

OWQA for I, Θ and Q is undecidable!from [Chandra et al., 1981, Beeri and Vardi, 1981]

→ We need less expressive languages

18/37

Page 51: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Inclusion dependencies

Inclusion dependencies (IDs), classical database rules:

∀x A′(x) ⇒ ∃y A′′(x,y)

where A and A′ are atoms rather than CQs.

The TGD example was in fact also an ID:

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

19/37

Page 52: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Inclusion dependencies

Inclusion dependencies (IDs), classical database rules:

∀x A′(x) ⇒ ∃y A′′(x,y)

where A and A′ are atoms rather than CQs.The TGD example was in fact also an ID:

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

19/37

Page 53: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for IDs is decidable

Satisfiability for IDs is still trivial

OWQA: determine whether Q is implied by I and IDs Θ?

Decidable!PSPACE-complete combined complexity [Johnson and Klug, 1984]Data complexity is PTIME, even AC0

→ Intuition: we can rewrite the query Q

→ We will study other decidable classes of TGDs

20/37

Page 54: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for IDs is decidable

Satisfiability for IDs is still trivial

OWQA: determine whether Q is implied by I and IDs Θ?Decidable!PSPACE-complete combined complexity [Johnson and Klug, 1984]Data complexity is PTIME, even AC0

→ Intuition: we can rewrite the query Q

→ We will study other decidable classes of TGDs

20/37

Page 55: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for IDs is decidable

Satisfiability for IDs is still trivial

OWQA: determine whether Q is implied by I and IDs Θ?Decidable!PSPACE-complete combined complexity [Johnson and Klug, 1984]Data complexity is PTIME, even AC0

→ Intuition: we can rewrite the query Q

→ We will study other decidable classes of TGDs

20/37

Page 56: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

OWQA for IDs is decidable

Satisfiability for IDs is still trivial

OWQA: determine whether Q is implied by I and IDs Θ?Decidable!PSPACE-complete combined complexity [Johnson and Klug, 1984]Data complexity is PTIME, even AC0

→ Intuition: we can rewrite the query Q

→ We will study other decidable classes of TGDs

20/37

Page 57: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Table of contents

1 Basics

2 Contexts

3 Languages

4 Chase

5 Advanced topics

21/37

Page 58: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase example

Classdate teacher resp name num2015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Bookdate room prof2015-12-07

?1

Antoine2015-12-14

?2

Silviu

22/37

Page 59: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase example

Classdate teacher resp name num2015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Bookdate room prof2015-12-07

?1

Antoine2015-12-14

?2

Silviu

22/37

Page 60: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase example

Classdate teacher resp name num2015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Bookdate room prof

2015-12-07

?1

Antoine2015-12-14

?2

Silviu

22/37

Page 61: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase example

Classdate teacher resp name num2015-12-07 Antoine Fabian Uncert. Data Mgmt 32015-12-14 Silviu Fabian Uncert. Data Mgmt 4

∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Bookdate room prof2015-12-07 ?1 Antoine2015-12-14 ?2 Silviu

22/37

Page 62: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase

OWQA: test if instance I and TGDs Θ entail query QThe chase: a most generic repair of I by Θ

Iterative process: start with IAt east stage, find violations of each TGD in Θ

TGD ∀x Q′(x) ⇒ ∃x Q′′(x,y)find a such that Q′(a) but not Q′′(a,b) for any b

Create new elements bCreate new facts to make Q′(a,b) true

→ Take the infinite result of this process

23/37

Page 63: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase

OWQA: test if instance I and TGDs Θ entail query QThe chase: a most generic repair of I by Θ

Iterative process: start with IAt east stage, find violations of each TGD in Θ

TGD ∀x Q′(x) ⇒ ∃x Q′′(x,y)find a such that Q′(a) but not Q′′(a,b) for any b

Create new elements bCreate new facts to make Q′(a,b) true

→ Take the infinite result of this process

23/37

Page 64: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase

OWQA: test if instance I and TGDs Θ entail query QThe chase: a most generic repair of I by Θ

Iterative process: start with IAt east stage, find violations of each TGD in Θ

TGD ∀x Q′(x) ⇒ ∃x Q′′(x,y)find a such that Q′(a) but not Q′′(a,b) for any b

Create new elements bCreate new facts to make Q′(a,b) true

→ Take the infinite result of this process

23/37

Page 65: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase

OWQA: test if instance I and TGDs Θ entail query QThe chase: a most generic repair of I by Θ

Iterative process: start with IAt east stage, find violations of each TGD in Θ

TGD ∀x Q′(x) ⇒ ∃x Q′′(x,y)find a such that Q′(a) but not Q′′(a,b) for any b

Create new elements bCreate new facts to make Q′(a,b) true

→ Take the infinite result of this process

23/37

Page 66: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase

OWQA: test if instance I and TGDs Θ entail query QThe chase: a most generic repair of I by Θ

Iterative process: start with IAt east stage, find violations of each TGD in Θ

TGD ∀x Q′(x) ⇒ ∃x Q′′(x,y)find a such that Q′(a) but not Q′′(a,b) for any b

Create new elements bCreate new facts to make Q′(a,b) true

→ Take the infinite result of this process

23/37

Page 67: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Infinite chase example

∀t u Mentor(t, u) ⇒ ∃s Mentor(s, t)

Mentormaster padawan

Antoine Arthur DentSilviu Arthur Dent?1 Antoine?2 Silviu?3 ?1?4 ?2?5 ?3?6 ?4... ...

24/37

Page 68: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Infinite chase example

∀t u Mentor(t, u) ⇒ ∃s Mentor(s, t)

Mentormaster padawanAntoine Arthur DentSilviu Arthur Dent

?1 Antoine?2 Silviu?3 ?1?4 ?2?5 ?3?6 ?4... ...

24/37

Page 69: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Infinite chase example

∀t u Mentor(t, u) ⇒ ∃s Mentor(s, t)

Mentormaster padawanAntoine Arthur DentSilviu Arthur Dent?1 Antoine?2 Silviu

?3 ?1?4 ?2?5 ?3?6 ?4... ...

24/37

Page 70: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Infinite chase example

∀t u Mentor(t, u) ⇒ ∃s Mentor(s, t)

Mentormaster padawanAntoine Arthur DentSilviu Arthur Dent?1 Antoine?2 Silviu?3 ?1?4 ?2

?5 ?3?6 ?4... ...

24/37

Page 71: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Infinite chase example

∀t u Mentor(t, u) ⇒ ∃s Mentor(s, t)

Mentormaster padawanAntoine Arthur DentSilviu Arthur Dent?1 Antoine?2 Silviu?3 ?1?4 ?2?5 ?3?6 ?4

... ...

24/37

Page 72: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Infinite chase example

∀t u Mentor(t, u) ⇒ ∃s Mentor(s, t)

Mentormaster padawanAntoine Arthur DentSilviu Arthur Dent?1 Antoine?2 Silviu?3 ?1?4 ?2?5 ?3?6 ?4... ...

24/37

Page 73: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase universality

The chase is the most generic completionCan be shown using homomorphisms

→ A query is true in the chase iff it is entailed

TheoremFor any instance I, TGDs Θ, Boolean CQ Q,the following are equivalent:

I and Θ entail Qthe chase of I by Θ satisfies Q

→ How to reason about this infinite chase?

25/37

Page 74: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase universality

The chase is the most generic completionCan be shown using homomorphisms

→ A query is true in the chase iff it is entailed

TheoremFor any instance I, TGDs Θ, Boolean CQ Q,the following are equivalent:

I and Θ entail Qthe chase of I by Θ satisfies Q

→ How to reason about this infinite chase?

25/37

Page 75: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase universality

The chase is the most generic completionCan be shown using homomorphisms

→ A query is true in the chase iff it is entailed

TheoremFor any instance I, TGDs Θ, Boolean CQ Q,the following are equivalent:

I and Θ entail Qthe chase of I by Θ satisfies Q

→ How to reason about this infinite chase?

25/37

Page 76: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase universality

The chase is the most generic completionCan be shown using homomorphisms

→ A query is true in the chase iff it is entailed

TheoremFor any instance I, TGDs Θ, Boolean CQ Q,the following are equivalent:

I and Θ entail Qthe chase of I by Θ satisfies Q

→ How to reason about this infinite chase?

25/37

Page 77: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase termination

Sometimes, the chase of I by Θ is finiteWe can then decide whether a query Q is entailed:

Construct the chaseEvaluate Q on the chase

→ When is the chase finite?

26/37

Page 78: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase termination

Sometimes, the chase of I by Θ is finiteWe can then decide whether a query Q is entailed:

Construct the chaseEvaluate Q on the chase

→ When is the chase finite?

26/37

Page 79: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Chase termination

Sometimes, the chase of I by Θ is finiteWe can then decide whether a query Q is entailed:

Construct the chaseEvaluate Q on the chase

→ When is the chase finite?

26/37

Page 80: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Full dependencies

If no TGD has an ∃, then the chase is finite→ No new elements are created

Good: ∀d r p Book(d, r, p) ⇒ Room(r)Bad: ∀x Mentor(x) ⇒ ∃y Mentor(x,y)

27/37

Page 81: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Full dependencies

If no TGD has an ∃, then the chase is finite→ No new elements are created

Good: ∀d r p Book(d, r, p) ⇒ Room(r)Bad: ∀x Mentor(x) ⇒ ∃y Mentor(x,y)

27/37

Page 82: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Acyclicity

Simple sufficient condition for finite chase:If a relation name occurs at the left of a TGDthen it does not occur at the right

Good: ∀x Class(x) ⇒ ∃y Book(x)Bad: ∀x Mentor(x) ⇒ ∃y Mentor(x,y)

More general acyclicity conditions

28/37

Page 83: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Acyclicity

Simple sufficient condition for finite chase:If a relation name occurs at the left of a TGDthen it does not occur at the right

Good: ∀x Class(x) ⇒ ∃y Book(x)Bad: ∀x Mentor(x) ⇒ ∃y Mentor(x,y)

More general acyclicity conditions

28/37

Page 84: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Acyclicity

Simple sufficient condition for finite chase:If a relation name occurs at the left of a TGDthen it does not occur at the right

Good: ∀x Class(x) ⇒ ∃y Book(x)Bad: ∀x Mentor(x) ⇒ ∃y Mentor(x,y)

More general acyclicity conditions

28/37

Page 85: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Infinite chase

What can we do if the chase is infinite?Bounded derivation depth: we can truncate the chase:

we fix Θ and look at the size of Qbound the maximal depth in the chasewhere Q can be made true

Bounded treewidth: the chase is like a tree:we can reason about infinite and regular treesuse tree automata, following Courcelle’s theoremsome rules preserve this, e.g., the guarded fragments

29/37

Page 86: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Infinite chase

What can we do if the chase is infinite?Bounded derivation depth: we can truncate the chase:

we fix Θ and look at the size of Qbound the maximal depth in the chasewhere Q can be made true

Bounded treewidth: the chase is like a tree:we can reason about infinite and regular treesuse tree automata, following Courcelle’s theoremsome rules preserve this, e.g., the guarded fragments

29/37

Page 87: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Table of contents

1 Basics

2 Contexts

3 Languages

4 Chase

5 Advanced topics

30/37

Page 88: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Query rewriting

The chase: reason about consequences of I under ΘOther option: reason about how to prove Q

Θ : ∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Q : ∃t r Book(“2015-11-23”, t, r)

Q2 : ∃prof, r, n, i, Class(“2015-11-23”, prof, r, n, i)

31/37

Page 89: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Query rewriting

The chase: reason about consequences of I under ΘOther option: reason about how to prove Q

Θ : ∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Q : ∃t r Book(“2015-11-23”, t, r)

Q2 : ∃prof, r, n, i, Class(“2015-11-23”, prof, r, n, i)

31/37

Page 90: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Query rewriting

The chase: reason about consequences of I under ΘOther option: reason about how to prove Q

Θ : ∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Q : ∃t r Book(“2015-11-23”, t, r)

Q2 : ∃prof, r, n, i, Class(“2015-11-23”, prof, r, n, i)

31/37

Page 91: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Query rewriting

The chase: reason about consequences of I under ΘOther option: reason about how to prove Q

Θ : ∀ date, prof, r, n, i, Class(date, prof, r, n, i) ⇒∃room, Book(date, room, prof)

Q : ∃t r Book(“2015-11-23”, t, r)

Q2 : ∃prof, r, n, i, Class(“2015-11-23”, prof, r, n, i)

31/37

Page 92: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Query rewriting and inclusion dependencies

To show that OWQA for inclusion dependencies is decidable...

∀x A′(x) ⇒ ∃y A′′(x,y)

Rewrite all atoms in the query in all possible ways→ Each atom rewritten by only one atom→ The query size does not increase

Replace Q by a union of conjunctive queries→ OWQA for IDs is decidable→ OWQA for IDs has tractable data complexity

32/37

Page 93: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Query rewriting and inclusion dependencies

To show that OWQA for inclusion dependencies is decidable...

∀x A′(x) ⇒ ∃y A′′(x,y)

Rewrite all atoms in the query in all possible ways→ Each atom rewritten by only one atom→ The query size does not increase

Replace Q by a union of conjunctive queries→ OWQA for IDs is decidable→ OWQA for IDs has tractable data complexity

32/37

Page 94: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Query rewriting and inclusion dependencies

To show that OWQA for inclusion dependencies is decidable...

∀x A′(x) ⇒ ∃y A′′(x,y)

Rewrite all atoms in the query in all possible ways→ Each atom rewritten by only one atom→ The query size does not increase

Replace Q by a union of conjunctive queries→ OWQA for IDs is decidable→ OWQA for IDs has tractable data complexity

32/37

Page 95: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Description logics

TGDs cannot express everything

∀x Q′(x) ⇒ ∃y Q′′(x,y)

Disjunction: if A then B or CNegation: you cannot have both A and B

→ Description logics: expressive rulessignature must have arity at most 2

33/37

Page 96: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Description logics

TGDs cannot express everything

∀x Q′(x) ⇒ ∃y Q′′(x,y)

Disjunction: if A then B or CNegation: you cannot have both A and B

→ Description logics: expressive rulessignature must have arity at most 2

33/37

Page 97: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Description logics

TGDs cannot express everything

∀x Q′(x) ⇒ ∃y Q′′(x,y)

Disjunction: if A then B or CNegation: you cannot have both A and B

→ Description logics: expressive rulessignature must have arity at most 2

33/37

Page 98: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Description logics (2)

Description logics have a specific syntaxTeacher ⊑ Prof ⊔ (∃Advisor−.Prof)

Description logics exist in many variantsIdea: precise complexity of OWQA depending on variant

Complexity

Languages UNA Combined complexity Data complexity

Satisfiability Instance checking Query answering

DL-Lite[ |H]core NLogSpace ≥ [A] in AC0 in AC0

DL-Lite[ |H]horn yes/no

P ≤ [Th.8.2] ≥ [A] in AC0 in AC0 ≤ [C]

DL-Lite[ |H]krom NLogSpace ≤ [Th.8.2] in AC0 coNP ≥ [B]

DL-Lite[ |H]bool NP ≤ [Th.8.2] ≥ [A] in AC0 ≤ [Th.8.3] coNP

DL-Lite[F|N|(HF)|(HN )]core NLogSpace in AC0 in AC0

DL-Lite[F|N|(HF)|(HN )]horn yes

P ≤ [Th.5.8, 5.13] in AC0 in AC0 ≤ [Th.7.1]

DL-Lite[F|N|(HF)|(HN )]krom NLogSpace ≤ [Th.5.7,5.13] in AC0 coNP

DL-Lite[F|N|(HF)|(HN )]bool NP ≤ [Th.5.6, 5.13] in AC0 ≤ [Cor.6.2] coNP

DL-Lite[F|(HF)]core/horn P ≤ [Cor.8.8] ≥ [Th.8.7] P ≥ [Th.8.7] P

DL-Lite[F|(HF)]krom P ≤ [Cor.8.8] P coNP

DL-Lite[F|(HF)]bool no NP P ≤ [Cor.8.8] coNP

DL-Lite[N|(HN )]core/horn NP ≥ [Th.8.4] coNP ≥ [Th.8.4] coNP

DL-Lite[N|(HN )]krom/bool NP ≤ [Th.8.5] coNP coNP

DL-LiteHFcore/horn ExpTime ≥ [Th.5.10] P ≥ [Th.6.7] P ≤ [D]

DL-LiteHFkrom/bool yes/noExpTime coNP ≥ [Th.6.5] coNP

DL-LiteHNcore/horn ExpTime coNP ≥ [Th.6.6] coNP

DL-LiteHNkrom/bool ExpTime ≤ [F] coNP coNP ≤ [E]

34/37

Page 99: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Description logics (2)

Description logics have a specific syntaxTeacher ⊑ Prof ⊔ (∃Advisor−.Prof)

Description logics exist in many variantsIdea: precise complexity of OWQA depending on variant

Complexity

Languages UNA Combined complexity Data complexity

Satisfiability Instance checking Query answering

DL-Lite[ |H]core NLogSpace ≥ [A] in AC0 in AC0

DL-Lite[ |H]horn yes/no

P ≤ [Th.8.2] ≥ [A] in AC0 in AC0 ≤ [C]

DL-Lite[ |H]krom NLogSpace ≤ [Th.8.2] in AC0 coNP ≥ [B]

DL-Lite[ |H]bool NP ≤ [Th.8.2] ≥ [A] in AC0 ≤ [Th.8.3] coNP

DL-Lite[F|N|(HF)|(HN )]core NLogSpace in AC0 in AC0

DL-Lite[F|N|(HF)|(HN )]horn yes

P ≤ [Th.5.8, 5.13] in AC0 in AC0 ≤ [Th.7.1]

DL-Lite[F|N|(HF)|(HN )]krom NLogSpace ≤ [Th.5.7,5.13] in AC0 coNP

DL-Lite[F|N|(HF)|(HN )]bool NP ≤ [Th.5.6, 5.13] in AC0 ≤ [Cor.6.2] coNP

DL-Lite[F|(HF)]core/horn P ≤ [Cor.8.8] ≥ [Th.8.7] P ≥ [Th.8.7] P

DL-Lite[F|(HF)]krom P ≤ [Cor.8.8] P coNP

DL-Lite[F|(HF)]bool no NP P ≤ [Cor.8.8] coNP

DL-Lite[N|(HN )]core/horn NP ≥ [Th.8.4] coNP ≥ [Th.8.4] coNP

DL-Lite[N|(HN )]krom/bool NP ≤ [Th.8.5] coNP coNP

DL-LiteHFcore/horn ExpTime ≥ [Th.5.10] P ≥ [Th.6.7] P ≤ [D]

DL-LiteHFkrom/bool yes/noExpTime coNP ≥ [Th.6.5] coNP

DL-LiteHNcore/horn ExpTime coNP ≥ [Th.6.6] coNP

DL-LiteHNkrom/bool ExpTime ≤ [F] coNP coNP ≤ [E]

34/37

Page 100: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Description logics (2)

Description logics have a specific syntaxTeacher ⊑ Prof ⊔ (∃Advisor−.Prof)

Description logics exist in many variantsIdea: precise complexity of OWQA depending on variant

Complexity

Languages UNA Combined complexity Data complexity

Satisfiability Instance checking Query answering

DL-Lite[ |H]core NLogSpace ≥ [A] in AC0 in AC0

DL-Lite[ |H]horn yes/no

P ≤ [Th.8.2] ≥ [A] in AC0 in AC0 ≤ [C]

DL-Lite[ |H]krom NLogSpace ≤ [Th.8.2] in AC0 coNP ≥ [B]

DL-Lite[ |H]bool NP ≤ [Th.8.2] ≥ [A] in AC0 ≤ [Th.8.3] coNP

DL-Lite[F|N|(HF)|(HN )]core NLogSpace in AC0 in AC0

DL-Lite[F|N|(HF)|(HN )]horn yes

P ≤ [Th.5.8, 5.13] in AC0 in AC0 ≤ [Th.7.1]

DL-Lite[F|N|(HF)|(HN )]krom NLogSpace ≤ [Th.5.7,5.13] in AC0 coNP

DL-Lite[F|N|(HF)|(HN )]bool NP ≤ [Th.5.6, 5.13] in AC0 ≤ [Cor.6.2] coNP

DL-Lite[F|(HF)]core/horn P ≤ [Cor.8.8] ≥ [Th.8.7] P ≥ [Th.8.7] P

DL-Lite[F|(HF)]krom P ≤ [Cor.8.8] P coNP

DL-Lite[F|(HF)]bool no NP P ≤ [Cor.8.8] coNP

DL-Lite[N|(HN )]core/horn NP ≥ [Th.8.4] coNP ≥ [Th.8.4] coNP

DL-Lite[N|(HN )]krom/bool NP ≤ [Th.8.5] coNP coNP

DL-LiteHFcore/horn ExpTime ≥ [Th.5.10] P ≥ [Th.6.7] P ≤ [D]

DL-LiteHFkrom/bool yes/noExpTime coNP ≥ [Th.6.5] coNP

DL-LiteHNcore/horn ExpTime coNP ≥ [Th.6.6] coNP

DL-LiteHNkrom/bool ExpTime ≤ [F] coNP coNP ≤ [E]

34/37

Page 101: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Equality-generating dependencies

Another important constraint for Θ: functional dependenciesThere can’t be two bookings for one room at the same timeThere can’t be two rooms for one session

Functional dependencies can be added to Θ for OWQADecidable for description logicsUndecidable with inclusion dependencies

35/37

Page 102: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Equality-generating dependencies

Another important constraint for Θ: functional dependenciesThere can’t be two bookings for one room at the same timeThere can’t be two rooms for one session

Functional dependencies can be added to Θ for OWQADecidable for description logicsUndecidable with inclusion dependencies

35/37

Page 103: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Finite models

Definition (Open-World Query Answering – OWQA)Given an instance I, Boolean CQ Q, and constraints Θ, decidewhether all

finite

W ⊇ I that satisfy Θ satisfy Q.

The world W is actually finiteShouldn’t we reflect this?

If the chase is infinite, it no longer worksImposing finiteness may make a difference

→ Very hard to reason about FOWQA!

36/37

Page 104: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Finite models

Definition (Open-World Query Answering – OWQA)Given an instance I, Boolean CQ Q, and constraints Θ, decidewhether all

finite

W ⊇ I that satisfy Θ satisfy Q.

The world W is actually finiteShouldn’t we reflect this?

If the chase is infinite, it no longer worksImposing finiteness may make a difference

→ Very hard to reason about FOWQA!

36/37

Page 105: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Finite models

Definition (Finite Open-World Query Answering – FOWQA)Given an instance I, Boolean CQ Q, and constraints Θ, decidewhether all finite W ⊇ I that satisfy Θ satisfy Q.

The world W is actually finiteShouldn’t we reflect this?

If the chase is infinite, it no longer worksImposing finiteness may make a difference

→ Very hard to reason about FOWQA!

36/37

Page 106: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Finite models

Definition (Finite Open-World Query Answering – FOWQA)Given an instance I, Boolean CQ Q, and constraints Θ, decidewhether all finite W ⊇ I that satisfy Θ satisfy Q.

The world W is actually finiteShouldn’t we reflect this?

If the chase is infinite, it no longer worksImposing finiteness may make a difference

→ Very hard to reason about FOWQA!

36/37

Page 107: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Partial completeness

We have assumed that I was incompleteSometimes, we know which relations are complete

e.g., the list of rooms may be completethe list of classes may be incomplete

→ Partially complete databases [Razniewski et al., 2015]

We may know other things:If I know the lecturer of a class, then I know all lecturersIf I know one session of a class, I know all sessions

→ Partial completeness assumption [Galárraga et al., 2013]

37/37

Page 108: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Partial completeness

We have assumed that I was incompleteSometimes, we know which relations are complete

e.g., the list of rooms may be completethe list of classes may be incomplete

→ Partially complete databases [Razniewski et al., 2015]

We may know other things:If I know the lecturer of a class, then I know all lecturersIf I know one session of a class, I know all sessions

→ Partial completeness assumption [Galárraga et al., 2013]

37/37

Page 109: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Partial completeness

We have assumed that I was incompleteSometimes, we know which relations are complete

e.g., the list of rooms may be completethe list of classes may be incomplete

→ Partially complete databases [Razniewski et al., 2015]

We may know other things:If I know the lecturer of a class, then I know all lecturersIf I know one session of a class, I know all sessions

→ Partial completeness assumption [Galárraga et al., 2013]

37/37

Page 110: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Basics Contexts Languages Chase Advanced topics

Partial completeness

We have assumed that I was incompleteSometimes, we know which relations are complete

e.g., the list of rooms may be completethe list of classes may be incomplete

→ Partially complete databases [Razniewski et al., 2015]

We may know other things:If I know the lecturer of a class, then I know all lecturersIf I know one session of a class, I know all sessions

→ Partial completeness assumption [Galárraga et al., 2013]

37/37

Page 111: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

Slide credits

Slide 34: http://www.slideshare.net/MartnRezk/slides-swat4-ls,slide 17, licence CC-BY-SA 3.01

Slides 16 and 36: Jaques Rouxel, Les Shadoks (reproduit envertu du droit de citation)Slide 34: [Artale et al., 2009], p 18

1http://creativecommons.org/licenses/by-sa/3.0/1/7

Page 112: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

References I

Abiteboul, S., Hull, R., and Vianu, V. (1995).Foundations of Databases.http://webdam.inria.fr/Alice/pdfs/all.pdf.Artale, A., Calvanese, D., Kontchakov, R., and Zakharyaschev,M. (2009).The DL-Lite family and relations.Journal of artificial intelligence research.https://www.jair.org/media/2820/live-2820-4662-jair.pdf.

2/7

Page 113: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

References II

Beeri, C. and Vardi, M. Y. (1981).The implication problem for data dependencies.In Automata, Languages and Programming.http://www.researchgate.net/publication/226509257_The_implication_problem_for_data_dependencies.Calì, A., Gottlob, G., and Pieris, A. (2012).Towards more expressive ontology languages: The queryanswering problem.Artif. Intel., 193.http://www.sciencedirect.com/science/article/pii/S0004370212001026.

3/7

Page 114: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

References III

Calì, A., Lembo, D., and Rosati, R. (2003).On the decidability and complexity of query answering overinconsistent and incomplete databases.In Proc. PODS.http://www.dis.uniroma1.it/~rosati/publications/Cali-Lembo-Rosati-PODS-03.pdf.Chandra, A. K., Lewis, H. R., and Makowsky, J. A. (1981).Embedded implicational dependencies and their inferenceproblem.In Proc. STOC. ACM.Unavailable online.

4/7

Page 115: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

References IV

Galárraga, L. A., Teflioudi, C., Hose, K., and Suchanek, F.(2013).AMIE: association rule mining under incomplete evidence inontological knowledge bases.In Proc. WWW.http://luisgalarraga.de/docs/amie.pdf.Johnson, D. S. and Klug, A. C. (1984).Testing containment of conjunctive queries under functionaland inclusion dependencies.JCSS.https://cs.uwaterloo.ca/~david/kbdb/johnstonandklug.pdf.

5/7

Page 116: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

References V

Onet, A. (2013).The chase procedure and its applications in data exchange.In Data Exchange, Integration, and Streams, pages 1–37.Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik.http://drops.dagstuhl.de/opus/volltexte/2013/4288/pdf/ch01-onet.pdf.Razniewski, S., Korn, F., Nutt, W., and Srivastava, D. (2015).Identifying the extent of completeness of query answers overpartially complete databases.In Proc. SIGMOD.https://srazniewski.files.wordpress.com/2015/05/2015_sigmod.pdf.

6/7

Page 117: Uncertain Data Management Open-World Query Answering · 2016-02-23 · Basics Contexts Languages Chase Advanced topics Uncertain Data Management Open-World Query Answering Antoine

References VI

Rosati, R. (2006).On the decidability and finite controllability of queryprocessing in databases with incomplete information.In PODS.http://www.sciencedirect.com/science/article/pii/S002200001000053X.

7/7