This Article 
 Bibliographic References 
 Add to: 
Logic-Based Query Optimization for Object Databases
July/August 2000 (vol. 12 no. 4)
pp. 529-547

Abstract—We present a technique for transferring query optimization techniques, developed for relational databases, into object databases. We demonstrate this technique for ODMG database schemas defined in ODL and object queries expressed in OQL. The object schema is represented using a logical representation (Datalog). Semantic knowledge about the object data model, e.g., class hierarchy information, relationship between objects, etc., as well as semantic knowledge about a particular schema and application domain are expressed as integrity constraints. An OQL object query is represented as a logic query and query optimization is performed in the Datalog representation. We obtain equivalent (optimized) logic queries and, subsequently, obtain equivalent (optimized) OQL queries for each equivalent logic query. In this paper, we present one optimization technique for semantic query optimization (SQO) based on the residue technique of [6], [7], [8]. We show that our technique generalizes previous research on SQO for object databases. We handle a large class of OQL queries, including queries with constructors and methods. We demonstrate how SQO can be used to eliminate queries which contain contradictions and simplify queries, e.g., by eliminating joins, or by reducing the access scope for evaluating a query to some specific subclass(es). We also demonstrate how the definition of a method, or integrity constraints describing the method, can be used in optimizing a query with a method.

