Abstract
Prior work on computing queries from materialized views has focused on views defined by expressions consisting of selection, projection, and inner joins, with an optional aggregation on top (SPJG views). This paper provides a view matching algorithm for views that may also contain outer joins (SPOJG views). The algorithm relies on a normal form for outer-join expressions and is not based on bottom-up syntactic matching of expressions. It handles any combination of inner and outer joins, deals correctly with SQL bag semantics, and exploits not-null constraints, uniqueness constraints and foreign key constraints.
Similar content being viewed by others
References
Bello, R.G., Dias, K., Downing, A., Feenan Jr., J.J., , J.L., Norcott, W.D., Sun, H., Witkowski, A., Ziauddin, M.: Materialized views in Oracle. In: Proceedings of VLDB Conference, pp. 659–664 (1998)
Bhargava, G., Goel, P., Iyer, B.R.: Hypergraph based reorderings of outer join queries with complex predicates. In: Proceedings of SIGMOD Conference, pp. 304–315 (1995)
Chang, J.-Y., Lee, S.-G.: Query reformulation using materialized views in data warehouse environment. In: Proceedings of DOLAP, pp. 54–59 (1998)
Chaudhuri, S., Krishnamurthy, R., Potamianos, S., Shim, K.: Optimizing queries with materialized views. In: Proceedings of ICDE Conference, pp. 190–200 (1995)
Galindo-Legaria,C.: Outerjoins as disjunctions.In: Proceedings of SIGMOD Conference, pp. 348–358 (1994)
Galindo-Legaria, C., Rosenthal, A.: Outerjoin simplification and reordering for query optimization. ACM Tran. Database Syst. 22(1) (1997)
Goel, P., Iyer, B.R.: Sql query optimization: reordering for a general class of queries. In: Proceedings of SIGMOD Conference, pp. 47–56 (1996)
Goldstein, J., Larson, P.-Å.: Optimizing queries using materialized views: a practical, scalable solution. In: Proceedings of SIGMOD Conference, pp. 331–342 (2001)
Larson, P.-Å., Yang, H.Z.: Computing queries from derived relations. In: Proceedings of VLDB Conference, pp. 259–269 (1985)
Larson, P.-Å., Zhou, J.: View matching for outer-join views. In: Proceedings of VLDB Conference, pp. 445–456 (2005)
Levy, A.Y., Mendelzon, A.O., Sagiv, Y., Srivastava, D.: Answering queries using views. In: Proceedings of PODS Conference, pp. 95–104 (1995)
Pottinger, R., Levy, A.Y.: A scalable algorithm for answering queries using views. In: Proceedings of VLDB Conference, pp. 484–495 (2000)
Rao, J., Lindsay, B.G., Lohman, G.M., Pirahesh, H., Simmen, D.E.: Using eels, a practical approach to outerjoin and antijoin reordering. In: Proceedings of ICDE, pp. 585–594 (2001)
Rao, J., Pirahesh, H., Zuzarte, C.: Canonical abstraction for outerjoin optimization. In: Proceedings of SIGMOD Conference, pp. 671–682 (2004)
Srivastava, D., Dar, S., Jagadish, H.V., Levy, A.Y.: Answering queries with aggregation using views. In: Proceedings of VLDB Conference, pp. 318–329 (1996)
Yang, H.Z., Larson,P.-Å.: Eager aggregation and lazy aggregation. In: Proceedings of VLDB Conference, pp. 345–357 (1995)
Yan, W.P., Larson,P.-Å.: Query transformation for PSJ-queries. In: Proceedings of VLDB Conference, pp. 245–254 (1987)
Zaharioudakis, M., Cochrane, R., Lapis, G., Pirahesh, H., Urata, M.: Answering complex sql queries using automatic summary tables. In: Proceedings of SIGMOD Conference, pp. 105–116 (2000)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Larson, PÅ., Zhou, J. View matching for outer-join views. The VLDB Journal 16, 29–53 (2007). https://doi.org/10.1007/s00778-006-0027-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00778-006-0027-9