[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
article
Free access

Incremental computation of nested relational query expressions

Published: 01 June 1995 Publication History

Abstract

Efficient algorithms for incrementally computing nested query expressions do not exist. Nested query expressions are query expressions in which selection/join predicates contain subqueries. In order to respond to this problem, we propose a two-step strategy for incrementaly computing nested query expressions. In step (1), the query expression is transformed into an equivalent unnested flat query expression. In step (2), the flat query expression is incrementally computed. To support step (1), we have developed a very concise algebra-to-algebra transformation algorithm, and we have formally proved its correctness. The flat query expressions resulting from the transformation make intensive use of the relational set-difference operator. To support step (2), we present and analyze an efficient algorithm for incrementally computing set differences based on view pointer caches. When combined with existing incremental algorithms for SPJ queries, our incremental set-difference algorithm can be used to compute the unnested flat query expressions efficiently. It is important to notice that without our incremental set-difference algorithm the existing incremental algorithms for SPJ queries are useless for any query involving the set-difference operator, including queries that are not the result of unnesting nested queries.

References

[1]
ASTRAHAN, M. M., SELLINGER, P. G., CHAMBERLAIN, D. D., LORIE, R. A., AND PRICE, T.G. 1979 Access path selection in a relational database management system. In Proceedings (1979) SIGMOD Conference, 22-34.
[2]
BS~KGAARD, L. 1993 Specification and efficient monitoring of transactions dependencies. R-93- 2026, Ph.D. dissertation, Dept. of Mathematms and Computer Science, Aalborg Univ., Denmark.
[3]
BLAKELEY, J. A., AND MARTIN, N.L. 1990. Join index, materialized view, and hybrid-hash join. A performance analysis. In Proceedings of the 6th Internatzonal Conference on Data Engineer- ~ng (Los Angeles, Feb. 5-9), 256 263.
[4]
BLAKELEY, J. A., LARSON, P.-A., AND TOlvlPA, F.W. 1986. Efficiently updating materialized views. In Proceedings SIGMOD International Conference on Management of Data (Washington, D.C.), 61-71.
[5]
BULTZINGSLOEWEN, G.v. 1987. Translating and optimizing SQL queries having aggregates. In 1987 Proceedings. Conference on Very Large Data Bases (Brighton, U.K./, 235-243.
[6]
CAREY, M., SHEKITA, E., LAPIS, G., LINDSAY, B., AND MCPHERSON, J. 1990. An incremental join attachment for starburst. In Proceedzngs of the 16th Internahonal Conference on Very Large Data Bases (Brisbane, Australia, Aug. 13-16), 662-673.
[7]
CEm, S., AND GOTTLOB, G. 1985 Translating SQL into relational algebra: Optimization, se- mantics, and equivalence of SQL queries. IEEE Trans. Softw. Eng. SE-11, 4 (April), 324-345.
[8]
CERI, S., AND WIDOM, J. 1991. Deriving production rules for incremental view maintenance. In Proceedings of the 17th International Conference on Very Large Data Bases (Barcelona, Spain, Sept. 3-6), 577-589.
[9]
COl)D, E.F. 1970.A relational model of data for large shared data banks. Commun ACM 13, 6, 337-387.
[10]
CODD, E.F. 1990. The Relaaonal Model for Database Management. Vers. 2. Addison-Wesley, Reading, Mass.
[11]
COLBY, L.S. 1989 A recursive algebra and query optimizatmn for nested relation. In Proceedings of the 1989 ACM SIGMOD Internatzonal Conference on Management of Data (Portland, Ore., May 31-June 2). ACM, New York, 273-283
[12]
DADASHZADEH, M. 1989. An improved division operator for relational algebra. Inf Syst. 14, 5, 431-437.
[13]
DAYAL, U. 1987. On nests and trees: A unified approach to processing queries that contain nested subqueries, aggregates, and quantifiers. In 1987 Proceedings. Conference on Vel~y Large Data Bases (Brighton, U.K., Sept 1-4, 1987), 197-208.
[14]
GANSKI, R. A., AND WONG, H. K. T. 1987. Optimization of nested SQL queries revisited. In 1987 Proceedings. SIGMOD International Conference on Management of Data (San Francisco, Calif., May 27-29, 1987), 23-33.
[15]
GYSSENS, M. AND VAN GUCHT, D. 1988. The powerset algebra as a result of adding programming constructs to the nested relational algebra. In 1988 ProceedLngs. SIGMOD Internattonal Conference on Management of Data (Chicago, Ill., June 1-3, 1988), 225-232.
[16]
HANSON, E., C~AABOUNI, M., Kin, C.-H., AND WANG, Y.-W. 1990. A predicate matching algorithm for database and rule systems. In Proceedings of the 1990 ACM SIGMOD International Conference on the Management of Data (Atlantic City, N.J., May 23-25, 1990). ACM, New York, 271-280.
[17]
HANSON, E. N. 1987. A performance analysis of view materialization strategies. In 1987 Proceedtngs. SIGMOD International Conference on Management of Data (San Francisco, Calif., May 27-29, 1987), 440-453.
[18]
HANsoN. E N. 1992. Rule condition testing and action execution in ARIAL. In Proceedings of the 1992 ACM SIGMOD International Conference on the Management of Data (San Diego, Calif., June 2-5, 1992). ACM, New York, 49-58.
[19]
JARKE, M. 1985. Common subexpression isolation in multiple query optimization. In Topics iTz Information Systems. Query Processing tn Database Systems, W Kim, D. S. Reiner, and D. S. Batory, Eds. Springer-Verlag, New York, 191-205.
[20]
JARKE, M. AND KOCH, J. 1984. Query optimization in database systems. ACM Comput. Surv. 16, 2 (June), 111-152.
[21]
JENSEN, C. S., MARK, L., AND ROUSSOPOULOS, N. 1991. Incremental implementation model for relational databases with transaction time. IEEE Trans. Knowl. Data Eng. 3, 4 (Dec.), 461-473.
[22]
KIM, W. 1982. On optimizing an SQL-like nested query. ACM Trans. Database Syst. 7, 3 (Sept.), 443-469.
[23]
LINDSAY, B., HAAS, L., PIRAHESH, H., AND WILMS, P. 1986. A snapshot differential refresh algorithm. In Proceedings of the 1986 ACM SIGMOD International Conference on the Management of Data (Washington, D.C., May 28-30, 1986). ACM, New York, 53-60.
[24]
NAmANo, R. 1990. Translation with optimization from relational calculus to relational algebra having aggregate functions. ACM Trans. Database Syst. 15, 4 (Dec.), 518-557.
[25]
NEGRI, M., AND PELAGATTI, G. 1991. Distributive join: A new algorithm for joining relations. ACM Trans. Database Syst. 16, 4 (Dec.), 655-669.
[26]
OMmC~NSK~, E. R. 1989. Heuristms for join processing using nonclustered indexes. IEEE Trans. Softw. Eng. 15, i (Jan.), 18-25.
[27]
C)ZSOYOGLU, G., AND WANG, H. 1989. A relational calculus with set operators, Its safety, and equivalent graphical languages. ACM Trans. Database Syst. 15.
[28]
OZSOYOGLU, G., OZSOYOGLU, Z, M, AND MATOS, Y. 1987. Extending relational algebra and relational calculus with set-valued attributes and aggregate functions. ACM Trans. Database Syst. 12, 4 (Dec.), 566-592.
[29]
Ozsu, T., AND MEECHAN, D.J. 1990. Join processing heuristics in relational database systems. Inf. Syst. 15, 4, 429-444
[30]
PAREDAENS, J., AND VAN GUCHT, D. 1992. Converting nested algebra expressions into fiat algebra expressions. ACM Trans. Database Syst. 17, i (March), 65-93.
[31]
QIAN, X., AND WmDERHOLD, G. 1991. Incremental recomputation of active relational expressions. IEEE Trans. Knowl. Data Eng. 3, 3 (Sept.), 337-341.
[32]
ROSENTHAL, A., CHAKRAVARTHE, S., BLAUSTEIN. B., AND BLAKELEY, J. 1989. Situation monitoring for active databases. In Proceedings of the 15th International Conference on Very Large Data Bases (Amsterdam. Aug. 22-25, 1989), 455-464.
[33]
ROTH, M. A., KORTH, H. F., AND SILBERSCHATZ, A. 1988. Extended relational algebra and calculus for nested relational databases. ACM Trans. Database Syst. 13, 4 (Dec.), 389-417.
[34]
ROUSSOPOULOS, N. 1991. An incremental access method for ViewCache: Concept, algorithms, and cost analysis ACM Trans. Database Syst. 16, 3 (Sept.), 535-563.
[35]
SACCO, G.M. 1986. Fragmentation: A techmque for efficient query processing. ACM Trans. Database Syst. 11, 2 (June), 113-133.
[36]
SCHEK, H -J., AND SCHOLL, M.H. 1986. The relational model with relation-valued attributes Inf Syst 11, 2, 137-146
[37]
SCHOLL, M. H., PAUL, H.-B., AND SCHEK, H.-J. 1987 Supporting flat relations by a nested relational kernel. In 1987 Proceedzngs. Conference on Very Large Data Bases (Brighton, U.K.).
[38]
SETJLIS, T.K. 1986 Global query optimization. In 1986 Proceedings. SIGMOD International Conference on Management of Data (Washington, D.C.)
[39]
SEVERANCE, D. G., AND LOHMAN, G M 1976. Differential files: Their application to the maintenance of large databases ACM Trans. Database Syst 1, 3 (Sept.), 256-267
[40]
SMITH, J. M., AND CHAN6, P Y.-T. 1975. Optimizing the performance of a relational algebra database interface Commun ACM 18, 10, 568-579.
[41]
STONEBRAKER, M., JHINGRAN, A., GOH, J., AND POTAMIANOS, S. 1990. On rules, procedures, caching and views in data base systems. In Proceedings of the 1990 ACM SIcMOD International Conference on Management of Data (Atlantic City, N.J ). ACM, New York, 281 290.
[42]
THOMAS, S. J., AND FISCHER, P.C. 1986. Nested relational structures In Advances tn Comput~ ~ng Research, vol. 3, JAI Press, Greenwich, Conn., 269-307.
[43]
ULLMAN, J D. 1989 Principles of Database and Knowledge-Based Systems. Vols. I and II. Computer Science Press, Rockville, Md
[44]
VALDURIEZ, P. 1987. Join indices. ACM Trans. Database Syst. 12, 2, (June), 218-246.
[45]
WOLFSON, O., DEWAN, H. M, STOLFO, S. J., AND ~EMINI, Y 1991. Incremental evaluation of rules and its relationship to parallelism In Proceedzngs of the 1991 ACM SIGMOD Irzternattonal Conference on the Management of Data (Denver, Colo, June) ACM, New York.

