Gottlob ICDE 2011

108
Georg Gottlob Computing Laboratory Department of Computer Science University of Oxford Joint work with G. Orsi and A. Pieris

description

 

Transcript of Gottlob ICDE 2011

Page 1: Gottlob ICDE 2011

Georg Gottlob

Computing Laboratory

Department of Computer Science

University of Oxford

Joint work with

G. Orsi and A. Pieris

Page 2: Gottlob ICDE 2011
Page 3: Gottlob ICDE 2011
Page 4: Gottlob ICDE 2011
Page 5: Gottlob ICDE 2011
Page 6: Gottlob ICDE 2011
Page 8: Gottlob ICDE 2011

D

reports(john,ann)

reports(ann,tom)

reports(X,Y) employee(X)

reports(X,Y) employee(Y)

reports(X,Y) manager(Y,X)

manager(X,Y),manager(Y,Z) manager(X,Z)

Intensional DB

reports(john,ann) reports(ann,tom)

employee(john) employee(ann)

employee(tom) manager(ann,john)

manager(tom,ann) manager(tom,john)

Q = XYZ employee(X),manager(X,Y),manager(Y,Z)

Page 9: Gottlob ICDE 2011

D

reports(john,ann)

reports(ann,tom)

Intensional DB

reports(john,ann) reports(ann,tom)

employee(john) employee(ann)

employee(tom) manager(ann,john)

manager(tom,ann) manager(tom,john)

Unique

Least Herbrand Model

for

D υ

Q = XYZ employee(X),manager(X,Y),manager(Y,Z)

reports(X,Y) employee(X)

reports(X,Y) employee(Y)

reports(X,Y) manager(Y,X)

manager(X,Y),manager(Y,Z) manager(X,Z)

Page 10: Gottlob ICDE 2011

employee v supervisedBy

supervisedBy v employee

employee supervisedBy

Page 11: Gottlob ICDE 2011
Page 12: Gottlob ICDE 2011

employee v supervises-

supervises v employee

Page 13: Gottlob ICDE 2011

employee v supervises-

supervises v employee

Page 14: Gottlob ICDE 2011

?:- supervises(X,John), employee(X)

employee v supervises-

supervises v employee

Page 15: Gottlob ICDE 2011

?:- supervises(X,John), employee(X)

employee v supervises-

supervises v employee

Page 16: Gottlob ICDE 2011

?:- supervises(John,X)

employee v supervises-

supervises v employee

Page 17: Gottlob ICDE 2011

?:- supervises(John,X)

Usually done with tableaux algorithms

employee v supervises-

supervises v employee

Page 19: Gottlob ICDE 2011
Page 20: Gottlob ICDE 2011
Page 21: Gottlob ICDE 2011
Page 22: Gottlob ICDE 2011

DL axiom Datalog rule

Concept Inclusion

employee v person employee(X) person(X)

(Inverse) Role Inclusion

reports¡ v manager reports(X,Y) manager(Y,X)

Role Transitivity

trans(manager) manager(X,Y),manager(Y,Z) manager(X,Z)

Page 23: Gottlob ICDE 2011

Participation

employee v report employee(X) Y report(X,Y)

Disjointness

employee v :customer employee(X),customer(X)

Functionality

funct(reports) reports(X,Y),reports(X,Z) Y = Z

DL axiom Datalog(?) rule

Page 24: Gottlob ICDE 2011
Page 25: Gottlob ICDE 2011
Page 26: Gottlob ICDE 2011
Page 27: Gottlob ICDE 2011
Page 28: Gottlob ICDE 2011

D

Page 29: Gottlob ICDE 2011

Q = X (X)

D

