A Fast Algorithm for Query Optimization in Universal-Relation Databases

Francesco Mario Malvestuto, Marina Moscarini
1998 Journal of computer and system sciences (Print)  
The method of the canonical connection introduced by Maier and Ullman provides an optimal procedure for query processing in universal-relation databases. We present an algorithm for computing canonical connections in a database scheme which is more efficient than the classical algorithm based on tableau reduction. Moreover, with a slight modification of the algorithm we obtain a join plan which succeeds in controlling the nonmonotonicity of cyclic canonical connections. ] 1998 Academic Press In
more » ... what follows, since a database scheme can be pictured by a hypergraph (where nodes represent attributes and edges represent relation schemes), we shall make use of a notation borrowed from the hypergraph theory [5] and denote a database scheme and the universe of attributes by H and V(H ), respectively. Moreover, we assume that in every database scheme no relation scheme is a subset of another, so that the corresponding hypergraph is reduced [4] . An X-subscheme of H can be characterized by the notion of an X-mapping [12] , this being defined as follows. An X-mapping of H is a mapping f from H to H such that: . (a) for each relation scheme e # f (H ), f (e)=e; (b) if v is an attribute belonging to two or more relation schemes in H, then for each relation scheme e containing v, f (e) contains v, or for every two relation schemes e and e$ containing v, f (e)= f (e$); (c) if a relation scheme e contains an attribute v belonging to X, then v also belongs to f (e). By making use of results of tableau theory [1, 2, 12], we have that H$ is an X-subscheme of H if and only if H$ is the image of an X-mapping of H; furthermore, H$ is a minimal X-subscheme of H if the unique X-mapping of H$ is the identity. As suggested in [12], a minimal X-subscheme of H can be computed by resorting to the algorithm for reducing tableaux [1, 2] which runs in O(m 4 _n) time, where m= |H | and n= |V(H )|. Suppose that a minimal X-subscheme H$=[e i 1 , e i 2 , ..., e i k ] of H has been computed. A further optimization step to compute the answer to the query X can be done by considering the set [e$ 1 , e$ 2 , ..., e$ k ], where e$ h (h=1, ..., k) is the subset of e i h obtained by deleting the attributes that are not in X and that in H$ appear only in e i h . In fact, it is well known [18] that ? X (e i 1 e i 2 } } } e i k )
doi:10.1006/jcss.1998.1570 fatcat:5pguq4bfyvag3lowc6pqrp7guy