This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Semantic Query Optimization for Tree and Chain Queries
February 1994 (vol. 6 no. 1)
pp. 136-151

Semantic query optimization, or knowledge-based query optimization, has received increasing interest in recent years. The authors provide an effective and systematic approach to optimizing queries by appropriately choosing semantically equivalent transformations. Basically, there are two different types of transformations: transformations by eliminating unnecessary joins, and transformations by adding/eliminating redundant beneficial/nonbeneficial selection operations (restrictions). A necessary and sufficient condition to eliminate a single unnecessary join is provided. We prove that it is /spl Nscr//spl Pscr/-/spl Cscr/omplete to eliminate as many unnecessary joins as possible for various types of acyclic queries with the exception of the closure chain queries whose query graphs are chains and all equi-join attributes are distinct. An algorithm is provided to minimize the number of joins in tree queries. This algorithm has an important property that, when applied to a closure chain query, it will yield an optimal solution with the time complexity O(n*m), where n is the number of relations referenced in the chain query, and m is the time complexity of a restriction closure computation.

[1] U. S. Chakravarthy, D. Fishman, and J. Minker, "Semantic query optimization in expert systems and database systems," inProc. First Workshop Expert Database Systems, Kiawah Island, SC, Oct. 1984; also inExpert Database Systems, L. Kerschberg, Ed. New York: Benjamin/Cummins, 1986.
[2] U. Chakravarthy, J. Minker, and J. Grant, "Semantic query optimization: Additional constraints and control strategies," inExpert Database System, L. Kerschberg, Ed. Culver City, CA: Benjamin/ Cummings Publishing Co., Inc., 1987, pp. 345-379.
[3] U.S. Chakravarthy, J. Grant, and J. Minker, "Logic-based approach to semantic query optimization,"ACM Trans. Database Syst., vol. 15, pp. 162-207, 1990.
[4] E. F. Codd, "A relational model of data for large shared data banks,"Commun. ACM, pp. 377-387, June 1970.
[5] C. J. Date,An Introduction to Database Systems, vols. 1 and 2. Reading, MA: Addison-Wesley, vol. 1, 1981, vol. 2, 1983.
[6] H. Decker, "Integrity enforcement on deductive databases," inExpert Database System, L. Kerschberg, Ed. Culver City, CA: Benjamin/Cummings Publishing Co., Inc., 1987, pp. 381-395.
[7] H. Ehrich, U. Lipeck, and M. Gogolla, "Specification, semantics, and enforcement of dynamic database constraints," inProc. 10th Int. Conf. VLDB, 1984, pp. 301-308.
[8] M. R. Garey and D. S. Johnson,Computers and Intractability: A Guide to Theory of NP-Completeness. San Francisco, CA: Freeman, 1979.
[9] G. Graefe, "Research problems in database query optimization," inProc. Workshop Database Query Optimization, G. Graefe, Ed., May 1989, pp. 1-11.
[10] L. M. Haas, J. C. Freytag, G. M. Lohman, and H. Pirahesh, "Extensible query processing in Starburst," inProc. ACM SIGMOD.Portland, OR, May 1989, pp. 377-388.
[11] M. M. Hammer and D. J. McLeod, "Semantic integrity in relational database systems," inProc. 1st Int. Conf. Very Large Databases, Sept. 1975, p. 25-47.
[12] M. M. Hammer and S. B. Zdonik, "Knowledge-based query processing," inProc. 6th Int. Conf. Very Large Databases, Sept. 1980, pp. 137-147.
[13] A. Hevner, "The optimization of query processing in distributed database systems," Ph.D. dissertation, Purdue Univ., West Lafayette, IN, Dec. 1979.
[14] M. Jarke, J. Clifford, and Y. Vassiliou, "An optimizing prolog front-end to a relational query system," inProc. ACM-SIGMOD 1984 Int. Conf. Management of Data, Boston, MA, June 1984, pp. 296-306.
[15] M. Jarke, "External semantic query simplification: A graph-theoretic approach and its implementation in Prolog," inProc. 1st Int. Conf. Expert Database Syst., Kiawah, Isl., SC, Oct. 1984, pp. 467-482.
[16] J. J. King, "Quist: A System for semantic query optimization in relational databases," inProc. 7th Very Large Databases Conf., 1981, pp. 510-517.
[17] J. J. King,Query Optimization by Semantic Reasoning. Ann Arbor, MI: UMI Research Press, 1984.
[18] G. Lohman, C. Mohan, L. Haas, B. Lindsay, P. Selinger, P. Wilms, and D. Daniels, "Query processing in R*," inQuery Processing in Database Systems, W. Kim, D. Batory, and D. Reiner, Eds. New York: Springer-Verlag, 1985.
[19] W. Luk and P. Black, "On cost estimation in processing a query in a distributed system," inProc. IEEE 5th Int. Comput. Software Applicat. Conf., Chicago, IL, New York: IEEE, Nov. 1981, pp. 24-32.
[20] C. V. Malley and S. B. Zdonik, "A knowledge-based approach to query optimization," inExpert Database System, L. Kerschberg, Ed. Culver City, CA: Benjamin/Cummings Publishing Co., Inc., 1987, pp. 329-343.
[21] K. Ono and G. Lohman, "Extensible enumeration of feasible joins for relational query optimization," IBM Res. Rep. RJ 6625, Dec. 1988.
[22] X. Qian and D. Smith, "Integrity constraint reformulation for efficient validation," inProc. 13th VLDB, Brighton, England, Sept. 1987, pp. 417-425.
[23] X. Qian and R. Waldinger, "A transaction logic for database specification," inProc. SIGMOD'88, Chicago, IL, June 1988, pp. 243- 250.
[24] A. Segev, "Global heuristics for distributed query optimization,"IEEE INFOCOM '86, 1986, pp. 388-394.
[25] P. Selinger,et al., "Access path selection in a relational data base system," inProc. 1979 ACM-SIGMOD Int. Conf. Management of Data, Boston, MA, June 1979.
[26] S. T. Shenoy and Z. M. Ozsoyoglu, "A system for semantic query optimization," inProc. ACM SIGMOD, May 1987, pp. 181-195.
[27] S. T. Shenoy and Z. M. Ozsoyoglu, "Design and implementation of a semantic query optimizer,"IEEE Trans. Knowledge Data Eng., pp. 344-361, Sept. 1989.
[28] M. Siegel, "Automatic rule derivation for semantic query optimization," inProc. 2nd Int. Conf. Expert Database Syst., L. Kerschberg, Ed. The George Mason Foundation, Fairfax, Virginia, 1988, pp. 371-386.
[29] M. Stonebraker, A. Jhingran, J. Goh, and S. Potamianos, "On rules, procedures, caching and views in data base systems," Tech. Rep. UCB/ERL M89/119, Univ. California, Berkeley, Oct. 1989.
[30] W. Sun, "A Prolog implementation of the closure computation and domain knowledge for semantic knowledge base," Tech. Rep., Dept. EECS, Univ. Illinois, Chicago, Dec. 1988.
[31] J. D. Ullman,Database and Knowledge-base Systems. Rockville, MD: Computer Science Press, 1988.
[32] B. Wah, "File placement on distributed computer systems,"IEEE Trans. Comput., vol. 17, pp. 23-32, Jan. 1984.
[33] B. Wah and Y. Lien, "The file-assignment and query processing problems in local multiaccess networks," inProc. Int. Conf. Data Eng., Los Angeles, CA, Apr. 1984, pp. 228-235.
[34] K.-Y. Whang and R. Krishnamurthy, "Query optimization in a memory-resident domain relational calculus system,"ACM Trans. Database Syst., vol. 15, no. 1, pp. 67-95, Mar. 1990.
[35] G. Wiederhold and X. Qian, "Modeling Asynchrony in Distributed Databases,"Proc. 1987 Int'l Conf. Data Eng., CS Press, Los Alamitos, Calif., Order No. FJ762, 1987, pp. 246-250.
[36] E. Wong and K. Youssefi, "Decomposition: A strategy for query processing,"ACM Trans. Database Syst., vol. 1, no. 3, Sept. 1976.
[37] S. B. Yao, "Optimization of query evaluation algorithms,"ACM Trans. Database Syst., vol. 4, no. 2, pp. 133-155, June 1979.
[38] C. Yuet al., "Two Surprising Results in Processing Simple Queries in Distributed Databases,"IEEE COMPSAC, Nov. 1982, pp. 377- 384.
[39] C. Yuet al., "A Promising Approach to Distributed Query Processing," inProc. Berkeley Conf. Distribut. Databases, Feb. 1982, pp. 363-390.
[40] C. Yu and C. Chang, "Distributed query processing,"ACM Comput. Surveys, vol. 16, no. 4, pp. 399-433, Dec. 1984.
[41] C. Yu, C. Chang, M. Templeton, D. Brill, and E. Lund, "On the design of a distributed query processing strategy," inProc. ACM SIGMOD, San Jose, CA, May 1983, pp. 30-39.
[42] C. T. Yu, C. C. Chang, M. Templeton, D. Brill, and E. Lund, "Query processing in a fragmented relational distributed system: Mermaid,"IEEE Trans. Software Eng., vol. SE-11, no. 8, pp. 795- 810, Aug. 1985.
[43] C. Yu et al., "Algorithms to Process Distributed Queries in Fast Local Networks,"IEEE Trans. Computers, Oct. 1987, pp. 1153-1164.
[44] C. Yu and M. Ozsoyoglu, "An algorithm for tree query membership for a distributed query,"IEEE COMPSAC, Nov. 1979, pp. 306-312.
[45] C. Yu and M. Ozsoyoglu, "On determining tree query membership of a distributed query,"Canadian J. Oper. Res. Inform. Process., pp. 211-218, Aug. 1984.
[46] C. Yu and W. Sun, "Automatic knowledge acquisition for semantic query optimization,"IEEE Trans. Knowledge Data Eng., pp. 362- 375, Sept. 1989.

Index Terms:
query processing; knowledge based systems; database theory; computational complexity; trees (mathematics); semantic query optimization; chain queries; tree queries; knowledge-based query optimization; semantically equivalent transformations; unnecessary joins; redundant beneficial/nonbeneficial selection operations; acyclic queries; closure chain queries; query graphs; equi-join attributes; time complexity; restriction closure computation; NP complete
Citation:
W. Sun, C. Yu, "Semantic Query Optimization for Tree and Chain Queries," IEEE Transactions on Knowledge and Data Engineering, vol. 6, no. 1, pp. 136-151, Feb. 1994, doi:10.1109/69.273033
Usage of this product signifies your acceptance of the Terms of Use.