B ( (B D [ ) B ² Q) D [ ² Q ,

B ¶ D Æ B ²

Page 30: Gottlob ICDE 2011

Q = X (X)

D

B ( (B ² D[) B ² Q) D [ ² Q ,

B ¶ D Æ B ²

Page 31: Gottlob ICDE 2011

DLs (DL-Lite, EL, Flogic Lite)

Datalog

DB

technology

+

constraints

Page 32: Gottlob ICDE 2011
Page 33: Gottlob ICDE 2011

υ

Page 34: Gottlob ICDE 2011

υ

Page 35: Gottlob ICDE 2011

dom(D) = {a,b,c,d}

chase(D, ) = ?

D

Page 36: Gottlob ICDE 2011

D dom(D) = {a,b,c,d}

chase(D, ) = D υ { r(b,z0)

Page 37: Gottlob ICDE 2011

D dom(D) = {a,b,c,d}

chase(D, ) = D υ { r(b,z0), r(d,z1)

Page 38: Gottlob ICDE 2011

D dom(D) = {a,b,c,d}

chase(D, ) = D υ { r(b,z0), r(d,z1)

z0 = z1

Page 39: Gottlob ICDE 2011

D dom(D) = {a,b,c,d}

chase(D, ) = D υ { r(b,z1), r(d,z1) }

Page 40: Gottlob ICDE 2011

see, e.g.,

Deutsch, Nash & Remmel

PODS 08

D

. . .

chase(D,)

M1

M2

h1 h2

Page 41: Gottlob ICDE 2011

D

. . .

chase(D,)

M1

M2

h1 h2

Q h

D υ ² Q , chase(D,) ² Q

Page 42: Gottlob ICDE 2011

Σ Σ Σ ΣΣ

Page 43: Gottlob ICDE 2011
Page 44: Gottlob ICDE 2011

Guarded

Linear

DL-Lite Sticky-join

EL

Page 45: Gottlob ICDE 2011
Page 46: Gottlob ICDE 2011

FO-rewritable

PTIME

Guarded

Linear

DL-Lite Sticky-join

EL

Page 47: Gottlob ICDE 2011

Linear

FO-rewritable

PTIME

Guarded

Linear

DL-Lite Sticky-join

EL

We focus on the linear fragment:

• first-order rewriting

• semantic query optimizations

Page 48: Gottlob ICDE 2011
Page 49: Gottlob ICDE 2011

Q

Q

Page 50: Gottlob ICDE 2011

Q

Q Q*

Page 51: Gottlob ICDE 2011

D

Q

Q Q*

Page 52: Gottlob ICDE 2011

DL-Lite: Popular family of DLs with highly tractable data complexity

DL-Lite TBox Datalog Representation

DL-Litecore

promoter v dealsWith

promoter v customer

DL-LiteR

promotes¡ v isAdvertised

DL-LiteF

funct( supervises- )

professor(X) Y teachesTo(X,Y)

professor(X),student(X)

promotes(X,Y) isAdvertised(Y,X)

supervises(Y,X),supervises Y,X Y = Z

Page 53: Gottlob ICDE 2011

D Q

Page 54: Gottlob ICDE 2011

D Q

Page 55: Gottlob ICDE 2011

Q

Page 56: Gottlob ICDE 2011

Q

Q

Page 57: Gottlob ICDE 2011

Q

Q

Page 58: Gottlob ICDE 2011

Q

Q

Page 59: Gottlob ICDE 2011

Q

Q

Page 60: Gottlob ICDE 2011

Q

Q

Page 61: Gottlob ICDE 2011

Q

Q

Page 62: Gottlob ICDE 2011

SELECT promoter

FROM promotesTo PT, customer C

WHERE PT.promoted = C.name

UNION

SELECT promoter

FROM promotesTo PT1, promotesTo PT2

WHERE PT1.promoted = PT2.promoted

UNION

SELECT name

FROM promoter

Schema

Page 63: Gottlob ICDE 2011

Execute Q over D:

D

SELECT promoter

FROM promotesTo PT, customer C

WHERE PT.promoted = C.name

UNION

SELECT promoter

FROM promotesTo PT1, promotesTo PT2

WHERE PT1.promoted = PT2.promoted

UNION

SELECT name

FROM promoter

Schema

Page 64: Gottlob ICDE 2011

:

Page 65: Gottlob ICDE 2011
Page 66: Gottlob ICDE 2011
Page 67: Gottlob ICDE 2011

:

Page 68: Gottlob ICDE 2011

:

Page 69: Gottlob ICDE 2011

:

Page 70: Gottlob ICDE 2011

:

Page 71: Gottlob ICDE 2011

:

Page 72: Gottlob ICDE 2011

:

Q:

Page 73: Gottlob ICDE 2011
Page 74: Gottlob ICDE 2011

:

Page 75: Gottlob ICDE 2011

:

Page 76: Gottlob ICDE 2011
Page 77: Gottlob ICDE 2011
Page 78: Gottlob ICDE 2011
Page 79: Gottlob ICDE 2011
Page 80: Gottlob ICDE 2011
Page 81: Gottlob ICDE 2011
Page 82: Gottlob ICDE 2011
Page 83: Gottlob ICDE 2011
Page 84: Gottlob ICDE 2011
Page 85: Gottlob ICDE 2011

8-

Page 86: Gottlob ICDE 2011

EL: Popular DL for complex systems modelling (e.g., biology)

EL TBox Datalog Representation

v

u v

Page 87: Gottlob ICDE 2011
Page 88: Gottlob ICDE 2011
Page 89: Gottlob ICDE 2011
Page 90: Gottlob ICDE 2011
Page 91: Gottlob ICDE 2011
Page 92: Gottlob ICDE 2011
Page 93: Gottlob ICDE 2011
Page 94: Gottlob ICDE 2011

9

Page 95: Gottlob ICDE 2011

elephant(E),mouse(M) biggerThan(E,M)

Page 96: Gottlob ICDE 2011
Page 97: Gottlob ICDE 2011

person v 9father¡

9father v person

?:- 9father.{John} u person

Page 98: Gottlob ICDE 2011

person v 9father¡

9father v person

?:- 9father.{John} u person

?:- 9father¡ u 9father.{John} u person

Page 99: Gottlob ICDE 2011

person v 9father¡

9father v person

?:- 9father.{John} u person

?:- 9father¡ u 9father.{John} u person

9father¡, 9father.{John}, person

Page 100: Gottlob ICDE 2011

person v 9father¡

9father v person

?:- 9father.{John} u person

?:- 9father¡ u 9father.{John} u person

9father¡, 9father.{John}, person

father

Page 101: Gottlob ICDE 2011

person v 9father¡

9father v person

?:- 9father.{John} u person

?:- 9father¡ u 9father.{John} u person

9father¡, 9father.{John}, person

father

father

Page 102: Gottlob ICDE 2011

person v 9father¡

9father v person

?:- 9father.{John} u person

true:- 9father¡ u 9father.{John} u person

9father¡, 9father.{John}, person

father

father

Model

Page 103: Gottlob ICDE 2011
Page 104: Gottlob ICDE 2011
Page 105: Gottlob ICDE 2011
Page 106: Gottlob ICDE 2011

T

E

T , E

Page 107: Gottlob ICDE 2011

T

E

T , E

Page 108: Gottlob ICDE 2011

T

E

T , E