IDLOG: extending the expressive power of deductive database languages

The expressive power of pure deductive database languages, such as DATALOG and stratified DATALOGS , is limited in a sense that some useful queries such as functions involving aggregation are not definable in these languages. Our concern in this paper is to provide a uniform logic framework for deductive databases with greater expressive power. It has been shown that with a linear ordering on the domain of the database, the expressive power of some database languages can be enhanced so that some functions involving aggregation can be defined. Yet, a direct implementation of the linear ordering in deductive database languages may seem unintuitive, and may not be very efficient to use in practice. We propose a logic for deductive databases which employs the notion of “identifying each tuple in a relation”. Through the use of these tuple-identifications , different linear orderings are defined as a result. This intuitively explains the reason why our logic has greater expressive power. The proposed logic language is non-deterministu in nature. However, non-determinism is not the real reason for the enhanced expressive power. A deterministic subset of the programs in this language is computational complete in the sense that it defines all the computable deterministic queries . Although the problem of deciding whether a program is in this subset is in general undecidable, we do provide a rather general sufficient test for identifying such programs. Also discussed in this paper is an extended notion of queries which allows both the input and the output of a query to contain interpreted constants of an infinite domain. We show that extended queries involving aggregation can also be defined in the language.

[1]  Gultekin Özsoyoglu,et al.  Extending relational algebra and relational calculus with set-valued attributes and aggregate functions , 1987, TODS.

[2]  Anthony C. Klug Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate Functions , 1982, JACM.

[3]  Adrian Walker,et al.  Towards a Theory of Declarative Knowledge , 1988, Foundations of Deductive Databases and Logic Programming..

[4]  Neil Immerman Languages which capture complexity classes , 1983, STOC '83.

[5]  Donald D. Chamberlin,et al.  SEQUEL 2: A Unified Approach to Data Definition, Manipulation, and Control , 1976, IBM J. Res. Dev..

[6]  Ashok K. Chandra Theory of database queries , 1988, PODS '88.

[7]  David Harel,et al.  Horn Clauses Queries and Generalizations , 1985, J. Log. Program..

[8]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[9]  David Harel,et al.  Structure and complexity of relational queries , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[10]  Serge Abiteboul,et al.  Procedural and declarative database update languages , 1988, PODS '88.

[11]  Elias Dahlhaus,et al.  Skolem Normal Forms Concerning the Least Fixpoint , 1987, Computation Theory and Logic.

[12]  Ashok K. Chandra Programming primitives for database languages , 1981, POPL '81.

[13]  Jianwen Su,et al.  Untyped sets, invention, and computable queries , 1989, PODS '89.

[14]  Serge Abiteboul,et al.  A translation language complete for database update and specification , 1987, PODS '87.

[15]  Christos H. Papadimitriou,et al.  Why not negation by fixpoint? , 1988, PODS '88.