Cited By

View all
  • (2023)Implicit Representation of RelationsTheory of Computing Systems10.1007/s00224-023-10141-z67:6(1156-1196)Online publication date: 1-Dec-2023
  • (2021)NestGPU: Nested Query Processing on GPU2021 IEEE 37th International Conference on Data Engineering (ICDE)10.1109/ICDE51399.2021.00092(1008-1019)Online publication date: Apr-2021
  • (2020)A Scheduling Approach to Incremental Maintenance of Datalog Programs2020 IEEE International Parallel and Distributed Processing Symposium (IPDPS)10.1109/IPDPS47924.2020.00093(864-873)Online publication date: May-2020
  • Show More Cited By

Recommendations

Reviews

Clement R. Attanasio

This extensive paper addresses the computation of nested relational queries that may contain subqueries as operands of set relations, such as in and contains. The authors' solution consists of two steps: transform the query to an equivalent “flat” one, which does not contain nested subqueries; and then apply traditional flat query optimization techniques, in particular, incremental computation rather than recomputation. The paper comprises an extensive roadmap to related work, a categorization of nested query expressions, an algebra that the authors use to prove the correctness of their transformations of nested subqueries to flat queries, and finally a discussion and analysis of the performance advantages of incremental computation. The authors clearly state the constraints within which their analyses apply. Perhaps most significant is that they do not treat queries that contain aggregate functions. Their performance analyses are based on relations of modest size, of the order of six megabytes each. They clearly state that set relations appear in many contexts, but the example they give is of databases that describe two- and three-dimensional objects, where operators like overlaps and contains appear naturally. The paper ends with a description of required future work, including an implementation to validate the performance models and an expansion of the I/O cost model for incremental computation of any relational query, rather than the restricted model reported herein.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Transactions on Database Systems
ACM Transactions on Database Systems  Volume 20, Issue 2
June 1995
126 pages
ISSN:0362-5915
EISSN:1557-4644
DOI:10.1145/210197
  • Editor:
  • Won Kim
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1995
Published in TODS Volume 20, Issue 2

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. incremental computation
  2. nested query expressions
  3. set differences
  4. unnesting
  5. view pointer caches

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)58
  • Downloads (Last 6 weeks)4
