Translating OSQL queries into efficient set expressions
Efficient query processing is one of the key promises of database technology. With the evolution of supported data models—from relational via nested relational to object-oriented—the need for such efficiency has not diminished, and the general problem has increased in complexity.
In this paper, we present a heuristics-based, extensible algorithm for the translation of object-oriented query expressions in a variant of OSQL to an algebra extended with specialized join operators, designed for the task. We claim that the resulting algebraic expressions are cost-efficient.
Our approach builds on well-known optimization strategies for the relational model, but extends them to include relations and more arbitrary sets as values. We pay special attention to the most costly forms of OSQL queries, namely those with full subqueries in the SELECT- or WHERE-clause. The paper builds on earlier results [17, 18].
- 1.Balsters, H., R.A. de By, and R. Zicari, “Typed Sets as a Basis for Object-Oriented Database Schemas,” Proceedings ECOOP, Kaiserslautern, 1993.Google Scholar
- 2.Bry, F., “Towards an Efficient Evaluation of General Queries: Quantifier and Disjunction Processing Revisited,” Proceedings ACM SIGMOD, Portland, Oregon, June 1989, pp. 193–204.Google Scholar
- 3.R.G.G. Cattell, ed., The Object Database Standard: ODMG-93, Morgan Kaufmann Publishers, San Mateo, California, 1993.Google Scholar
- 4.Ceri, S. and G. Gottlob, “Translating SQL into Relational Algebra: Optimization, Semantics, and Equivalence of SQL Queries,” IEEE Transactions on Software Engineering, 11(4), April 1985, pp. 324–345.Google Scholar
- 5.Cluet, S. and G. Moerkotte, “Nested Queries in Object Bases,” Proceedings Fourth International Workshop on Database Programming languages, New York, Sept. 1993.Google Scholar
- 6.Cluet, S. and G. Moerkotte, “Classification and Optimization of Nested Queries in Object Bases,” manuscript, 1994.Google Scholar
- 7.Elmasri, R. and S.B. Navathe, Fundamentals of Database Systems, Benjamin/Cummings Publishing Company Inc., 1989.Google Scholar
- 8.Graefe, G., “Query Evaluation Techniques for Large Databases,” ACM Computing Surveys, 25(2), June 1993, pp. 73–170.Google Scholar
- 9.Hellerstein, J.M. and A. Pfeffer, “The RD-Tree: An Index Structure for Sets,” Technical Report #1252, University at Wisconsin at Madison, October 1994.Google Scholar
- 10.Ishikawa, Y., H. Kitagawa, and N. Ohbo, “Evaluation of Signature Files as Set Access Facilities in OODBs,” Proceedings ACM SIGMOD, 1993, pp. 247–256.Google Scholar
- 11.Jarke, M. and J. Koch, “Query Optimization in Database Systems,” ACM Computing Surveys, 16(2), June 1984, pp. 111–152.Google Scholar
- 12.Kemper, A. and G. Moerkotte, “Query Optimization in Object Bases: Exploiting Relational Techniques,” in: Query Processing for Advanced Database Systems, eds. J.-C. Freytag, D. Maier, and G. Vossen, Morgan Kaufmann Publishers, San Mateo, California, 1993.Google Scholar
- 13.Kim, W., “On Optimizing an SQL-like Nested Query,” ACM TODS, 7(3), September 1982, pp. 443–469.Google Scholar
- 14.Nakano, R., “Translation with Optimization from Relational Calculus to Relational Algebra Having Aggregate Functions,” ACM TODS, 15(4), December 1990, pp. 518–557.Google Scholar
- 15.Pistor, P. and F. Andersen, “Designing a Generalized NF2 Model with an SQL-Type Language Interface,” Proceedings VLDB, Kyoto, August 1986, pp. 278–285.Google Scholar
- 16.Shekita, E.J. and M.J. Carey, “A Performance Evaluation of Pointer-Based Joins,” Proceedings ACM SIGMOD, Atlantic City, May 1990, pp. 300–311.Google Scholar
- 17.Steenhagen, H.J., P.M.G. Apers, and H.M. Blanken, “Optimization of Nested Queries in a Complex Object Model,” Proceedings EDBT, Cambridge, March 1994, pp. 337–350.Google Scholar
- 18.Steenhagen, H.J., P.M.G. Apers, H.M. Blanken, and R.A. de By, “From Nested-Loop to Join Queries in OODB,” Proceedings VLDB, Santiago de Chile, September 1994.Google Scholar
- 19.Steenhagen, H.J., Optimization of Object Query Languages, Ph.D. Thesis, University of Twente, October 1995.Google Scholar