This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Aggregates in the Temporal Query Language TQuel
October 1993 (vol. 5 no. 5)
pp. 826-842

This paper defines new constructs to support aggregation in the temporal query language TQuel and presents their formal semantics in the tuple relational calculus. A formal semantics for Quel aggregates is defined in the process. Multiple aggregates; aggregates appearing in the where, when, and valid clauses; nested aggregation; and instantaneous, cumulative, moving window, and unique variants are supported. These aggregates provide a rich set of statistical functions that range over time, while requiring minimal additions to TQuel and its semantics. We show how the aggregates may be supported in an historical algebra, both in a batch and in an incremental fashion, demonstrating that implementation is straightforward and efficient.

[1] M. Adiba and N. B. Quang, "Historical multimedia databases," inProc. 12th Inc. Conf. Very Large Data Bases, 1986, pp. 63-70.
[2] I. Ahn and R. Snodgrass, "Performance evaluation of a temporal data-base management system," inProc. ACM-SIGMOD Conf. Management of Data, May 1987, pp. 96-107.
[3] I. Ahn and R. Snodgrass, "Performance analysis of temporal queries,"Information Sciences, vol. 49, pp. 103-146, 1989.
[4] G. Ariav, "A temporal oriented data model,"ACM Trans. Database Syst., vol. 11, no. 4, pp. 499-527, Dec. 1986.
[5] J. Ben-Zvi, "The time relational model," Ph.D. dissertation, Comput. Sci. Dept., UCLA, USA, 1982.
[6] J. Blakeley, P. Larson, and F. Tompa, "Efficiently updating materialized views," inProc. ACM-SIGMOD Int. Conf Management of Data, Washington, May 28-30, 1986.
[7] S. Ceri and G. Gottlob, "Translating SQL into relational algebra: Optimization, semantics, and equivalence of SQL queries,"IEEE Trans. Software Eng., vol. SE-11, pp. 324-345, Apr. 1985.
[8] E. F. Codd, "Relational completeness of data base sublanguages," inData Base Systems, vol. 6 of Courant Computer Symposia Series, Englewood Cliffs, N. J.: Prentice Hall, 1972, PP. 65-98.
[9] C. J. Date,A Guide to INGRES. Reading, MA: Addison-Wesley, 1987.
[10] C. J. Date,An Introduction to Relational Database Systems, 4th ed. Reading, MA: Addison-Wesley, 1990, p. 854.
[11] U. Dayal, "Of nests and trees: A unified approach to processing queries that contain nested subqueries, aggregates, and quantifiers," inProc. Conf. Very Large Databases, P. Hammersley, Ed., Sept. 1987, pp. 197-208.
[12] C. E. Dyreson and R. T. Snodgrass, "Valid-Time indeterminacy," inProc. 9th Int. Conf. Data Engineering, pp. 335-343, Apr. 1993.
[13] R. Elmasri and S. B. Navathe,Fundamentals of Database Systems. Redwood City, CA: Benjamin/Cummings, 1989.
[14] R. Elmasri and G. Wuu, "A temporal model and query language for ER databases," inProc. 6th Int. Conf. Data Engineering, pp. 76-83, Feb. 1990.
[15] R. Epstein, "Techniques for processing of aggregates in relational database systems,"UCB/ERL M7918, Computer Science Department, University of California, Berkeley, Feb. 1979.
[16] J. C. Freytag and N. Goodman, "Translating aggregate queries into iterative programs," inProc. Conf. Very Large Databases, Y. Kambayaski, Ed., Aug. 1986, pp. 138-146.
[17] S. K. Gadia and J. H. Vaishnav, "A query language for a homogeneous temporal database," inProc. ACM PODS Conf., 1985.
[18] E. N. Hanson, "User-defined aggregates in the relational database system INGRES," Master's thesis, Computer Science Department, University of California, Berkeley, Dec. 1984.
[19] E. N. Hanson, "Efficient support for rules and derived objects in relational database systems," PhD. dissertation, Computer Science Department, University-of California, Berkeley, Aug. 1987.
[20] E. Hanson, "A performance analysis of view materialization strategies,"ACM-SIGMOD Int. Conf. Management of Data, San Francisco, CA, May 28-30, 1987.
[21] G. D. Held, M. Stonebraker and E. Wong, "INGRES--A relational data base management system," inProc. AFIPS National Computer Conf., May 1975, pp. 409-416.
[22] W.C. Hou, G. Ozsoyoglu, and B.K. Taneja, "Processing aggregate relational queries with hard time constraints," inProc. ACM SIGMOD Int. Conf. Management of Data, June 1989.
[23] W.-C. Hou and G.Özsoyoglu, and B. K. Taneja, "Statistical estimators for aggregate relation algebra queries,"ACM Trans. Database Syst., vol. 16, pp. 600-654, Dec. 1991.
[24] IBM, "SQL/Data-system, concepts and facilities," Rep. GH24-5013-0. Jan. 1981.
[25] C. S. Jensen, L. Mark, and N. Roussopoulos, "Incremental implementation model for relational databases with transaction time,"IEEE Trans. Knowledge Data Eng., vol. 3, pp. 461-473, Dec. 1991.
[26] C. S. Jensen and R. Snodgrass, "Temporal specialization and generalization,"IEEE Trans. Knowledge Data Eng., to be published.
[27] S. Jones, P. Mason, and R. Stamper, "LEGOL 2.0: A relational specification language for complex rules,"Information Systems, vol. 4, pp. 293-305, Nov. 1979.
[28] W. Kiessling, "SQL-like and Quel-like correlation queries with aggregates revisited,"Tech. Rep. UCB/ERL Memo 84/75, Electronics Research Laboratory, Sept. 1984.
[29] W. Kiesling, "On semantic reefs and efficient processing of correlation queries with aggregates," inProc. Conf. Very Large Databases, A. Pirotte and Y. Vassiliou, Eds. Stockholm, Sweden: Aug. 1985, pp. 241-250.
[30] A. Klug, "Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate Functions,"J. ACM, Vol. 29, No. 3, July 1982, pp. 699-717.
[31] N. A. Lorentzos and R. G. Johnson, "An extension of the relational model to support generic intervals," inProc. Int. Conf. on Extending Database Technology, Italy, Mar. 1988, pp. 528-542.
[32] L.E. McKenzie, "An algebraic language for query and update of temporal databases," Ph.D. dissertation, 88-050, Univ. of North Carolina at Chapel Hill, Dep. Comput. Sci., CB 3175, Sitterson Hall, Chapel Hill, NC 27599-3175, Oct. 19880.
[33] E. McKenzie and R. Snodgrass, "Schema evolution and the relational algebra,"Information Systems, vol. 15, pp. 207-232, June 1990.
[34] E. Makenzie and R. Snodgrass, "Supporting valid time in an historical relational algebra: Proofs and extensions,Tech. Rep. TR 91-15, Department of Computer Science, University of Arizona, Aug. 1991.
[35] R. Nakano, "Translation with optimization from relational calculus to relational algebra having aggregate functions,"ACM Trans. Database Syst., vol. 15. pp. 518-557, Dec. 1990.
[36] S. B. Navathe and R. Ahmed, "A temporal relational model and a query language,"Inform. Sci., vol. 49, pp. 147-175, Oct. 1989.
[37] M. Negri, G. Pelagatti, and L. Sbattella, "Formal semantics of SQL queries," inACM Trans. on Database Syst., vol. 16, no. 3, 1991.
[38] P.E. O'Neil, "Revisiting DBMS benchmarks,"Datamation, vol. 35, pp. 47-54, Sept. 1989.
[39] A. Rosenthal and D. Reiner, "Extending the algebraic framework of query processing to handle outerjoins, " inProc. Tenth Int. Conf. on Very Large Data Bases, Aug. 1984.
[40] N. Roussopoulos, " The incremental access method of ViewCache: Concept and cost analysis," Dep. Comput. Sci. Inst. Advanced Computer Studies, Univ. Maryland, College Park, Tech. Rep. UMIACS-TR-89-15, CS-TR-2193, Mar. 1989; to appear inACM Trans. Database Syst.
[41] E. A. Rundensteiner and L. Bic, "Aggregates in possibilistic databases," inProc. Conf. Very Large Databases, 1989.
[42] E. A. Rundensteiner and L. Bic, "Evaluating aggregates in possibilistic relational databases,"Data and Knowledge Eng. J., vol. 7, pp. 239-267, 1992.
[43] S. Sarda, "Extensions to SQL for historical databases,"IEEE Trans. Knowledge Data Eng., vol. 2, pp. 220-230, June 1990.
[44] E. Sciore, "Using annotations to support multiple kinds of versioning in an object-oriented database system,"ACM Trans. Database Syst., vol. 16, pp. 417-438, Sept. 1991.
[45] A. Segev and A. Shoshani, "Logical modeling of temporal data," inProc. ACM-Sigmod Int. Conf. on Management of Data, 1987.
[46] R. Snodgrass and I. Ahn, "Temporal databases,"IEEE Comput. Mag., pp. 35-42, Sept. 1986.
[47] R. Snodgrass, "The temporal query language TQuel,"ACM Trans. Database Syst., vol. 12, no. 2, June 1987.
[48] R. Snodgrass, S. Gomez, and E. McKenzie, "Aggregates in the temporal query language TQuel,"Tech. Rep. TR-89-26, Department of Computer Science, University of Arizona, Nov. 1989.
[49] M. Stonebraker, "Implementation of integrity constraints and views by query modification," inProc. 1975 ACM-SIGMOD Int. Conf. Management of Data, San Jose, CA, June 1975.
[50] M. Stonebraker,et al., "The design and implementation of INGRES,"ACM Trans. Database Syst., vol. 1, no. 3, Sept. 1976.
[51] A. U. Tansel and M. E. Arkun, "HQuel, A query language for historical relational databases," inProc. Third Int. Workshop on Statistical and Scientific Databases, July 1986.
[52] A. U. Tansel and M. E. Arkun, "Aggregation operations in historical relational databases," inProc. Third Int. Workshop on Statistical and Scientific Databases, July 1986.
[53] A. U. Tansel, "A statistical interface for historical relational databases," inData Eng., pp. 538-546, Feb. 1987.
[54] J. D. Ullman,Database and Knowledge-base Systems. Rockville, MD: Computer Science Press, 1988.
[55] S. Wensel, "The POSTGRES reference manual,"Tech. Rep. UCB/ERL M88/20, University of California, Mar. 1988.
[56] G. Ozsoyoglu and Z. Ozsoyoglu, "Statistical database query languages,"IEEE Trans. Software Eng., vol. SE-11, no. 10, pp. 1071- 1080, Oct. 1985.
[57] G. Ozsoyoglu, Z. M. Ozsoyoglu, and V. Matos, "Extending relational algebra and relational calculus with set-valued attributes and aggregate functions,"ACM Trans. Database Syst., vol. 12, no. 4, pp. 566-592, Dec. 1987.
[58] G.Özsoyoglu, Z. M.Özsoyoglu, and V. Matus, "An extension of relational algebra for summary tables," inProc. Second Int. Workshop on SDB Management, Sept. 1983, pp. 202-212.
[59] Ozsoyoglu, Z.M., and G. Ozsoyoglu, "Summary-Table-By-Example: A Database Query Language for Manipulating Summary Data,"First IEEE Int'l Data Eng. Conf., IEEE CS Press, Los Alamitos, Calif., Order No. 533 (microfiche only), 1984, pp. 193- 202.
[60] Proc. First Int. Workshop on Statistical Database Management, H. K. Wong, Ed., 1981.
[61] Proc. Second Int. Workshop on Statistical Database Management, J. McCarthy, Ed., 1983.

Index Terms:
temporal query language; TQuel; temporal database; formal semantics; tuple relational calculus; nested aggregation; unique variants; statistical functions; historical algebra; temporal partitioning; valid time; query languages; relational databases; temporal databases
Citation:
R. Snodgrass, S. Gomez, E. McKenzie, "Aggregates in the Temporal Query Language TQuel," IEEE Transactions on Knowledge and Data Engineering, vol. 5, no. 5, pp. 826-842, Oct. 1993, doi:10.1109/69.243512
Usage of this product signifies your acceptance of the Terms of Use.