IP Library Granted Patent US 10,866,971
Granted Patent B2
US 10,866,971 · App. 15/601,983 · Granted Dec 15, 2020

Hash collision tables for relational operations

Inventors: Christian Bensberg (Heidelberg, DE); Till Merker (Sandhausen, DE)
Assignee: SAP SE
G06F16/284G06F16/23G06F16/2455G06F16/9014
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,866,971
App. No.
15/601,983
Granted
Dec 15, 2020
Kind
B2
Abstract

A system for hash collision tables for relational operations is provided. In some implementations, the system performs operations comprising generating a plurality of hash values for at least a portion of one or more database tables based on a database query, and generating a hash table for at least a portion of the plurality of hash values. The operations can further include generating first results based on execution of a first operation in the database query using the hash table. Additionally, the operations can further include generating second results based on the first results and execution of a second operation in the database query using the hash table. Related systems, methods, and articles of manufacture are also described.

Claims (58)

1. A system comprising:

at least one processor; and

at least one memory storing instructions which, when executed by the at least one processor, cause operations comprising:

generating, based on at least a database query, a plurality of hash values for at least a portion of one or more database tables by at least

identifying at least two columns in a first database table, and

generating, for at least one row of a plurality of rows in the at least two columns, a hash value by at least applying a hashing function to data in the at least one row of the at least two columns;

generating, for at least a portion of the plurality of hash values, a hash table by at least:

comparing, for each of the plurality of hash values, the hash value against a list of hash values in the hash table to determine whether a matching hash value exists,

adding, when the matching hash value does not exist, the hash value to the list of hash values,

comparing, when the matching hash value exists, first underlying data used to generate the hash value against second underlying data used to generate the matching hash value to determine whether the first and second underlying data are equivalent, and

adding, when the first and second underlying data are equivalent, an entry for the hash value in one or more of a hash collision table or a resolution dictionary;

generating, based on at least the execution of a first database operation in the database query and based on at least the hash table, the hash collision table, and/or the resolution dictionary, first results; and

generating, based on at least the first results and execution of a second database operation in the database query, second results.

2. The system of claim 1 , wherein the plurality of hash values are generated based on entries in a main part and a delta part for the main part, and wherein the first database operation and/or the second database operation comprises an aggregation operation performed on the main part and the delta part.

3. The system of claim 1 , wherein the first database operation comprises a first join operation of the first database table and a second database table, wherein the second database operation comprises a second join operation of the first results and a third database table, wherein the hash table is generated based on the first database table, the second database table, and the third database table, and wherein the second results are generated based on the hash table, the hash collision table, and/or the resolution dictionary.

4. The system of claim 1 , wherein the generating the plurality of hash values further comprises:

generating, for each of the plurality of rows, a plurality of first hash values based on data entries in each of the identified at least two columns; and

concatenating, for each of the plurality of rows, the plurality of first hash values to form the hash value.

5. The system of claim 1 , wherein the generating the plurality of hash values further comprises:

concatenating, for each of the plurality of rows, a plurality of data entries from each of the identified at least two columns to form a combined entry; and

generating, for each of the plurality of rows, the hash value based on executing the hashing function on the combined entry.

6. The system of claim 1 , wherein the operations further comprise:

identifying, based on the database query, the one or more database tables for execution of the database query as database tables identified in the database query.

7. The system of claim 1 , wherein the plurality of hash values are generated based on applying the hash function to data contained in a plurality of data entries of the one or more database tables.

8. The system of claim 1 , wherein the operations further comprise:

updating, based on new rows added to the one or more database tables, the hash table, the hash collision table, and/or the resolution dictionary.

9. The system of claim 1 , wherein the operations further comprise:

providing, based on the second results, data responsive to the database query.

10. A method comprising:

generating, based on at least a database query, a plurality of hash values for at least a portion of one or more database tables by at least

identifying at least two columns in a first database table, and

generating, for at least one row of a plurality of rows in the at least two columns, a hash value by at least applying a hashing function to data in the at least one row of the at least two columns;

generating, for at least a portion of the plurality of hash values, a hash table by at least:

comparing, for each of the plurality of hash values, the hash value against a list of hash values in the hash table to determine whether a matching hash value exists,

adding, when the matching hash value does not exist, the hash value to the list of hash values,

comparing, when the matching hash value exists, first underlying data used to generate the hash value against second underlying data used to generate the matching hash value to determine whether the first and second underlying data are equivalent, and

adding, when the first and second underlying data are equivalent, an entry for the hash value in one or more of a hash collision table or a resolution dictionary;

generating, based on at least the execution of a first database operation in the database query and based on at least the hash table, the hash collision table, and/or the resolution dictionary, first results; and

generating, based on at least the first results and execution of a second database operation in the database query, second results.

11. The method of claim 10 , wherein the plurality of hash values are generated based on entries in a main part and a delta part for the main part, and wherein the first database operation and/or the second database operation comprises an aggregation operation performed on the main part and the delta part.

12. The method of claim 10 , wherein the first database operation comprises a first join operation of the first database table and a second database table, wherein the second database operation comprises a second join operation of the first results and a third database table, wherein the hash table is generated based on the first database table, the second database table, and the third database table, and wherein the second results are generated based on the hash table, the hash collision table, and/or the resolution dictionary.

13. The method of claim 10 , further comprising:

updating, based on new rows added to the one or more database tables, the hash table, the hash collision table, and/or the resolution dictionary.

14. A non-transitory computer-readable medium comprising instructions which, when executed by at least one processor, result in operations comprising:

generating, based on at least a database query, a plurality of hash values for at least a portion of one or more database tables by at least

identifying at least two columns in a first database table, and

generating, for at least one row of a plurality of rows in the at least two columns, a hash value by at least applying a hashing function to data in the at least one row of the at least two columns;

generating, for at least a portion of the plurality of hash values, a hash table by at least:

comparing, for each of the plurality of hash values, the hash value against a list of hash values in the hash table to determine whether a matching hash value exists,

adding, when the matching hash value does not exist, the hash value to the list of hash values,

comparing, when the matching hash value exists, first underlying data used to generate the hash value against second underlying data used to generate the matching hash value to determine whether the first and second underlying data are equivalent, and

adding, when the first and second underlying data are equivalent, an entry for the hash value in one or more of a hash collision table or a resolution dictionary;

generating, based on at least the execution of a first database operation in the database query and based on at least the hash table, the hash collision table, and/or the resolution dictionary, first results; and

generating, based on at least the first results and execution of a second database operation in the database query, second results.

15. The non-transitory computer-readable medium of claim 14 , wherein the plurality of hash values are generated based on entries in a main part and a delta part for the main part, and wherein the first database operation and/or the second database operation comprises an aggregation operation performed on the main part and the delta part.

16. The non-transitory computer-readable medium of claim 14 , wherein the first database operation comprises a first join operation of the first database table and a second database table, wherein the second database operation comprises a second join operation of the first results and a third database table, wherein the hash table is generated based on the first database table, the second database table, and the third database table, and wherein the second results are generated based on the hash table, the hash collision table, and/or the resolution dictionary.

17. The non-transitory computer-readable medium of claim 14 , wherein the operations further comprise:

updating, based on new rows added to the one or more database tables, the hash table, the hash collision table, and/or the resolution dictionary.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 14, 2020
From: BENSBERG, CHRISTIAN; MERKER, TILL
To: SAP SE
Reel/Frame 054052/0313 →
Continuity (1)
Related Publication 20180336263A1 · Nov 22, 2018
Cited By (3)
US 12,405,820 US 12,602,369 US 12,639,281