The topic of logic programming and databases. has gained in creasing interest in recent years. Several events have marked the rapid evolution of this field: the selection, by the Japanese Fifth Generation Project, of Prolog and of the relational data model as the basis for the development of new machine archi tectures; the focusing of research in database theory on logic queries and on recursive query processing; and the pragmatic, application-oriented development of expert database systems and of knowledge-base systems. As a result, an enormous amount of work has been produced in the recent literature, coupled with the spontaneous growth of several advanced projects in this area. The goal of this book is to present a systematic overview of a rapidly evolving discipline, which is presently not described with the same approach in other books. We intend to introduce stu dents and researchers to this new discipline; thus we use a plain, tutorial style, and complement the description of algorithms with examples and exercises. We attempt to achieve a balance be tween theoretical foundations and technological issues; thus we present a careful introduction to the new language Datalog, but we also focus on the efficient interfacing of logic programming formalisms (such as Prolog and Datalog) with large databases. This book presents a systematic overview of the interaction between logic programming and database systems. Merging these two technologies permits new types of systems which extend the frontiers of computer science and open up new applications, such as deductive databases, knowledge base management systems, and expert database systems. The book opens with an overview and an introductory review, then is divided into three parts devoted to - the coupling of Prolog with relational databases, - the precise definition of the Datalog language, and - the description of query optimization techniques and extensions of Datalog. A closing chapter reviews the main projects on the integration of logic programming and databases, including LDL, Nail! and the Fifth Generation Project. The presentation achieves a balance between theoretical and technological issues, by providing a careful introduction to the underlying paradigms and their theoretical foundations, and by stressing the problems involved in achieving efficiency when interfacing logic programming formalisms with large databases. The book is thus suited for members of both the database and logic programming communities. The authors use a tutorial style complete with examples and exercises to introduce students as well as researchers to this developing field. Front Matter....Pages I-XIII Logic Programming and Databases: An Overview....Pages 1-15 A Review of Relational Databases and Prolog....Pages 16-26 Front Matter....Pages 27-27 Prolog as a Query Language....Pages 29-39 Coupling Prolog Systems to Relational Databases....Pages 40-64 Overview of Systems for Coupling Prolog to Relational Databases....Pages 65-74 Front Matter....Pages 75-75 Syntax and Semantics of Datalog....Pages 77-93 Proof Theory and Evaluation Paradigms of Datalog....Pages 94-122 Front Matter....Pages 123-123 Classification of Optimization Methods for Datalog....Pages 124-144 Evaluation Methods....Pages 145-162 Rewriting Methods....Pages 163-207 Extensions of Pure Datalog....Pages 208-245 Overview of Research Prototypes for Integrating Relational Databases and Logic Programming....Pages 246-266 Back Matter....Pages 267-284