Reflects downloads up to 21 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Implicit Representation of RelationsTheory of Computing Systems10.1007/s00224-023-10141-z67:6(1156-1196)Online publication date: 1-Dec-2023
  • (2021)NestGPU: Nested Query Processing on GPU2021 IEEE 37th International Conference on Data Engineering (ICDE)10.1109/ICDE51399.2021.00092(1008-1019)Online publication date: Apr-2021
  • (2020)A Scheduling Approach to Incremental Maintenance of Datalog Programs2020 IEEE International Parallel and Distributed Processing Symposium (IPDPS)10.1109/IPDPS47924.2020.00093(864-873)Online publication date: May-2020
  • (2019)Incremental computation of complex object queriesACM SIGPLAN Notices10.1145/504311.50429436:11(156-165)Online publication date: 27-Feb-2019
  • (2007)SQL query optimization through nested relational algebraACM Transactions on Database Systems (TODS)10.1145/1272743.127274832:3(18-es)Online publication date: 1-Aug-2007
  • (2006)Optimization of Complex Nested Queries in Relational DatabasesProceedings of the 22nd International Conference on Data Engineering Workshops10.1109/ICDEW.2006.106Online publication date: 3-Apr-2006
  • (2005)A nested relational approach to processing SQL subqueriesProceedings of the 2005 ACM SIGMOD international conference on Management of data10.1145/1066157.1066180(191-202)Online publication date: 14-Jun-2005
  • (2003)Efficient computation of subqueries in complex OLAPProceedings 19th International Conference on Data Engineering (Cat. No.03CH37405)10.1109/ICDE.2003.1260790(163-174)Online publication date: 2003
  • (2001)Incremental maintenance of multi-source viewsProceedings of the 12th Australasian database conference10.5555/545538.545539(13-20)Online publication date: 29-Jan-2001
  • (2001)Incremental computation of complex object queriesProceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications10.1145/504282.504294(156-165)Online publication date: 1-Oct-2001
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media