|
ABSTRACT
A query is safe with respect to a set of constraints if for every database that satisfies the constraints the query is guaranteed to yield a finite set of answers. We study here the safety problem for Datalog programs with respect to finiteness constraints. We show that safety can be viewed as a combination of two properties: weak safety, which guarantees the finiteness of intermediate answers, and termination, which guarantees the finiteness of the evaluation. We prove that while weak safety is decidable, termination is not. We then consider monadic programs, i.e., programs in which all intensional predicates are monadic, and show that safety is decidable in polynomial time for monadic programs. While we do not settle the safety problem, we show that a closely related problem, the decision problem for safety with respect to functional dependencies, is undecidable even for monadic programs.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
AH88
|
Serge Abiteboul , Richard Hull, Data functions, datalog and negation, Proceedings of the 1988 ACM SIGMOD international conference on Management of data, p.143-153, June 01-03, 1988, Chicago, Illinois, United States
|
 |
BR86
|
|
 |
CGKV88
|
Stavros Cosmadakis , Haim Gaifman , Paris Kanellakis , Moshe Vardi, Decidable optimization problems for database logic programs, Proceedings of the twentieth annual ACM symposium on Theory of computing, p.477-490, May 02-04, 1988, Chicago, Illinois, United States
[doi> 10.1145/62212.62259]
|
| |
CH85
|
Chandra, A.K., Hard, D.: Hornclause queries and generalizations. J. Looic Proorammino 1(1985), pp. 1-15.
|
| |
GM78
|
|
| |
GMSV87
|
Gaifman, H., Mairson, H., Sagiv, Y., Vardi M.Y.: Undecidable optimization problems for database logic programs. Proe. ~nd IEEE St/rap. on Logic in Computer Science, Ithaca, 1987, pp. 106-115.
|
 |
HN84
|
|
| |
HU79
|
|
| |
Io85
|
Ioannidis, Y.E.: A time bound on the materialization of some recursively defined views. Proc. I I th Int 'l Conf. on Very Large Data Bases, Stockholm, 1985, pp. 219-226.
|
| |
Ki88
|
Kifer, M.: On safety, domain independence, and capturability of database queries. Proc. Int'l Conf. on Data and Knowledge Bases, Jerusalem, 1988.
|
| |
KiL88
|
|
 |
KiRS88
|
|
 |
KrRS88
|
Ravi Krishnamurthy , Raghu Ramakrishnan , Oded Shmueli, A framework for testing safety and effective computability of extended datalog, Proceedings of the 1988 ACM SIGMOD international conference on Management of data, p.154-163, June 01-03, 1988, Chicago, Illinois, United States
|
 |
MUV84
|
|
 |
Na86
|
|
 |
NS87
|
|
| |
Ra70
|
Rabin, M.O.: Weakly definable relations and special automata. Proc. SCrap. on Mathematical Logic and Foundations of Set Theory (Y. Bar- Hilel, ed.), North-Holland, 1970, pp. 1-23.
|
| |
Ra88
|
Ramakrishnan, R.: Private communication, 1988.
|
 |
RBS87
|
R. Ramakrishnan , F. Bancilhon , A. Silberschatz, Safety of recursive Horn clauses with infinite relations, Proceedings of the sixth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems, p.328-339, March 23-25, 1987, San Diego, California, United States
[doi> 10.1145/28659.28694]
|
| |
RS59
|
Rabin, M.O., Scott, D.: Finite automata and their decision problems. IBM J. Research and Development, 3(1959), pp. 114-125.
|
 |
Sa85
|
|
 |
Sh87
|
|
| |
TW68
|
Thatcher, J.W., Wright, J.B.: Generalized finite automata theory with an application to a decision problem of second-order logic. Mathematical System Theory 2(1968), pp. 57-81.
|
 |
Ul85
|
|
| |
Ul88
|
|
 |
Va88
|
|
|