Abstract

Many database queries can be formulated in terms of expressions whose operands represent tables of information (relations) and whose operators are the relational operations select, project, and join. This paper studies the equivalence problem for these relational expressions, with expression optimization in mind. A matrix, called a tableau, is proposed as a natural representative for the value of an expression. It is shown how tableaux can be made to reflect functional dependencies among attributes. A polynomial time algorithm is presented for the equivalence of tableaux that correspond to an important subset of expressions, although the equivalence problem is shown to be NP-complete under slightly more general circumstances.

Get full access to this article

View all available purchase options and get full access to this article.

References

1.
A. V. Aho, C. Beeri, J. D. Ullman, The theory of joins in relational databases (extended abstract), 18th Annual Symposium on Foundations of Computer Science (Providence, R.I., 1977), IEEE Comput. Sci., Long Beach, Calif., 1977, 107–113
2.
Alfred V. Aho, John E. Hopcroft, Jeffrey D. Ullman, The design and analysis of computer algorithms, Addison-Wesley Publishing Co., Reading, Mass.-London-Amsterdam, 1975x+470
3.
A. V. Aho, Ravi Sethi, J. D. Ullman, R. Rustin, Code optimization and finite Church-Rosser systemsDesign and optimization of compilers (Courant Comput. Sci. Sympos. 5, New York Univ., New York, 1971), Prentice-Hall, Englewood Cliffs, N. J., 1972, 89–105. Prentice-Hall Series in Automat. Comput
4.
W. W. Armstrong, Dependency structures of data base relationshipsInformation processing 74 (Proc. IFIP Congress, Stockholm, 1974), North-Holland, Amsterdam, 1974, 580–583
5.
P. A. Bernstein, Synthesizing third normal form relations from functional dependencies, ACM Trans. on Database Sys., 1 (1976), 277–298
6.
P. A. Bernstein, C. Beeri, An algorithmic approach to normalization of relational database schemes, TR, CSRG-73, Computer Science Research Group, University of Toronto, 1976, Sept.
7.
C. Beeri, R. Fagin, J. H. Howard, A complete axiomatization for functional and multivalued dependencies, Proc. ACM SIGMOD International Conference on the Management of Data, 1977, 47–61, August
8.
Ashok K. Chandra, Philip M. Merlin, Optimal implementation of conjunctive queries in relational data bases, Conference Record of the Ninth Annual ACM Symposium on Theory of Computing (Boulder, Colo., 1977), Assoc. Comput. Mach., New York, 1977, 77–90
9.
E. F. Codd, A relational model for large shared data banks, Comm. ACM, 13 (1970), 377–387
10.
E. F. Codd, R. Rustin, Further normalization of the data base relational modelData Base Systems, Prentice-Hall, Englewood Cliffs, NJ, 1972, 33–64
11.
E. F. Codd, R. Rustin, Relational completeness of data base sublanguagesData Base Systems, Prentice-Hall, Englewood Cliffs, NJ, 1972, 65–98
12.
S. A. Cook, The complexity of theorem proving procedures, Proc. 3rd Annual ACM Symposium on Theory of Computing, 1971, 151–158, May
13.
C. J. Date, An Introduction to Database Systems, Addison-Wesley, Reading, MA, 1977
14.
C. Delobel, Ph.D. Thesis, Contributions theorétiques à la conception d'un système d'informations, Univ. of Grenoble, 1973, Oct.
15.
R. Fagin, Multivalued dependencies and a new normal form for relational data-bases, ACM Trans. Database Sys., 2 (1977), 262–278
16.
Michael R. Garey, David S. Johnson, Computers and intractability, W. H. Freeman and Co., San Francisco, Calif., 1979x+338, A Guide to the Theory of NP-Completeness
17.
P. A. V. Hall, Optimization of a single relational expression in a relational data-base system, IBM J. Res. Develop., 20 (1976), 244–257
18.
Richard M. Karp, R. E. Miller, J. W. Thatcher, Reducibility among combinatorial problemsComplexity of computer computations (Proc. Sympos., IBM Thomas J. Watson Res. Center, Yorktown Heights, N.Y., 1972), Plenum, New York, 1972, 85–103
19.
J. Minker, Performing inferences over relational databases, Proc. ACM SIGMOD International Conference on Management of Data, San Jose, California, 1975, 79–91, May
20.
Frank P. Palermo, J. T. Tou, A data base search problemInformation systems (Fourth Internat. Sympos. Comput. and Information Sci., Miami Beach, Fla., 1972), Plenum Press, New York, 1974, 67–101
21.
R. M. Pecherer, Efficient evaluation of expressions in a relational algebra, Proc. ACM Pacific Conf., 1975, 44–49, April
22.
J. Rissanen, Independent components of relations, ACM Trans. Database Sys., 2 (1977), 317–325
23.
J. M. Smith, P. Y.-T. Chang, Optimizing the performance of a relational algebra database interface, Comm. ACM, 18 (1975), 568–579
24.
M. Stonebraker, L. A. Rowe, Observations on data manipulation languages and their embedding in general purpose programming languages, 2 TR UCB/ERL M77-53, University of California, Berkeley, 1977, July
25.
E. Wong, K. Youssefi, Decomposition—a strategy for query processing, ACM Trans. Database Sys, 1 (1976), 223–241
26.
C. Zaniolo, Analysis and design of relational schemata for database systems, Tech. Rept., UCLA-ENG-7769, Department of Computer Science, UCLA, 1976, July
27.
M. M. Zloof, Query-by-Example: the invocation and definition of tables and forms, Proc. ACM International Conf. on Very Large Data Bases, 1975, 1–24, Sept.

Information & Authors

Information

Published In

cover image SIAM Journal on Computing
SIAM Journal on Computing
Pages: 218 - 246
ISSN (online): 1095-7111

History

Submitted: 23 March 1978
Published online: 13 July 2006

Authors

Affiliations

Metrics & Citations

Metrics

Citations

If you have the appropriate software installed, you can download article citation data to the citation manager of your choice. Simply select your manager software from the list below and click Download.

Cited By

View Options

View options

PDF

View PDF

Media

Figures

Other

Tables

Share

Share

Copy the content Link

Share with email

Email a colleague

Share on social media