Processing cross-table non-Boolean term conditions in database queries
First Claim
Patent Images
1. A method for searching for data in a database, the method comprising:
- receiving a query that is a request for data in the database, wherein the query identifies multiple tables in the database, the query including at least one uneven non-Boolean term condition including an OR condition having two predicates, wherein the OR condition spans and is satisfied by at least two tables of the multiple tables;
splitting the at least one non-Boolean term condition into a plurality of separate query portions, wherein each predicate of the OR condition is provided to a different one of the separate query portions, each of the separate query portions providing a Boolean term that is satisfied by accessing a different particular one of the at least two tables;
executing the separate query portions independently of each other to find at least one data result in each of the at least two tables that satisfies the Boolean term of each separate query portion, wherein a duplication of accesses to the different particular tables is minimized in the execution of the separate query portions, and wherein every corresponding row of the different particular tables does not need to be joined in order to check whether the corresponding rows satisfy the non-Boolean term condition;
identifying at least one bridge table, the at least one bridge table being at least one of the multiple tables which does not satisfy the at least one uneven non-Boolean term condition and has at least one column from each of the different particular tables; and
combining the data result from each separate query portion into a final result that satisfies the query, wherein the at least one identified bridge table is used to join each of the different tables to combine the data results.
1 Assignment
0 Petitions
Accused Products
Abstract
Processing non-Boolean term conditions in database queries. A query that is a request for data in a database is received and includes at least one uneven non-Boolean term condition that spans multiple tables in the database. The non-Boolean term condition is split into separate portions, each of the portions providing a Boolean term that can be satisfied by accessing one table in the database. The separate portions are executed independently to find at least one data result in the database that satisfies the Boolean term of each separate portion, and the data result from each separate portion are combined into a final result that satisfies the query.
43 Citations
15 Claims
-
1. A method for searching for data in a database, the method comprising:
-
receiving a query that is a request for data in the database, wherein the query identifies multiple tables in the database, the query including at least one uneven non-Boolean term condition including an OR condition having two predicates, wherein the OR condition spans and is satisfied by at least two tables of the multiple tables; splitting the at least one non-Boolean term condition into a plurality of separate query portions, wherein each predicate of the OR condition is provided to a different one of the separate query portions, each of the separate query portions providing a Boolean term that is satisfied by accessing a different particular one of the at least two tables; executing the separate query portions independently of each other to find at least one data result in each of the at least two tables that satisfies the Boolean term of each separate query portion, wherein a duplication of accesses to the different particular tables is minimized in the execution of the separate query portions, and wherein every corresponding row of the different particular tables does not need to be joined in order to check whether the corresponding rows satisfy the non-Boolean term condition; identifying at least one bridge table, the at least one bridge table being at least one of the multiple tables which does not satisfy the at least one uneven non-Boolean term condition and has at least one column from each of the different particular tables; and combining the data result from each separate query portion into a final result that satisfies the query, wherein the at least one identified bridge table is used to join each of the different tables to combine the data results. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer readable medium including program instructions to be implemented by a computer, the program instructions for searching for data in a database, the program instructions implementing steps comprising:
-
receiving a query that is a request for data in the database, wherein the query identifies multiple tables in the database, the query including at least one uneven non-Boolean term condition including an OR condition having two predicates, wherein the OR condition spans and is satisfied by at least two tables of the multiple tables; splitting the at least one non-Boolean term condition into a plurality of separate query portions, wherein each predicate of the OR condition is provided to a different one of the separate query portions, each of the separate query portions providing a Boolean term that is satisfied by accessing a different particular one of the at least two tables; executing the separate query portions independently of each other to find at least one data result in each of the at least two tables that satisfies the Boolean term of each separate query portion, wherein a duplication of accesses to the different particular tables is minimized in the execution of the separate query portions, and wherein every corresponding row of the different particular tables does not need to be joined in order to check whether the corresponding rows satisfy the non-Boolean term condition; identifying at least one bridge table, the at least one bridge table being at least one of the multiple tables which does not satisfy the at least one uneven non-Boolean term condition and has at least one column from each of the different particular tables; and combining the data result from each separate query portion into a final result that satisfies the query, wherein the at least one identified bridge table is used to join each of the different tables to combine the data results. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A system for searching for data in a database, the system comprising:
- a storage device for storing data in a database, the data being referenced within a plurality of tables; and
a processor coupled to the storage device, the processor receiving a query that is a request for data in the database, wherein the query identifies multiple tables in the database, the query including at least one uneven non-Boolean term condition including an OR condition having two predicates, wherein the OR condition t4˜
spans and is satisfied by at least two tables of the multiple tables;
wherein the processor splits the at least one non-Boolean term condition into a plurality of separate query portions, wherein each predicate of the OR condition is provided to a different one of the separate query portions, each of the separate query portions providing a Boolean term that is satisfied by accessing a different particular one of the at least two tables, and wherein the processor is processing the query by executing the separate query portions independently of each other to find at least one data result in each of the at least two tables that satisfies the Boolean term of each separate query portion, wherein a duplication of accesses to the different particular tables is minimized in the execution of the separate query portions, and wherein every corresponding row of the different particular tables does not need to be joined in order to check whether the corresponding rows satisfy the non-Boolean term condition, and wherein the processor is identifies at least one bridge table, the at least one bridge table being at least one of the multiple tables which does not satisfy the at least one uneven non-Boolean term condition and has at least one column from each of the different particular tables, wherein the data results from each separate portion are combined into a final result that satisfies the query, wherein the at least one identified bridge table is used to join each of the different tables to combine the data results. - View Dependent Claims (15)
- a storage device for storing data in a database, the data being referenced within a plurality of tables; and
Specification