A Survey of Deductive Databases Raghu Ramakrishnan and Jeffrey D. - - PowerPoint PPT Presentation

a survey of deductive databases
SMART_READER_LITE
LIVE PREVIEW

A Survey of Deductive Databases Raghu Ramakrishnan and Jeffrey D. - - PowerPoint PPT Presentation

A Survey of Deductive Databases Raghu Ramakrishnan and Jeffrey D. Ullman CS 848, Fall 2016 University of Waterloo Presented by: Siddhartha Sahu Overview Relational Databases Deductive Databases Datalog Example Queries


slide-1
SLIDE 1

A Survey of Deductive Databases

Raghu Ramakrishnan and Jeffrey D. Ullman

CS 848, Fall 2016 University of Waterloo Presented by: Siddhartha Sahu

slide-2
SLIDE 2

Overview

  • Relational Databases
  • Deductive Databases
  • Datalog
  • Example Queries
  • Query Execution
  • Conclusion and Discussion
slide-3
SLIDE 3

Relational Databases

slide-4
SLIDE 4

Relational Databases

Predominant model for data storage and processing

slide-5
SLIDE 5

Relational Databases

Predominant model for data storage and processing Declarative language: focus on what rather than how

slide-6
SLIDE 6

Relational Databases

a c b d e f

slide-7
SLIDE 7

Relational Databases

edges id_from id_to a b b d b e d c f e

INSERT INTO edges (...)

a c b d e f

slide-8
SLIDE 8

Relational Databases

edges id_from id_to a b b d b e d c f e

Q: List vertices that vertex ‘b’ have an outgoing edge to.

INSERT INTO edges (...)

a c b d e f

slide-9
SLIDE 9

Relational Databases

edges id_from id_to a b b d b e d c f e

Q: List vertices that vertex ‘b’ have an outgoing edge to. A: SELECT id_to from edges WHERE id_from = ‘b’

INSERT INTO edges (...)

a c b d e f

slide-10
SLIDE 10

Relational Databases

Q: List all vertex pairs (x,y), such that y is reachable from x. A: ?

edges id_from id_to a b b d b e d c f e

INSERT INTO edges (...)

a c b d e f

slide-11
SLIDE 11

Deductive Databases

slide-12
SLIDE 12

Deductive Databases

Relational Algebra Logic Programs

Support a superset of relational algebra.

  • Supports all queries from relational algebra.
  • Supports recursions.
slide-13
SLIDE 13

Deductive Databases

Relational Algebra

Support a superset of relational algebra.

  • Supports all queries from relational algebra.
  • Supports recursions.

Datalog: subset of Prolog, a logic programming language

  • Database centric requirements
  • Emphasis on completeness and termination
  • Queries on data stored on secondary storage

Logic Programs

slide-14
SLIDE 14

Deductive Databases

Relational Algebra Logic Programs

Support a superset of relational algebra.

  • Supports all queries from relational algebra.
  • Supports recursions.

Datalog: subset of Prolog, a logic programming language

  • Database centric requirements
  • Emphasis on completeness and termination
  • Queries on data stored on secondary storage

A database of facts. A set of rules for deriving new facts from existing facts.

slide-15
SLIDE 15

Datalog: Terminology

Datalog

slide-16
SLIDE 16

Datalog: Terminology

Datalog

edge(a,b).

Facts

slide-17
SLIDE 17

Datalog: Terminology

Datalog

edge(a,b).

Facts Rules

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

slide-18
SLIDE 18

Datalog: Terminology

Datalog

edge(a,b).

Facts Rules

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

Implication/Clause: A0 :- A1, A2, ..., Ak where A0 is true if A1 and A2 … and Ak are true. k = 0: fact; k > 0: rule

slide-19
SLIDE 19

Datalog: Terminology

Datalog

edge(a,b).

Facts Rules constant symbol

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

logical variable head body terms predicate predicate

Implication/Clause: A0 :- A1, A2, ..., Ak where A0 is true if A1 and A2 … and Ak are true. k = 0: fact; k > 0: rule

slide-20
SLIDE 20

Datalog: Terminology

Datalog

edge(a,b).

Facts Rules constant symbol

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

