Skip to Main Content
Foundations of Deductive Databases and Logic Programming
book

Foundations of Deductive Databases and Logic Programming

by Jack Minker
May 2014
Intermediate to advanced content levelIntermediate to advanced
752 pages
35h 3m
English
Morgan Kaufmann
Content preview from Foundations of Deductive Databases and Logic Programming
482
Bancilhon
and
Ramakrishnan
Generalized Magic Sets It
performs exactly like
the
Magic Sets strategy.
Query
Form
Ancestor
Jb
Rl a(X,Y):-p(X,Y).
R2 a(X,Y):-p(X,Z),a(Z,Y).
R3 query(X)
:-
a(X,john).
Naive Evaluation As
before,
the
Naive strategy computes
the
transitive
closure
of the
entire relation
p.
Therefore
the
cost
of the
first phase remains
un-
changed. However,
the
cost
of
firing
R3
changes since
the
size
of the
answer
set
is
different.
By
binding
the
second argument,
we are
effectively looking
at
the transpose
of the
data graph,
and so, by the
properties
of the
transpose,
the
size
of the
answer
set is now:
(l/E)gsum(l/E,h
,
- 1)
The tota ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Concepts and Semantics of Programming Languages 1

Concepts and Semantics of Programming Languages 1

Therese Hardin, Mathieu Jaume, Francois Pessaux, Veronique Viguie Donzeau-Gouge
Handbook of Constraint Programming

Handbook of Constraint Programming

Francesca Rossi, Peter van Beek, Toby Walsh

Publisher Resources

ISBN: 9781483221120