DBPL 2007: Database Programming Languages pp 32-47 | Cite as
Datalog Programs over Infinite Databases, Revisited
Abstract
This paper’s revisit of infinite relational databases, a model traditionally perceived as purely theoretical, was sparked by a concrete implementation setting, and the results obtained here were used in a practical database problem. In the course of implementing a database system for querying Java software, we found that the universe of Java code can be effectively modeled as an infinite database. This modeling makes it possible to distinguish between queries which are “open-ended,” that is, whose result may grow as software components are added into the system, and queries which are “closed,” in that their result does not change as the software base grows. Further, closed queries can be implemented much more efficiently than open queries. Achievements include an algorithm for distinguishing between these two kinds of queries (we assume that queries are written in Datalog), and an algorithm to generate an efficient evaluation scheme of closed queries, which is a generalization of Vieille’s famous QSQR algorithm for top-down evaluation of Datalog programs. A by-product of this work is a rather terse and elegant representation of QSQR.
Keywords
Function Symbol Safety Problem Open Query Rule Application Safe ProgramPreview
Unable to display preview. Download preview PDF.
References
- 1.Beeri, C., Bernstein, P.A.: Computational problems related to the design of normal form relational schemas. ACM Trans. Database Syst. 4(1), 30–59 (1979)CrossRefGoogle Scholar
- 2.Ceri, S., Gottlob, G., Tanca, L.: Logic programming and databases. Springer, New York (1990)Google Scholar
- 3.Cohen, T., Gil, J.Y., Maman, I.: JTL—the Java tools language. In: OOPSLA 2006 (2006)Google Scholar
- 4.Deutsch, A., Ludäscher, B., Nash, A.: Rewriting queries using views with access patterns under integrity constraints. Theoretical Comp. Sci. 371(3), 200–226 (2007)MATHCrossRefGoogle Scholar
- 5.Florescu, D., Levy, A.Y., Manolescu, I., Suciu, D.: Query optimization in the presence of limited access patterns. In: SIGMOD 1999 (1999)Google Scholar
- 6.Kifer, M., Ramakrishnan, R., Silberschatz, A.: An axiomatic approach to deciding query safety in deductive databases. In: PODS 1988 (1988)Google Scholar
- 7.Kifer, M.: On the decidability and axiomatization of query finiteness in deductive databases. J. ACM 45(4), 588–633 (1998)MATHCrossRefMathSciNetGoogle Scholar
- 8.Krishnamurthy, R., Ramakrishnan, R., Shmueli, O.: A framework for testing safety and effective computability of extended datalog. In: ICMD 1988 (1988)Google Scholar
- 9.Li, C., Chang, E.Y.: On answering queries in the presence of limited access patterns. In: Van den Bussche, J., Vianu, V. (eds.) ICDT 2001. LNCS, vol. 1973, Springer, Heidelberg (2000)Google Scholar
- 10.Maier, D., Ullman, J.D., Vardi, M.Y.: On the foundations of the universal relation model. ACM Trans. Database Syst. 9(2), 283–308 (1984)MATHCrossRefMathSciNetGoogle Scholar
- 11.Paola, R.D.: The recursive unsolvability of the decision problem for the class of definite formulas. J. ACM 16(2), 324–327 (1969)MATHCrossRefGoogle Scholar
- 12.Ramakrishnan, R., et al.: Safety of recursive Horn clauses with infinite relations. In: PODS 1987 (1987)Google Scholar
- 13.Sagiv, Y., Vardi, M.Y.: Safety of Datalog queries over infinite databases. In: PODS 1988 (1988)Google Scholar
- 14.Shmueli, O.: Decidability and expressiveness aspects of logic queries. In: PODS 1987 (1987)Google Scholar
- 15.Vardi, M.: The decision problem for database dependencies. Inf. Process. Lett. 12(5), 251–254 (1981)MATHCrossRefMathSciNetGoogle Scholar
- 16.Vieille, L.: Recursive axioms in deductive databases: The Query/Subquery approach. In: 1st Int. Conf. on Expert Database Syst. (1986)Google Scholar
- 17.Vieille, L.: Recursive query processing: The power of logic. Theoretical Comp. Sci. 69(1), 1–53 (1989)MATHCrossRefMathSciNetGoogle Scholar