logical variable head body terms predicate predicate

EDB IDB

Implication/Clause: A0 :- A1, A2, ..., Ak where A0 is true if A1 and A2 … and Ak are true. k = 0: fact; k > 0: rule

slide-21
SLIDE 21

Datalog: Examples

users uid name age accounts uid account_type amount

slide-22
SLIDE 22

Datalog: Examples

users uid name age accounts uid account_type amount

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-23
SLIDE 23

Datalog: Examples

users uid name age accounts uid account_type amount Selection Q: List all users with age > 23.

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-24
SLIDE 24

Datalog: Examples

users uid name age accounts uid account_type amount Selection Q: List all users with age > 23.

Relational Algebra: σage > 23(users) SQL: SELECT * FROM users WHERE age > 23;

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-25
SLIDE 25

Datalog: Examples

users uid name age accounts uid account_type amount Selection Q: List all users with age > 23.

Relational Algebra: σage > 23(users) SQL: SELECT * FROM users WHERE age > 23; Datalog: S(Uid, Name, Age) :- users(Uid, Name, Age), Age > 23.

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-26
SLIDE 26

Datalog: Examples

users uid name age accounts uid account_type amount Projection Q: List name of users with age > 23.

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-27
SLIDE 27

Datalog: Examples

users uid name age accounts uid account_type amount Projection Q: List name of users with age > 23.

Relational Algebra: πname(σage > 23(users)) SQL: SELECT name FROM users WHERE age > 23;

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-28
SLIDE 28

Datalog: Examples

users uid name age accounts uid account_type amount Projection Q: List name of users with age > 23.

Relational Algebra: πname(σage > 23(users)) SQL: SELECT name FROM users WHERE age > 23; Datalog: P(Name) :- users(Uid, Name, Age), Age > 23.

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-29
SLIDE 29

Datalog: Examples

users uid name age accounts uid account_type amount Join Q: List name, amount of users with age > 23.

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-30
SLIDE 30

Datalog: Examples

users uid name age accounts uid account_type amount Join Q: List name, amount of users with age > 23.

Relational Algebra: πname,amount(σage > 23(users ⨝uid accounts)) SQL:

SELECT name,amount FROM users,accounts WHERE users.uid = accounts.uid AND age > 23;

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-31
SLIDE 31

Datalog: Examples

users uid name age accounts uid account_type amount Join Q: List name, amount of users with age > 23.

Relational Algebra: πname,amount(σage > 23(users ⨝uid accounts)) SQL:

SELECT name,amount FROM users,accounts WHERE users.uid = accounts.uid AND age > 23;

Datalog:

J(Name,Amount) :- users(Uid, Name, Age), accounts(Uid, Account_type, Amount), Age > 23.

users(42, ‘Jane Doe’, 26). accounts(42, ‘savings’, 5692.23)

slide-32
SLIDE 32

Datalog: Examples

a c b d e f

slide-33
SLIDE 33

Datalog: Examples

edge(a,b). edge(b,d). edge(b,e). edge(d,c). edge(f,e).

Datalog

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

a c b d e f

slide-34
SLIDE 34

Datalog: Examples

edge(a,b). edge(b,d). edge(b,e). edge(d,c). edge(f,e).

Datalog

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

Q: List vertices that vertex ‘b’ have an outgoing edge to.

a c b d e f

slide-35
SLIDE 35

Datalog: Examples

edge(a,b). edge(b,d). edge(b,e). edge(d,c). edge(f,e).

Datalog

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

Q: List vertices that vertex ‘b’ have an outgoing edge to. A: query(X) :- edge(b,X).

a c b d e f

slide-36
SLIDE 36

Datalog: Examples

Datalog

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

Q: List all vertex pairs (x,y), such that y is reachable from x.

a c b d e f

edge(a,b). edge(b,d). edge(b,e). edge(d,c). edge(f,e).

slide-37
SLIDE 37

Datalog: Examples

Datalog

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

Q: List all vertex pairs (x,y), such that y is reachable from x. A: query(X,Y) :- connected(X,Y).

a c b d e f

edge(a,b). edge(b,d). edge(b,e). edge(d,c). edge(f,e).

