skip to main content
10.1145/73721.73738acmconferencesArticle/Chapter ViewAbstractPublication PagespodsConference Proceedingsconference-collections
Article
Free Access

Safety of datalog queries over infinite databases

Published:29 March 1989Publication History

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

  1. AH88.Abiteboul, S., Hull, R.: Data functions, Datalog and negation. Proc. A CM Conf. on ManaBement oJ Data, Chicago, 1988, pp. 143-153. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. CH85.Chandra, A.K., Hard, D.: Hornclause queries and generalizations. J. Looic Proorammino 1(1985), pp. 1-15.Google ScholarGoogle Scholar
  5. GM78.Gallaire, H., Minker, J.: Logic and Databases. Plenum Press, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle Scholar
  7. HN84.Henschen, L.J., Naqvi, S.A.: On compiling queries in recursive firstorder databases, g. A CM 31(1984), pp. 47-85. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. HU79.Hopcroft, J.g., Ullman, J.D.: Introduction to Automata Theorll, Languaoes, and Computation. Addison- Wesley, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle Scholar
  10. Ki88.Kifer, M.: On safety, domain independence, and capturability of database queries. Proc. Int'l Conf. on Data and Knowledge Bases, Jerusalem, 1988.Google ScholarGoogle ScholarCross RefCross Ref
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarCross RefCross Ref
  18. Ra88.Ramakrishnan, R.: Private communication, 1988.Google ScholarGoogle Scholar
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. RS59.Rabin, M.O., Scott, D.: Finite automata and their decision problems. IBM J. Research and Development, 3(1959), pp. 114-125.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarCross RefCross Ref
  24. Ul85.Ullman, J.D.: Implementation of logical query languages for databases. A CM Trans. on Database System8 10(1985), pp. 289-321. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Ul88.Ullman, J.D.: Principles or database and knowledoe-base systems. Computer Science Press, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Safety of datalog queries over infinite databases

                    Recommendations

                    Comments

                    Login options

                    Check if you have access through your login credentials or your institution to get full access on this article.

                    Sign in
                    • Published in

                      cover image ACM Conferences
                      PODS '89: Proceedings of the eighth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
                      March 1989
                      401 pages
                      ISBN:0897913086
                      DOI:10.1145/73721

                      Copyright © 1989 ACM

                      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                      Publisher

                      Association for Computing Machinery

                      New York, NY, United States

                      Publication History

                      • Published: 29 March 1989

                      Permissions

                      Request permissions about this article.

                      Request Permissions

                      Check for updates

                      Qualifiers

                      • Article

                      Acceptance Rates

                      Overall Acceptance Rate642of2,707submissions,24%

                    PDF Format

                    View or Download as a PDF file.

                    PDF

                    eReader

                    View online with eReader.

                    eReader