MUTUALLY COMPLEMENTARY FORMALIZATIONS OF
DEDUCTIVE QUERY LANGUAGES
V. I. Zadorozhnyi, L. A. Kalinichenko,
and N. S. Nikitchenko UDC 681.3.016
INTRODUCTION
Work on deductive data bases (DDB) is actively underway at the present time [1-3]. The concept of the DDB, which
appeared at the juncture of logic programming and relational data bases, reflects the attempt to combine data-base technology
and artificial intelligence for the creation of developed knowledge-base control systems. A separate and very important problem
is the development of declarative query languages. A general definition of a logic-based (deductive) query language has been
formulated for the Datalog relational data base [4]. Negation is absent in "pure" Datalog, and only variables and constants
are permitted as terms. The concept of a "pure" Datalog has played an important role in the solution of theoretical problems
but found little use in practice. There has been considerable progress in the DDB area in recent years due to the creation of
logic-based query languages, which expand "pure" Datalog with a number of additional possibilities (negation, built-in
predicates, procedural tools for program control, new data models, etc.) [5-10].
Despite its simplicity, Datalog has made it possible to arrive at an understanding of a number of problems associated
with the generation of logical queries in DDBs. Diverse strategies have been proposed for the generation of such queries.
Very often, the interrelationship among them has been understood at a purely intuitive level. This relationship becomes less
clear for expanded logic-based languages, owing to considerable complication of the query semantics. The presence of a single
opinion on strategies for generation of logical queries as mutually complementary concepts would be important not only
theoretically but also practically for the solution of problems of generation optimization in DDBs.
Here, we shall examine the construction of a system Of mutually complementary formal definitions of deductive query
languages. Such systems have been proposed for conventional programming languages [11, 12]. The constructs have a
rigorous mathematical foundation, which allows the equivalence of the obtained representations to be demonstrated correctly.
We have selected as an example a subset of the SINTEZ logic-based query language for interoperable data-resource
environments [13, 14].
We shall provide the basic definitions of DDB theory in Sec. 1 and describe the selected subset of the SINTEZ query
language in Sec. 2. We shall define in Secs. 3 and 4 a theoretical semantics model and the fixed-point semantics of this
language. In Sec. 5, the language is formalized using an algebraic approach, and this formalization is employed in Sec. 6 to
describe strategies for program generation. The concepts introduced are illustrated by the example of stratified programs.
1. DDB: PRINCIPAL DEFINITIONS
Unless otherwise noted, we shall use the notation system adopted by Ceri et al. [2]. A rule is a statement of the form
P:-ql, q2 ..... qn, wherep and qi are literals. Here, p is called the heading of the rule and the conjunction of literals qi is
called the body of the rule. A rule with an empty body, which does not contain variables, is called a fact. A DDB consists
of a set of facts (base, or extensional, predicates) and a set of rules (which define the derivative, or intensional, predicates).
The first set is called an extensional data base (EDB); the second, an intensional data base (IDB). A fact F can be derived from
the DDB if there exists a rule whose heading can be associated with F and whose body contains either base predicates or
predicates that can be derived from the given DDB. A DDB query is a literal, and the answer to a query is all of the base
Translated from Kibernetika i Sistemnyi Analiz, No. 2, pp. 94-110, March-April, 1993.
November 19, 1992.
Original article submitted
1060-0396/93/2902-0229512.50 ©1993 Plenum Publishing Corporation 229