System and method for improving query response time in a relational database (RDB) system by managing the number of unique table aliases defined within an RDB-specific search expression
First Claim
1. A computerized method for performing a search of a relational database, the method comprising:
- providing an expression tree representing a string-based search expression, the expression tree having a plurality of nodes including a logical node, the logical node of the expression tree having a first child node and a second child node, each child node representing a sub-expression of the string-based search expression, the logical node representing a logical operator used to combine the sub-expressions represented by the children nodes of the logical node;
determining that an attribute in the sub-expression of the first child node of the logical node has a same data type and is associated with the same table in a relational database as an attribute in the sub-expression of the second child node of the logical node;
associating a table alias with the table; and
generating a sub-query expression based on the sub-expressions of the children nodes and on the logical operator of the logical node, the sub-query expression being part of a repository-specific query expression to be used to query the relational database, the sub-query expression using the table alias in a translation of the sub-expression of the first child node and the same table alias in a translation of the sub-expression of the second child node if the logical node is a logical OR operator.
1 Assignment
0 Petitions
Accused Products
Abstract
Described are a system and method for searching a relational database. An expression tree, representing a string-based search expression, has a logical node with a first child node and a second child node. Each child node represents a sub-expression of the search expression. The logical node represents a logical operator used to combine the sub-expressions represented by the children nodes. An attribute in the sub-expression of the first child node is determined to have a same data type and to be associated with the same table in a relational database as an attribute in the sub-expression of the second child node. A table alias is associated with the table. A sub-query expression is generated based on the sub-expressions of the children nodes and on the logical operator of the logical node. The sub-query expression is part of a repository-specific query expression to be used to query the relational database. The sub-query expression uses the table alias in a translation of the sub-expression of the first child node and the same table alias in a translation of the sub-expression of the second child node if the logical node is a logical OR operator.
70 Citations
21 Claims
-
1. A computerized method for performing a search of a relational database, the method comprising:
-
providing an expression tree representing a string-based search expression, the expression tree having a plurality of nodes including a logical node, the logical node of the expression tree having a first child node and a second child node, each child node representing a sub-expression of the string-based search expression, the logical node representing a logical operator used to combine the sub-expressions represented by the children nodes of the logical node;
determining that an attribute in the sub-expression of the first child node of the logical node has a same data type and is associated with the same table in a relational database as an attribute in the sub-expression of the second child node of the logical node;
associating a table alias with the table; and
generating a sub-query expression based on the sub-expressions of the children nodes and on the logical operator of the logical node, the sub-query expression being part of a repository-specific query expression to be used to query the relational database, the sub-query expression using the table alias in a translation of the sub-expression of the first child node and the same table alias in a translation of the sub-expression of the second child node if the logical node is a logical OR operator. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computerized system for performing a search of a relational database, the system comprising:
-
a parser producing an expression tree from a string-based search expression, the expression tree having a plurality of nodes including a logical node, the logical node of the expression tree having a first child node and a second child node, each child node representing a sub-expression of the string-based search expression, the logical node representing a logical operator used to combine the sub-expressions represented by the children nodes of the logical node; and
an adapter receiving the expression tree and determining that an attribute in the sub-expression of the first child node of the logical node has a same data type and is associated with the same table in a relational database as an attribute in the sub-expression of the second child node of the logical node, the adapter associating a table alias with the table and generating a sub-query expression based on the sub-expressions of the children nodes and on the logical operator of the logical node, the sub-query expression being part of a repository-specific query expression to be used to query the relational database, the sub-query expression using the table alias in a translation of the sub-expression of the first child node and the same table alias in a translation of the sub-expression of the second child node if the logical node is a logical OR operator. - View Dependent Claims (8, 9, 10, 11)
-
-
12. A computer program product for use with a computer system, the computer program product comprising a computer useable medium having embodied therein program code comprising:
-
program code for providing an expression tree representing a string-based search expression, the expression tree having a plurality of nodes including a logical node, the logical node of the expression tree having a first child node and a second child node, each child node representing a sub-expression of the string-based search expression, the logical node representing a logical operator used to combine the sub-expressions represented by the children nodes of the logical node;
program code for determining that an attribute in the sub-expression of the first child node of the logical node has a same data type and is associated with the same table in a relational database as an attribute in the sub-expression of the second child node of the logical node;
program code for associating a table alias with the table; and
program code for generating a sub-query expression based on the sub-expressions of the children nodes and on the logical operator of the logical node, the sub-query expression being part of a repository-specific query expression to be used to query the relational database, the sub-query expression using the table alias in a translation of the sub-expression of the first child node and the same table alias in a translation of the sub-expression of the second child node if the logical node is a logical OR operator. - View Dependent Claims (13, 14, 15, 16)
-
-
17. A computer data signal embodied in a carrier wave for use with a computer system having a display and capable of generating a user interface through which a user may interact with the computer system, the computer data signal comprising:
-
program code for providing an expression tree representing a string-based search expression, the expression tree having a plurality of nodes including a logical node, the logical node of the expression tree having a first child node and a second child node, each child node representing a sub-expression of the string-based search expression, the logical node representing a logical operator used to combine the sub-expressions represented by the children nodes of the logical node;
program code for determining that an attribute in the sub-expression of the first child node of the logical node has a same data type and is associated with the same table in a relational database as an attribute in the sub-expression of the second child node of the logical node;
program code for associating a table alias with the table; and
program code for generating a sub-query expression based on the sub-expressions of the children nodes and on the logical operator of the logical node, the sub-query expression being part of a repository-specific query expression to be used to query the relational database, the sub-query expression using the table alias in a translation of the sub-expression of the first child node and the same table alias in a translation of the sub-expression of the second child node if the logical node is a logical OR operator. - View Dependent Claims (18, 19, 20, 21)
-
Specification