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.
- AH88.Abiteboul, S., Hull, R.: Data functions, Datalog and negation. Proc. A CM Conf. on ManaBement oJ Data, Chicago, 1988, pp. 143-153. Google ScholarDigital Library
- BR86.Bancilhon, F., Ramakrishnan, R.: An amateur's introduction to recursive query processing strategies. Proe. A CM Conj. on Manaoemtnt of Data, Washington, 1986, pp. 16- 52. Google ScholarDigital Library
- CGKV88.Cosmadakis, S.S., Gaifman, H., Kanellakis, P.C., Vaxdi, M.Y.: Decidable Optimization Problems for Database Logic Programs. Proe. ~Oth A CM Sltmp. on Theory of Computina, 1988, pp. 47'7-490. Google ScholarDigital Library
- CH85.Chandra, A.K., Hard, D.: Hornclause queries and generalizations. J. Looic Proorammino 1(1985), pp. 1-15.Google Scholar
- GM78.Gallaire, H., Minker, J.: Logic and Databases. Plenum Press, 1978. Google ScholarDigital Library
- 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.Google Scholar
- HN84.Henschen, L.J., Naqvi, S.A.: On compiling queries in recursive firstorder databases, g. A CM 31(1984), pp. 47-85. Google ScholarDigital Library
- HU79.Hopcroft, J.g., Ullman, J.D.: Introduction to Automata Theorll, Languaoes, and Computation. Addison- Wesley, 1979. Google ScholarDigital Library
- 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.Google Scholar
- Ki88.Kifer, M.: On safety, domain independence, and capturability of database queries. Proc. Int'l Conf. on Data and Knowledge Bases, Jerusalem, 1988.Google ScholarCross Ref
- KiL88.Kifer, M., bozinsld, E.L.: SYGRAF - Implementing logic programs in a database style. IEEE Trans. on Software Eng., July 1988, pp. 922- 935. Google ScholarDigital Library
- KiRS88.Kifer, M., Ramakrishnan, R., Silberschatz, A.: An axiomatic approach to deciding query safety in deductive databases. Proc. 7th A CM Syrup. on Principles of Database Systems, Austin, 1988, pp. 52-60. Google ScholarDigital Library
- KrRS88.Krishnamurthy, R., Ramakrlshnan, R., Shmuei, O.: A framework for testing safety and effective computability of extended DatMog. Proc. A CM Sltmp. on Management of Data, Chicago, 1988, pp. 154-163. Google ScholarDigital Library
- MUV84.Maier, D., U1}man, J.D., Vardi, M.Y.: On the foundations of the universal relation model. A GM Trans. on Database Sllstems 9(1984), pp. 283-308. Google ScholarDigital Library
- Na86.Naughton, J.F.: Data independent recursion in deductive databases. Proc. 5th A CM Syrup. on Principles of Data6ase S~/stems, Cambridge, 1986, pp. 267-279. Full version- Stanford University TechnicM Report STAN-CS-86-1102, to appear in J. Computer and System Sciences. Google ScholarDigital Library
- NS87.Naughton, J.F., Sagiv, Y.: A decidable class of bounded recursions. Proc. 6th A CM Syrup. on Principles of Database Systems, San Diego, 1987, pp. 227-236. Google ScholarDigital Library
- 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.Google ScholarCross Ref
- Ra88.Ramakrishnan, R.: Private communication, 1988.Google Scholar
- RBS87.Ramakrishnan, R., Bancilhon, F., Silberschatz, A.: Safety of recursive Horn clauses with infinite relations. Proe. 6th A CM Symp. on Principles of Database Systems, San Diego, 1987, pp. 328-339. Google ScholarDigital Library
- RS59.Rabin, M.O., Scott, D.: Finite automata and their decision problems. IBM J. Research and Development, 3(1959), pp. 114-125.Google ScholarDigital Library
- Sa85.Sagiv, Y.: On computing restricted projections of representative instances. Proc. g th A CM Syrup. on Principle8 of Database Systems, Portland, 1985, pp. 171-180. Google ScholarDigital Library
- Sh87.Shmuell, O.: Decidability and expressiveness aspects of logic queries. Proc. 6th A CM Syrup. on Principles of Database Systems, San Diego, pp. 237-249. Google ScholarDigital Library
- 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.Google ScholarCross Ref
- Ul85.Ullman, J.D.: Implementation of logical query languages for databases. A CM Trans. on Database System8 10(1985), pp. 289-321. Google ScholarDigital Library
- Ul88.Ullman, J.D.: Principles or database and knowledoe-base systems. Computer Science Press, 1988. Google ScholarDigital Library
- Va88.Vardi, M.Y.: Decidability and undecidability results for boundedness of linear recursive queries. Proc. 7th A CM Syrup. on Principle8 of Databaae Sl/stema, 1988, pp. 341- 351. Google ScholarDigital Library
Index Terms
- Safety of datalog queries over infinite databases
Recommendations
Regular Queries on Graph Databases
Graph databases are currently one of the most popular paradigms for storing data. One of the key conceptual differences between graph and relational databases is the focus on navigational queries that ask whether some nodes are connected by paths ...
Variable automata over infinite alphabets
LATA'10: Proceedings of the 4th international conference on Language and Automata Theory and ApplicationsAutomated reasoning about systems with infinite domains requires an extension of regular automata to infinite alphabets. Existing formalisms of such automata cope with the infiniteness of the alphabet by adding to the automaton a set of registers or ...
On the decidability of containment of recursive datalog queries - preliminary report
PODS '04: Proceedings of the twenty-third ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systemsThe problem of deciding query containment has important applications in classical query optimization and heterogeneous database systems. Query containment is undecidable for unrestricted recursive queries, and decidable for recursive monadic queries and ...
Comments