Abstract
Consider determining whether the join of n relations with relation schemas \(\textbf{R}_1, \ldots , \textbf{R}_n\) is non-empty. Abstracting the essence of many query processors, we may form new m intermediate relations, with relation schema \(\textbf{S}_1, \ldots , \textbf{S}_m\), then repeatedly use in-place semijoins to obtain an overall pair-wise compatible database state, and finally test that this state is non-empty. Recently, it was proved that if the relation schemas \(\textbf{S}_1, \ldots , \textbf{S}_m\) guarantee a correct solution, i.e., for any initial database state, then there must exist an acyclic database schema (tree schema), say over relation schemas \(\textbf{R}_1, \ldots , \textbf{R}_n, \textbf{U}_1, \ldots , \textbf{U}_q\) such that each relation schema \(\textbf{U}_i\) is a subset of some relation schema \(\textbf{S}_j\), \( 1\le i \le q\), \(1\le j \le m\). Such an acyclic database schema is called a tree projection of \(\textbf{R}_1, \ldots , \textbf{R}_n\), \(\textbf{S}_1, \ldots , \textbf{S}_m\) with respect to (w.r.t.) \(\textbf{R}_1, \ldots , \textbf{R}_n\). Suppose such a tree projection does not exist. The proof provides no mechanism, except for exhaustive search, to exhibit an initial database state over which the non-emptiness problem is solved incorrectly. Constructing such a database state is interesting combinatorially and it may also prove useful in testing query processors. We construct such a database state for two classes of cyclic database schemas: Arings and Cliques. Constructing such database states for arbitrary cyclic database schemas remains an open problem.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Apparently Klausner showed an example (unfortunately it cannot be located) of a query (i.e., database schema) with multiple Arings in which a tree projection was constructed for each Aring, individually, yet the query as a whole was not solved.
- 2.
And hence the reductive effect of \(\textbf{E}'\) is subsumed by that of \(\textbf{E}\).
- 3.
\(n+1\)=1.
References
Bernstein, P.A., Chiu, D.W.: Using semi-joins to solve relational queries. J. ACM 28(1), 25–40 (1981)
Bernstein, P.A., Goodman, N.: Power of natural semijoins. SIAM J. Comput. 10(4), 751–771 (1981). https://doi.org/10.1137/0210059, https://doi.org/10.1137/0210059
Goodman, N., Shmueli, O.: Syntactic characterization of tree database schemas. J. ACM 30(4), 767–786 (1983). https://doi.org/10.1145/2157.322405, http://doi.acm.org/10.1145/2157.322405
Goodman, N., Shmueli, O.: The tree projection theorem and relational query processing. J. Comput. Syst. Sci. 28(1), 60–79 (1984). https://doi.org/10.1016/0022-0000(84)90076-X, https://doi.org/10.1016/0022-0000(84)90076-X
Greco, G., Scarcello, F.: The power of local consistency in conjunctive queries and constraint satisfaction problems. SIAM J. Comput. 46(3), 1111–1145 (2017). https://doi.org/10.1137/16M1090272, https://doi.org/10.1137/16M1090272
Sagiv, Y., Shmueli, O.: Solving queries by tree projections. ACM Trans. Database Syst. 18(3), 487–511 (1993). https://doi.org/10.1145/155271.155277, http://doi.acm.org/10.1145/155271.155277
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Shmueli, O. (2022). Database States Exhibiting Tree Projection Necessity. In: Hua, W., Wang, H., Li, L. (eds) Databases Theory and Applications. ADC 2022. Lecture Notes in Computer Science, vol 13459. Springer, Cham. https://doi.org/10.1007/978-3-031-15512-3_16
Download citation
DOI: https://doi.org/10.1007/978-3-031-15512-3_16
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-15511-6
Online ISBN: 978-3-031-15512-3
eBook Packages: Computer ScienceComputer Science (R0)