slide-38
SLIDE 38

Query Evaluation: Naïve algorithm

slide-39
SLIDE 39

Query Evaluation: Naïve algorithm

http://www.cs.toronto.edu/~drosu/csc343-l7-handout6.pdf, http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/csep544_14wi_8/slide775.jpg

slide-40
SLIDE 40

Query Evaluation: Naïve algorithm

  • 1. Begin by assuming all IDB relations

are empty.

http://www.cs.toronto.edu/~drosu/csc343-l7-handout6.pdf, http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/csep544_14wi_8/slide775.jpg

slide-41
SLIDE 41

Query Evaluation: Naïve algorithm

  • 1. Begin by assuming all IDB relations

are empty.

  • 2. Repeatedly evaluate the rules using

the EDB and the previous IDB to get a new IDB.

http://www.cs.toronto.edu/~drosu/csc343-l7-handout6.pdf, http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/csep544_14wi_8/slide775.jpg

slide-42
SLIDE 42

Query Evaluation: Naïve algorithm

  • 1. Begin by assuming all IDB relations

are empty.

  • 2. Repeatedly evaluate the rules using

the EDB and the previous IDB to get a new IDB.

  • 3. End when there is no change to the

IDB.

http://www.cs.toronto.edu/~drosu/csc343-l7-handout6.pdf, http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/csep544_14wi_8/slide775.jpg

slide-43
SLIDE 43

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

slide-44
SLIDE 44

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

edges a b b d d c b e f e

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-45
SLIDE 45

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

edges a b b d d c b e f e

I = 0

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-46
SLIDE 46

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-47
SLIDE 47

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-48
SLIDE 48

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-49
SLIDE 49

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-50
SLIDE 50

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e a d a e a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-51
SLIDE 51

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e b c a d a e a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-52
SLIDE 52

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e b c a d a e a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2 I = 3

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

slide-53
SLIDE 53

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2 I = 3

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

b c a d a e a b b d d c b e f e b c a d a e a b b d d c b e f e

slide-54
SLIDE 54

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2 I = 3

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

b c a d a e a b b d d c b e f e a c b c a d a e a b b d d c b e f e

slide-55
SLIDE 55

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2 I = 3

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

b c a d a e a b b d d c b e f e a c b c a d a e a b b d d c b e f e

slide-56
SLIDE 56

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2 I = 3

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

b c a d a e a b b d d c b e f e a c b c a d a e a b b d d c b e f e

I = 4

slide-57
SLIDE 57

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2 I = 3

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

b c a d a e a b b d d c b e f e a c b c a d a e a b b d d c b e f e

I = 4

a c b c a d a e a b b d d c b e f e

slide-58
SLIDE 58

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2 I = 3

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

b c a d a e a b b d d c b e f e a c b c a d a e a b b d d c b e f e

I = 4

a c b c a d a e a b b d d c b e f e

slide-59
SLIDE 59

Query Evaluation: Naïve algorithm

a c b d e f

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

connected(X,Y).

a b b d d c b e f e edges a b b d d c b e f e

I = 0 I = 1 I = 2 I = 3

http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/video.html?id=csep544_14wi_8

b c a d a e a b b d d c b e f e a c b c a d a e a b b d d c b e f e

I = 4

a c b c a d a e a b b d d c b e f e

slide-60
SLIDE 60

Query Evaluation: Semi-Naïve algorithm

* Avoid repeating computations already done in previous iterations. * Focus on only the newly derived tuples (deltas) from previous iterations.

http://blogs.evergreen.edu/sosw/files/2014/04/Green-Vol5-DBS-017.pdf, http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/csep544_14wi_8/slide775.jpg

slide-61
SLIDE 61

Query Evaluation: Semi-Naïve algorithm

* Avoid repeating computations already done in previous iterations. * Focus on only the newly derived tuples (deltas) from previous iterations.

http://blogs.evergreen.edu/sosw/files/2014/04/Green-Vol5-DBS-017.pdf, http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/csep544_14wi_8/slide775.jpg

slide-62
SLIDE 62

Query Evaluation: Semi-Naïve algorithm

