Claims
- 1. A method of identifying a keySet(e) of an expression e=LR, where e is the expression, .circle-w/dot. is a root of the expression, said root being a binary operator, P.sub.LR is a predicate, L is a left child, and R is a right child, the keySet(e) being used to increase the efficiency of processing a query, wherein the keySet(e) is used to denote the set containing all minimal keys of the expression e, comprising the steps of:
- identifying a keySet (L) and a keySet(R);
- generating a first set S.sub.1 by concantenating each element in said keySet (L) with each element in said keySet(R);
- generating a second set S.sub.2, wherein if the binary operator is a join or a left outer join, and if said predicate is equi-join, and if attributes that are common to both a schema of the predicate and a schema of the right child R are in said keySet (R), then said second set S.sub.2 is defined as said keySet(L), otherwise said second set S.sub.2 is an empty set;
- generating a third set S.sub.3, wherein if the binary operator is a join or a right outer join, and if the predicate is equi-join, and if attributes that are common to both a schema of the predicate and a schema of the left child L are in said keySet(L), then said third set S.sub.3 is defined as said keySet (R), otherwise said third set S.sub.3 is an empty set; and
- defining the keySet(e) as equal to the union of S.sub.1, S.sub.2, and S.sub.3, such that
- keySet(e)=S.sub.1 .orgate.S.sub.2 .orgate.S.sub.3.
- 2. A computer program product for use with a computer system, said computer program product comprising:
- a computer usable medium having computer readable program code means embodied in said medium for causing the computer system to identify a keySet(e) of an expression .sub.e=LR, where e is the expression, .circle-w/dot. is a root of the expression, said root being a binary operator, P.sub.LR is a predicate, L is a left child, and R is a right child, the keySet(e) being used to increase the efficiency of processing a query, wherein said keySet(e) is used to denote a set containing all minimal keys of said expression e, said computer readable program code means comprising:
- computer readable program code means for enabling the computer system to identify a keySet (L) and a keySet(R);
- computer readable program code means for enabling the computer system to generate a first set S.sub.1 by concantenating each element in said keySet(L) with each element in said keySet(R);
- computer readable program code means for enabling the computer system to generate a second set S.sub.2, wherein if said binary operator is a join or a left outer join, and if said predicate is equi-join, and if attributes that are common to both a schema of said predicate and a schema of said right child R are in said keySet (R), then said second set S.sub.2 is defined as said keySet(L), otherwise said second set S.sub.2 is an empty set;
- computer readable program code means for enabling the computer system to generate a third set S.sub.3, wherein if said binary operator is a join or a right outer join, and if said predicate is equi-join, and if attributes that are common to both a schema of said predicate and a schema of said left child L are in said keySet(L), then said third set S.sub.3 is defined as said keySet(R), otherwise said third set S.sub.3 is an empty set; and
- computer readable program code means for enabling the computer system to define said keySet(e) as equal to the union of S.sub.1, S.sub.2, and S.sub.3, such that
- keySet(e)=S.sub.1 .orgate.S.sub.2 .orgate.S.sub.3.
- 3. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform method steps for identifying a keySet(e) being a binary operator, P.sub.LR is a predicate, L is a left child, and R is a right child, the keySet(e) being used to increase the efficiency of processing a query, wherein the keySet(e) is used to denote the set containing all minimal keys of the expression e, comprising the method steps of:
- identifying a keySet(L) and a keySet(R);
- generating a first set S.sub.1 by concantenating each element in said keySet(L) with each element in said keySet(R);
- generating a second set S.sub.2, wherein if the binary operator is a join or a left outer join, and if the predicate is equi-join, and if attributes that are common to both a schema of the predicate and a schema of the right child R are in said keySet(R), then said second set S.sub.2 is defined as said keySet(L), otherwise said second set S.sub.2 is an empty set;
- generating a third set S.sub.3, wherein if the binary operator is a join or a right outer join, and if the predicate is equi-join, and if attributes that are common to both a schema of the predicate and a schema of the left child L are in said keySet(L), then said third set S.sub.3 is defined as said keySet(R), otherwise said third set S.sub.3 is an empty set; and
- defining the keySet(e) as equal to the union of S.sub.1, S.sub.2, and S.sub.3, such that
- keySet(e)=S.sub.1 .orgate.S.sub.2 .orgate.S.sub.3.
CROSS-REFERENCE TO RELATED APPLICATIONS
This is a continuation of U.S. application Ser. No. 08/460,561, filed on Jun. 2, 1995 (now U.S. Pat. No. 5,696,960), which is a division of U.S. application Ser. No. 08/366,560, filed on Dec. 30, 1994 (now U.S. Pat. No. 5,659,728).
US Referenced Citations (3)
Number |
Name |
Date |
Kind |
5423035 |
DePrez |
Jun 1995 |
|
5659728 |
Bhargava et al. |
Aug 1997 |
|
5696960 |
Bhargava et al. |
Dec 1997 |
|
Non-Patent Literature Citations (4)
Entry |
Lee et al., Outer Joins and Filters for Instantiating Objects from Relational Databases Through Views, IEEE Transactions on Knowledge and Data Engineering, vol. 6, No. 1, Jul. 1991. |
Chen, A.L.P., "Outerjoin Optimization In Multidatabase Systems," 2.sup.nd International Symposium On Databases In Parallel And Distributed Systems, pp. 211-218, 1990. |
Galindo-Legaria, C., and Rosenthal, A., "How To Extend A Conventional Optimizer To Handle One- and Two-Sided Outerjoin," Proceedings IEEE Data Engineering Conference, pp. 402-409, 1992. |
Paulley, G.N. and Larson, P.A., "Exploiting Uniqueness In Query Optimization," CASCON, pp. 804-822, vol. II, Oct. 1993. |
Divisions (1)
|
Number |
Date |
Country |
Parent |
366560 |
Dec 1994 |
|
Continuations (1)
|
Number |
Date |
Country |
Parent |
460561 |
Jun 1995 |
|