## What you always wanted to know about Datalog (and never dared to ask (1989)

Venue: | IEEE Transactions Knowledge and Data Engineering |

Citations: | 137 - 1 self |

### BibTeX

@ARTICLE{Ceri89whatyou,

author = {Stefan Ceri and Georg Gottlob and Letizia Tanca},

title = {What you always wanted to know about Datalog (and never dared to ask},

journal = {IEEE Transactions Knowledge and Data Engineering},

year = {1989},

pages = {146--166}

}

### Years of Citing Articles

### OpenURL

### Abstract

Abstract-Datalog is a database query language based on the logic programming paradigm; it has been designed and intensively studied over the last five years. We present the syntax and semantics of Datalog and its use for querying a relational database. Then, we classify optimization methods for achieving efficient evaluations of Datalog queries, and present the most relevant methods. Finally, we discuss various exhancements of Datalog, currently under study, and indicate what is still needed in order to extend Datalog’s applicability to the solution of real-life problems. The aim of this paper is to provide a survey of research performed on Datalog, also addressed to those members of the database community who are not too familiar with logic programming concepts. Zndex Terms-Deductive databases, logic programming, recursive queries, relational databases, query optimization. I.

### Citations

451 | Model Theory - Chang, Keisler - 1990 |

385 |
Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme.” Monatshefte für Mathematik und Physik
- Gödel
- 1931
(Show Context)
Citation Context ...unded by Hilbert [60]. While the investigation of relevant extensions of first-order logic (e.g., number theory) is faced with considerable problems such as consistency and incompleteness issues [SI, =-=[57]-=-, the proof theoretic analysis of subformalisms of first-order logic, such as Logic Programming or Datalog, is easier and much less ambitious, and is more oriented towards algorithmic issues. In this ... |

381 | Bilattices and the semantics of logic programming
- Fitting
- 1991
(Show Context)
Citation Context ...plications. The semantics of a logic program with negation can then be defined as a minimal model of its completion. This approach was discussed by Sheperdson [ 1 lo], [ 11 11 and Lloyd [78]. Fitting =-=[49]-=- and Kunen [74] refined this approach by using three-valued logic: in their setting, a fact can be true, false, or undefined. In the context of Datalog these approaches are not completely satisfactory... |

306 |
Logic Programming and Databases
- Ceri, Gottlob, et al.
- 1990
(Show Context)
Citation Context ... knowledge base systems. The purpose of this paper is to give a self-contained survey of the research that has been performed recently on Datalog. More exhaustive treatments can be found in the books =-=[34]-=-, [ 1221, and [92]. Other interesting survey papers, approaching the subject from different perspectives, are [53] and [loo]. This paper is organized as follows. In Section I1 we present the foundatio... |

244 | On the power of magic
- Beeri, Ramakrishnan
- 1987
(Show Context)
Citation Context ... some of the values that were instead allowed for variables of the original rules. In most cases, this makes the new program more efficient. Details about this algorithm can be found in [ 141, [ 171, =-=[22]-=-, [34]. We show here a significant example, and make some comments on the rewritten program. Consider again the program PI with the goal ?-sgc(ann, X). After the magic sets transformation, the program... |

224 | Automated Theorem Proving: A Logical Basis - Loveland - 1978 |

110 |
Remark on the algebra of non first normal form relation
- Jaeschke, Schek
- 1982
(Show Context)
Citation Context ...xtensions of the relational model have been developed in the last years in order to allow the storage and manipulation of complex objects. The most famous ones are the NF2 model by Jaeschke and Schek =-=[66]-=-, the model of nested relations by Fisher and Thomas [48], the model of Abiteboul and Been [l], [2] (which is more general than the former two models), the “FrancoArmenian Data model” FAD by Bancilhon... |

74 |
Why not negation by fixpoint
- Kolaitis, Papadimitriou
- 1988
(Show Context)
Citation Context ...ment of stratification, is proposed in [95]. D. InJationary Evaluation and Expressive Power of Datalog ’ Programs Another evaluation paradigm for Datalog ’ programs has been proposed recently in [4], =-=[72]-=-. This method, called injationary evaluation, has the advantage of applying to all Datalog’ programs and not just stratified Datalog ’ programs. Let P be a Datalog’ program and E an EDB. The inflation... |

74 | Logic programming with sets
- Kuper
- 1987
(Show Context)
Citation Context ...pproaches for incorporating the concept of a complex structured object into the162 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. I, NO. I, MARCH 1989 formalism of Datalog [ 1331, [ 1191, =-=[75]-=-. One of the most well-known approaches has been developed within the LDL (Logic Data Language) Project, carried out at MCC, Austin, TX. The notation for representing sets and related issues used in t... |

74 | Statistical profile estimation in database systems - Mannino, Chu, et al. - 1988 |

69 |
Foundations of semantic query optimization for deductive databases
- Chakravarthy, Grant, et al.
- 1986
(Show Context)
Citation Context ...uery processing strategies, we do not further consider semantic optimization methods in this paper: various approaches to semantic optimization are proposed in the literature; among others; see [70], =-=[36]-=-. E. Classijication of Evaluation and Optimization Methods Fig. 3(a) summarizes classification criteria for Datalog optimization methods; they concern the search strategy (bottom-up or top-down), the ... |

67 |
Quist: A system for semantic query optimization in relational databases
- King
- 1981
(Show Context)
Citation Context ...s of query processing strategies, we do not further consider semantic optimization methods in this paper: various approaches to semantic optimization are proposed in the literature; among others; see =-=[70]-=-, [36]. E. Classijication of Evaluation and Optimization Methods Fig. 3(a) summarizes classification criteria for Datalog optimization methods; they concern the search strategy (bottom-up or top-down)... |

61 |
Alpha: An Extension of Relational Algebra to Express a Class of Recursive Queries
- Agrawal
- 1988
(Show Context)
Citation Context ...ent computation of general recursive queries [621, [7]-[9], 11231. In fact, many proposals of other extensions to the relational query languages in ‘‘nontraditional” directions include this operation =-=[8]-=-, [102], [58], [136]. Thus, an independent area of research has been developed which studies the efficient implementation of transitive closures improving the naive and semi-naive methods. The efficie... |

55 |
Theory of database queries
- Chandra
- 1988
(Show Context)
Citation Context ...more expressive than pure Datalog [4]. Fig. 5 shows the hierarchy of expressiveness of the different languages and formalisms presented in this paper. More information on this subject can be found in =-=[38]-=-. We finish our discussion on incorporating negation into Datalog by giving a brief survey on other relevant work on this topic. A different approach for defining the meaning of logic programs with ne... |

46 |
Design overview of the Nail! system
- Morris, Ullman, et al.
- 1986
(Show Context)
Citation Context ...atalog rules, together with the study of their efficiency [ 1201, [ 151, [ 161. In parallel, various experimental projects have shown the feasibility of Datalog programming environments [ 1191, [24], =-=[88]-=-. Present efforts in the integration of artificial intelligence and databases take a much more basic and pragmatic approach; in particular, several attempts fall in the category of “loose coupling,” w... |

41 | clause queries and generalizations - Chandra, Harel - 1985 |

40 |
Logic and Databases
- Gallaire, Minker
- 1978
(Show Context)
Citation Context ...application to linear rules with only one occurrence of the recursive predicate in the RHS. Another interesting (pure evaluation) algorithm (the Apex method) was previously introduced by Lozinskii in =-=[SI]-=-. The first method for pushing selections into recursive expressions was proposed by Aho and U11man in a seminal paper [lo]; the static filtering technique can be considered as a generalization of tha... |

38 |
Foundations of logic programming; (2nd extended ed
- Lloyd
- 1987
(Show Context)
Citation Context ...quite sophisticated tools of modern algebra [83]. The model theory of Horn clause systems and logic programs, however, is less difficult. It has been developed in [125], [ll] and is also explained in =-=[78]-=-. Datalog, being a simplified version of Logic Programming, can be described very easily in terms of model theory. An interpretation (in the context of Datalog) consists of an assignment of a concrete... |

36 |
Logic programming as constructivism: A formalization and its application to databases
- Bry
- 1989
(Show Context)
Citation Context ...ll-founded partial model is given in [ 1271, while resolution-based procedural semantics for well-founded negation is provided in [103]. Further important papers related to well-founded semantics are =-=[27]-=-, where the relationship to logical constructivism is investigated, and [961. E. Complex Objects The “objects” handled by pure Datalog programs correspond to the tuples of relations which in turn are ... |

35 |
Die Vollstandigkeit der Axiome des logischen Funktionenkalk uls, Monatshefte fur Mathematik und
- Godel
- 1930
(Show Context)
Citation Context ...tations, i.e., the different intended meanings that the used symbols and formulas may assume. Early developments of general model theory date back to works of Lowenheim [79], Skolem [ 1131, and GOdel =-=[56]-=-. A comprehensive exposition is given in [39]. The model theoretic characterization of general logic theories often requires the use of quite sophisticated tools of modern algebra [83]. The model theo... |

32 |
Sets and negation in a logical database language (LDLl
- Beeri
- 1987
(Show Context)
Citation Context ...erential set definitions such as p ( < X > ) : - p ( X ). Such definitions come close to Russell’s paradox. A large class of programs free of self-reference, called admissible programs, is defined in =-=[21]-=-. Note also that the test whether two terms (or literals) involving sets match is a computationally hard problem. This is a particular case of theory unification [116]. Another interesting problem is ... |

29 |
Optimizing existential Datalog queries
- Ramakrishnan, Beeri, et al.
- 1988
(Show Context)
Citation Context ...s in the program and of number of atoms in a rule) of a Datalog program under a decidable condition called uniform equivalence. Another kind of optimization is achieved by Ramakrishnan and others, in =-=[98]-=-, where the objective of optimization is pushing projections, rather than selections, in the body of a Datalog rule. This means deleting some argument positions in the literals of the rule body, which... |

27 | Using active connection graphs for reasoning with recursive rules - McKay, Shapiro - 1981 |

26 | Direct algorithms for computing the transitive closure of database relations
- Agrawal, Jagadish
- 1987
(Show Context)
Citation Context .... G. Computing Transitive Closures Eficiently Computing transitive closures efficiently has been recognized as a significant subproblem of the efficient computation of general recursive queries [621, =-=[7]-=--[9], 11231. In fact, many proposals of other extensions to the relational query languages in ‘‘nontraditional” directions include this operation [8], [102], [58], [136]. Thus, an independent area of ... |

24 |
Operators for non-first-normal-form relations
- Fischer, Thomas
- 1983
(Show Context)
Citation Context ...the last years in order to allow the storage and manipulation of complex objects. The most famous ones are the NF2 model by Jaeschke and Schek [66], the model of nested relations by Fisher and Thomas =-=[48]-=-, the model of Abiteboul and Been [l], [2] (which is more general than the former two models), the “FrancoArmenian Data model” FAD by Bancilhon, Briggs, Khoshafian, and Valduriez [19] (based on a calc... |

24 |
On the computation of the transitive closure of relational operators
- Ioannidis
- 1986
(Show Context)
Citation Context ...mi-naive methods. The efficient methods are mainly concerned with transitive closures of binary relations representing graphs and trees, very often making use of sparse matrices to represent them. In =-=[62]-=-, a logarithmic technique is applied in order to build more efficient iterations. The paper provides an interesting study of performance on tree-shaped databases, showing that logarithmic techniques p... |

21 | Computing with Logic - Maier, Warren - 1988 |

19 | All pairs shortest paths on a hypercube multiprocessor - Jenq, Sahni - 1987 |

17 | Query evaluation and recursion in deductive database systems - Bayer - 1985 |

16 | On the Evaluation Strategy of EDUCE - Bocca - 1986 |

15 |
Future intelligent information systems: AI and database technologies working together
- Brodie
- 1988
(Show Context)
Citation Context ...g” was also used by Maier and Warren in 1821 to denote a subset of Prolog. temal databases typically do not allow data sharing and recovery, thus do not properly belong to current database technology =-=[26]-=-. The spread and success of such enhanced AI systems, however, indicate that there is a great need for them. Loose coupling has been attempted in the area of Logic Programming and databases as well, b... |

14 |
On the evaluation of queries containing derived relations in relational databases
- Chang
- 1981
(Show Context)
Citation Context ...timization methods. A. Bottom- Up Eiuluation The Gauss-Seidel method is an algebraic version of the nni~be riwfuLition paradigm, which is present in many different forms in the literature 1131, 1851, =-=[41]-=-, [86], 1871. The method is also well known in numerical analysis, where it is used for determining the iterative solution (fixpoint) of systems of equations. Assume the following system C of relation... |

14 | Optimization in a logic based language for knowledge and data intensive applications
- Krishnamurthy, Zaniolo
- 1988
(Show Context)
Citation Context ...ented by Zaniolo [133]; a language overview is given by Tsur and Zaniolo [119]; the treatment of sets and negation is formally presented by Beeri et al. [21]; other papers on the subject are [19] and =-=[73]-=-. An excellent description of the LDL language and of related features is given in [92]. The NAIL! project (Not Another Implementation of Logic!) is under development at Stanford University with the s... |

12 | Semantic query optimization: Additional constraints and control strategies - Chakravarthy, Minker, et al. - 1986 |

12 |
New features for relational database systems to support CAD applications
- Guttman
- 1984
(Show Context)
Citation Context ...ion of general recursive queries [621, [7]-[9], 11231. In fact, many proposals of other extensions to the relational query languages in ‘‘nontraditional” directions include this operation [8], [102], =-=[58]-=-, [136]. Thus, an independent area of research has been developed which studies the efficient implementation of transitive closures improving the naive and semi-naive methods. The efficient methods ar... |

11 |
Data models and languages for databases
- Beeri
- 1988
(Show Context)
Citation Context ... is a first step towards the development of new language paradigms which use some of the concepts from object-oriented databases. The foundation of such an evolution have already been placed by Beeri =-=[23]-=- and Abiteboul and Kanellakis [5]; this work has shown that rule-based and object-oriented approaches are not in opposition, but rather they are capable of providing useful programming concepts to eac... |

11 |
Recursive strategies for answering recursive queriesthe rqa/fqi strategy
- Nejdl
- 1987
(Show Context)
Citation Context ...tead not terminate in some cases. The query-subquery algorithm was introduced by Vieille in [ 1281. The version introduced in that paper was found to be incomplete. The author [129], [130] and others =-=[93]-=-, [ 1001 have subsequently provided corrections or complete versions of the algorithm. A detailed description of the method can be found in [34]. C. Magic Sets The method of the magic sets is a logica... |

10 | Translation and optimization of logic queries: the algebraic approach
- Ceri, Gottlob, et al.
- 1986
(Show Context)
Citation Context ...ution of the system corresponds to determining the value of the variable relations which satisfy the system of equations [61], [63]. The translation from Datalog to relational algebra is described in =-=[28]-=-, [34], and [122]. Let us consider a Datalog clause C:p ( al, . . . , a,) :- 41 ( PI, . . . , Pk), . . . qm( P,, . . . , Oh). The translation associates to C an inclusion relationship Expr( Q,, . . . ... |

10 |
Axiomatisches Denken, Mathematische Annalen 78
- Hilbert
- 1917
(Show Context)
Citation Context ... deferred to Sections 111-V. E. The Proof Theory of Datalog Proof theory is concerned with the analysis of logical inference. As a branch of mathematical logic, this discipline was founded by Hilbert =-=[60]-=-. While the investigation of relevant extensions of first-order logic (e.g., number theory) is faced with considerable problems such as consistency and incompleteness issues [SI, [57], the proof theor... |

9 | PROSQL: A Prolog Programming Interface with SQL/DS - Chang - 1984 |

7 |
Optimization of systems of algebraic equations for evaluating Datalog queries
- Ceri, Tanca
- 1987
(Show Context)
Citation Context ...(k’) as the union E(R‘k-I)) U E(D‘k’). The advantage of this formula is that, at each iteration k, we need to compute E(D‘k’) rather than E(R(k’). This can be generalized to systems of equations (see =-=[29]-=-, ~31). Extensions of this method, the general semi-naive, and the pseudo-rewriting semi-naive (discussed, among others, in [34], [135], and [63]) enable a less efficient application of a similar appr... |

7 |
ALGRES: An advanced database system for complex applications
- Ceri, Crespi-Reghizzi, et al.
(Show Context)
Citation Context ...programming language. ALGRES is a joint effort of the Politecnico di Milano and of TXT-Techint (Italy). A general overview of the ALGRES Project can be found in a paper by Ceri, CrespiReghizzi et al. =-=[32]-=-. Other papers are [30] and [31]. Other relevant research projects which deal with rulebased computations are POSTGRES, under development at Berkeley University [ 1171, and the 5th GENERATION Project ... |

7 |
Filtering data flow in deductive databases
- Kifer, Lozinskii
- 1986
(Show Context)
Citation Context ...ral other methods can be found in the literature; most of them share some characteristics with the methods presented above. Static Filtering is a rewriting method introduced by Kifer and Lozinskii in =-=[68]-=-. In this method, a bottom-up evaluation is viewed as aflow of tuples through a graph derived from the program, called relation-axiom graph, with two types of nodes: relation nodes, associated to pred... |

7 |
An algorithm for ordering subgoals
- Morris
- 1988
(Show Context)
Citation Context ... PC/RT). An overview of the NAIL! project is presented by Morris, Ullman, and Van Gelder in [88]; an update can be found in [89]. Various kinds of algorithms applied in the prototype are discussed in =-=[90]-=- and [121]. The KIWI Esprit project, sponsored by the EEC, is a joint effort for the development of knowledge bases, programmed through an object-oriented language (OOPS) , and interfaced to an existi... |

6 | Set grouping and layering in Horn clause programs - Naqvi - 1988 |

5 |
Maindreville, “Evaluation of database recursive logic programs as recurrent function series
- Gardarin, De
- 1986
(Show Context)
Citation Context ...evaluation methods, the second is characteristic of rewriting methods. Substantially the same functional interpretation of predicates is given in a more general form by Gardarin and De Maidreville in =-=[52]-=-, who propose a method for evaluating queries as function series, where the functions involved correspond to the functional interpretation of the predicates. Follow-up work can be found in [54]. F. Ot... |

5 |
Transforming non-linear recursion into linear recursion,” manuscript
- Ioannidis, Wong
- 1987
(Show Context)
Citation Context ...the Datalog program corresponds to a constant relation. Determining a solution of the system corresponds to determining the value of the variable relations which satisfy the system of equations [61], =-=[63]-=-. The translation from Datalog to relational algebra is described in [28], [34], and [122]. Let us consider a Datalog clause C:p ( al, . . . , a,) :- 41 ( PI, . . . , Pk), . . . qm( P,, . . . , Oh). T... |

5 | Evaluating queries in deductive databases by generating - Lozinskii - 1985 |

5 |
Future directions in DBMS research
- Neuhold, Stonebraker
- 1988
(Show Context)
Citation Context ...e database community to Datalog has often been marked by skepticism; in particular, the immediate or even future practical use of research on sophisticated rule-based interactions has been questioned =-=[94]-=-. Nevertheless, we do expect that Datalog’s experience, properly filtered, will teach important lessons to researchers involved in the development of knowledge base systems. The purpose of this paper ... |

4 | Die Wiederspruchsfreiheit der reinen Zahlentheorie - Gentzen - 1936 |