* Avoid repeating computations already done in previous iterations. * Focus on only the newly derived tuples (deltas) from previous iterations.

http://blogs.evergreen.edu/sosw/files/2014/04/Green-Vol5-DBS-017.pdf, http://courses.cs.washington.edu/courses/csep544/14wi/video/archive/html5/csep544_14wi_8/slide775.jpg

slide-63
SLIDE 63

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

edges a b b d d c b e f e

PI = 0

slide-64
SLIDE 64

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

edges a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

slide-65
SLIDE 65

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

edges a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

a b b d d c b e f e

PI = 1

slide-66
SLIDE 66

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

a d a e b c edges a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

a b b d d c b e f e

PI = 1 ∆I = 1

slide-67
SLIDE 67

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

a d a e b c edges a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

a b b d d c b e f e

PI = 1

a d a e b c

∆I = 1 δI = 1

slide-68
SLIDE 68

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

a d a e b c edges a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

a b b d d c b e f e

PI = 1

a d a e b c

∆I = 1

a d a e b c a b b d d c b e f e

δI = 1 PI = 2

slide-69
SLIDE 69

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

a d a e b c edges a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

a b b d d c b e f e

PI = 1

a d a e b c

∆I = 1

a d a e b c a b b d d c b e f e

δI = 1 PI = 2

a c

∆I = 2

slide-70
SLIDE 70

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

a d a e b c edges a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

a b b d d c b e f e

PI = 1

a d a e b c

∆I = 1

a d a e b c a b b d d c b e f e

δI = 1 PI = 2

a c a c

∆I = 2 δI = 2

slide-71
SLIDE 71

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

a d a e b c edges a b b d d c b e f e a c a d a e b c a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

a b b d d c b e f e

PI = 1

a d a e b c

∆I = 1

a d a e b c a b b d d c b e f e

δI = 1 PI = 2

a c a c

∆I = 2 δI = 2

slide-72
SLIDE 72

Query Evaluation: Semi-Naïve algorithm

connected(X,Y) :- edge(X,Y). connected(X,Y) :- edge(X,Z), connected(Z,Y).

a d a e b c edges a b b d d c b e f e a c a d a e b c a b b d d c b e f e

PI = 0

a b b d d c b e f e

δI = 0

a b b d d c b e f e

PI = 1

a d a e b c

∆I = 1

a d a e b c a b b d d c b e f e

δI = 1 PI = 2

a c a c

∆I = 2 δI = 2

δI = 3

∆I = 3

slide-73
SLIDE 73

Deductive Databases: Additional concepts

slide-74
SLIDE 74

Deductive Databases: Additional concepts

Negation predicates

slide-75
SLIDE 75

Deductive Databases: Additional concepts

Negation predicates Safe rules

slide-76
SLIDE 76

Deductive Databases: Additional concepts

Negation predicates Safe rules Query optimization Magic Sets Rule-Rewriting Techniques Iterative Fixpoint Evaluation

slide-77
SLIDE 77

Deductive Databases: Additional concepts

Negation predicates Safe rules Query optimization Magic Sets Rule-Rewriting Techniques Iterative Fixpoint Evaluation Aggregations

slide-78
SLIDE 78

Conclusion

slide-79
SLIDE 79

Conclusion

Deductive databases are more expressive than relational databases. Support for recursive queries

slide-80
SLIDE 80

Conclusion

Deductive databases are more expressive than relational databases. Support for recursive queries Datalog: query language adapted from Prolog

slide-81
SLIDE 81

Conclusion

Deductive databases are more expressive than relational databases. Support for recursive queries Datalog: query language adapted from Prolog Focus on query optimization

slide-82
SLIDE 82

Conclusion

Deductive databases are more expressive than relational databases. Support for recursive queries Datalog: query language adapted from Prolog Focus on query optimization Naive vs Semi Naive query execution algorithms Avoid repeated computations

slide-83
SLIDE 83

SQL has recursion techniques like CTE How does that compare to Datalog in terms of expressiveness? Application domains best suited for Datalog? Program analysis (recursion) Declarative networking (NDlog) Security (SeNDlog) Applicability to general processing frameworks? Hive Spark SQL

Discussion