[1] K. Aberer and G. Fischer, “Semantic Query Optimization for Methods in Object-Oriented Database Systems,” Proc. IEEE Int'l Conf. Data Eng., pp. 70–79, 1995.
[2] F. Bancilhon, S. Cluet, and C. Delobel, “A Query Language for${\rm{o}}_2$,” Building an Object-Oriented Database System, pp. 243–255, Morgan Kaufman, 1992.
[3] J. Banerjee, W. Kim, and K.-C. Kim, “Queries in Object-Oriented Databases,” Proc. Fourth Int'l Conf. Data Eng., 1988.
[4] D. Barbara and T. Imielinski, “Sleepers and Workaholics: Caching Strategies in Mobile Environments,” Proc. ACM SIGMOD, pp. 1-12, May 1994.
[5] D. Beneventano, S. Bergamaschi, C. Sartori, and M. Vincini, “Odb-qoptimizer: A Tool for Semantic Query Optimization in Oodb,” Proc. Int'l Conf. Data Eng., ICDE '97, pp. 578–578, Apr. 1997.
[6] U.S. Chakravarthy, J. Grant, and J. Minker, “Logic-based Approach to Semantic Query Optimization,” ACM Trans. Database Systems, vol. 15, no. 2, pp. 162–207, 1990.
[7] U.S. Chakravarthy, J. Grant, and J. Minker, “Semantic Query Optimization: Additional Constraints and Control Strategies,” Proc. Expert Database Systems, L. Kerschberg, ed., pp. 259–269, Apr. 1986.
[8] U. Chakravarthy,“Foundations of semantic query optimization,” ed. by J. Minker, Foundations of Deductive Databases and Logic Programming.San Francisco: Morgan Kaufmann, 1988.
[9] S. Chaudhuri, R. Krishnamurthy, S. Potamianos, and K. Shim, "Optimizing Queries with Materialized Views," Proc. 11th Int'l Conf. Data Eng.,Taipei, Taiwan, 1995.
[10] S. Chaudhuri and K. Shim, “Query Optimization in the Presence of Foreign Functions,” Proc. 19th Conf. Very Large Data Bases, pp. 526–542, 1993.
[11] C.M. Chen and N. Roussopoulos, “The Implementation and Performance Evaluation of the ADMS Query Optimizer: Integrating Query Result Caching and Matching,” Proc. Fourth Int'l Conf. Extending Database Technology, 1994.
[12] S. Dar, M.J. Franklin, B.T. Jonsson, D. Shrivastava, and M. Tan, “Semantic Data Caching and Replacement,” Proc. VLDB, pp. 330-341, 1996.
[13] Object Database Standard: ODMG-93. release 1.2, R.G.G. Cattell, ed., Morgan Kaufman, 1996.
[14] L. Fegaras, “Query Unnesting in Object-Oriented Databases,” Proc. ACM Special Interest Group Management of Data, pp. 49–60, 1998.
[15] D. Florescu, “Design and Implementation of the Flora Object Oriented Query Optimizer,” PhD thesis, Dept. of Computer Science, Univ. of Paris 6, 1996.
[16] D. Florescu, L. Raschid, and P. Valduriez, “Using Heterogeneous Equivalences for Query Rewriting in Multidatabase Systems,” Proc. Int'l Conf. Cooperating Information Systems, 1995.
[17] D. Florescu, L. Raschid, and P. Valduriez, “Answering Queries Using Oql View Expressions,” Proc. Workshop Materialized Views: Techniques and Applications, in conjunction with the ACM Special Interest Group Management of Data Int'l Conf., 1996.
[18] D. Florescu, L. Raschid, and P. Valduriez, “A Methodology for Query Reformulation in Cis Using Semantic Knowledge,” Int'l J. Cooperating Information Systems, 1996.
[19] T. Gaasterland and J. Lobo, “Processing Negation and Disjunction in Logic Programs through Integrity Constraints,” J. Intelligent Information Systems, vol. 2, no. 3, 1993.
[20] V. Gaede and O. Gunther, “Efficient Processing of Queries Containing User-Defined Predicates,” Proc. Int'l Conf. Deductive and Object-Oriented Databases, pp. 281–298, 1995.
[21] J. Grant and T. Sellis, “Extended Database Logic: Complex Objects and Deduction,” Information Sciences, vol. 52, pp. 85–110, 1990.
[22] A. Gupta, I.S. Mumick, and K.A. Ross, "Adapting Materialized Views after Redefinitions," Proc. ACM SIGMOD Int'l Conf. Management of Data,San Jose, Calif., pp. 211-222, 1995.
[23] M.T. Hammer and S.B. Zdonik, “Knowledge-Based Query Processing,” Proc. Sixth Int'l Conf. Very Large Data Bases, pp. 137–147, Oct. 1980.
[24] A. Keller and J. Basu, "A Predicate-Based Caching Scheme for Client-Server Database Architecture," The VLDB J., Jan. 1996, pp. 35-47.
[25] A. Kemper and G. Moerkotte, “Access Support in Object Bases,” Proc. ACM-SIGMOD Int'l Conf. Management of Data, pp. 364-374, 1990.
[26] J.J. King, “Quist: A System for Semantic Query Optimization in Relational Databases,” Proc. Seventh Int'l Conf. Very Large Data Bases, pp. 510–517, Sept. 1981.
[27] L.V.S. Lakshmanan and R. Missaoui, “On Semantic Query Optimization in Deductive Databases,” Proc. IEEE Int'l Conf. Data Eng., pp. 368–375, 1992.
[28] S. Lee and J. Han, “Semantic Query Optimization in Recursive Databases,” Proc. IEEE Int'l Conf. Data Eng., pp. 444–451, 1988.
[29] Y.-W. Lee and S.I. Yoo, “Semantic Query Optimization for Object Queries,” Proc. Int'l Conf. Deductive and Object-Oriented Databases, pp. 467–484, 1995.
[30] A.Y. Levy, D. Srivastava, and T. Kirk, “Data Model and Query Evaluation in Global Information Systems,” J. Intelligent Information Systems, special issue on networked information discovery and retrieval, vol. 5, no. 2, 1995.
[31] A.Y. Levy, A.O. Mendelzon, and Y. Sagiv, “Answering Queries Using Views,” Proc. ACM Symp. Principles of Database Systems, pp. 95-104, May 1995.
[32] A.Y. Levy and Y. Sagiv, “Semantic Query Optimization in Datalog Programs,” Proc. ACM Symp. Principles of Database Systems, 1995.
[33] D. Maier, S. Daniel, T. Keller, B. Vance, G. Graefe, and W.J. McKenna, “Challenges for Query Processing in Object-Oriented Databases,” Query Processing for Advanced Database Systems, J.C. Freytag, D. Maier, and G. Vossen, eds., pp. 337–381, Morgan Kaufmann, 1994.
[34] J.R. McSkimin and J. Minker, “The Use of a Semantic Network in Deductive Question-Answering Systems,” Proc. Fifth Int'l Joint Conf. Artificial Intelligence, pp. 50–58, 1977.
[35] H.H. Pang, H.J. Lu, and B.C. Ooi, “An Efficient Semantic Query Optimization Algorithm,” Proc. IEEE Int'l Conf. Data Eng., pp. 326–335, 1991.
[36] X. Qian, “Query Folding,” Proc. 12th Int'l Conf. Data Eng., pp. 48–55, 1996.
[37] S.T. Shenoy and Z.M. Ozsoyoglu, “Design and Implementation of a Semantic Query Optimizer,” IEEE Trans. Knowledge and Data Eng., vol. 1, no. 3, pp. 344–361, 1989.
[38] M. Stonebraker and G. Kemnitz,"The POSTGRES next-generation database management system," Comm. ACM, vol. 34, no. 10, pp. 78-92, Oct. 1991.
[39] H.Z. Yang and P.-Å Larson, “Query Transformation for PSJ-Queries,” Proc. 13th Int'l Conf. Very Large Data Bases, pp. 245–254, 1987.
[40] J.P. Yoon and L. Kerschberg, “Semantic Query Optimization in Deductive Object-Oriented Databases,” Proc. Third Int'l Conf. Deductive and Object-Oriented Databases, pp. 169–182, 1993.
[41] S.C. Yoon, I.Y. Song, and E.K. Park, “Semantic Query Processing in Object-Oriented Databases Using Deductive Approach,” Proc. Int'l Conf. Information and Knowledge Management, pp. 150–157, 1995.
[42] Readings in Object-Oriented Database Systems, S.B. Zdonik and D. Maier, eds., Morgan Kaufmann, 1990.

Index Terms:
Datalog, integrity constraints, logic query, methods in object DBMS, object DBMS, ODL, ODMG, OQL, semantic query optimization (SQO), semantic residues.
John Grant, Jarek Gryz, Jack Minker, Louiqa Raschid, "Logic-Based Query Optimization for Object Databases," IEEE Transactions on Knowledge and Data Engineering, vol. 12, no. 4, pp. 529-547, July-Aug. 2000, doi:10.1109/69.868906
Usage of this product signifies your acceptance of the Terms of Use.