# US 2021/0334286 A1 · Database Query Handling Using Pre-Calculated Association Pagination Ranking

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0334286 A1
- Document ID: US20210334286A1
- Status: Published application
- Kind: A1
- Application number: 16/898,258
- Filed: 2020-06-10
- Published: 2021-10-28
- Earliest claimed: 2020-04-22
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Ramana Kumar Rajaraman; Nagendra Manchuri
- Web page: https://patentgrep.com/patent/US20210334286A1

## CPC

- G06F 16/24578: {using ranking}
- G06F 16/215: Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/24542: {Plan optimisation}
- G06F 16/24561: {Intermediate data storage techniques for performance improvement}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Enhanced database query handling is provided using pre-calculated association pagination ranking. Such pre-calculated rankings can be generated using various approaches including by calculating rank along with an intersection, addition, and deletion of association rows corresponding to a parent row being modified or by a stored procedure which uses the ranking operations. Related apparatus, systems, techniques and articles are also described.

## Claims

### Claim 1

A method for enabling efficient database query handling comprising:
loading a parent row into memory of a database;
updating at least one attribute in the parent row;
calculating an intersection, addition, and deletion of association rows corresponding to the parent row;
determining a ranking for each association row based on the calculating; and
updating rankings for the association rows with the determined rankings.

### Claim 2 (depends on 1)

The method of claim 1, wherein the determining comprises:
loading all association rows into memory.

### Claim 3 (depends on 1)

The method of claim 1 further comprising:
receiving, by the database, a query specifying an offset and a number of ranked records; and
providing results responsive to the query using the rankings in association rows responsive to the query.

### Claim 4 (depends on 1)

The method of claim 1, wherein the calculating comprises:
determining whether each association row has been updated or inserted; and
sorting the association rows that have been updated or inserted by a corresponding ranking column; and
updating a ranking column for at least a portion of the association rules based on the sorting.

### Claim 5 (depends on 1)

The method of claim 1 further comprising:
opening a database transaction to cause the loading of the parent row.

### Claim 6 (depends on 5)

The method of claim 5 further comprising:
committing operations specified by the database transaction; and
closing the database transaction after the operations are committed.

### Claim 7

A system for enabling efficient database query handling comprising:
at least one data processor; and
memory comprising instructions which, when executed by the at least one data processor, result in operations comprising:
loading a parent row in memory of a database;
updating at least one attribute in the parent row;
calculating an intersection, addition, and deletion of association rows corresponding to the parent row;
determining a ranking for each association row based on the calculating; and
updating rankings for the association rows with the determined rankings.

### Claim 8 (depends on 7)

The system of claim 7, wherein the determining comprises:
loading all association rows into memory.

### Claim 9 (depends on 7)

The system of claim 7, wherein the operations further comprise:
receiving, by the database, a query specifying an offset and a number of ranked records; and
providing results responsive to the query using the rankings in association rows responsive to the query.

### Claim 10 (depends on 7)

The system of claim 7, wherein the calculating comprises:
determining whether each association row has been updated or inserted; and
sorting the association rows that have been updated or inserted by a corresponding ranking column; and
updating a ranking column for at least a portion of the association rules based on the sorting.

### Claim 11 (depends on 7)

The system of claim 7, wherein the operations further comprise:
opening a database transaction to cause the loading of the parent row.

### Claim 12 (depends on 11)

The system of claim 11, wherein the operations further comprise:
committing operations specified by the database transaction; and
closing the database transaction after the operations are committed.

### Claim 13 (depends on 12)

The system of claim 12 further comprising: the database.

### Claim 14

A non-transitory computer program product comprising instructions for enabling efficient database query handling, the instructions, when executed by at least one computing device, result in operations comprising:
loading a parent row in memory of a database;
updating at least one attribute in the parent row;
calculating an intersection, addition, and deletion of association rows corresponding to the parent row;
determining a ranking for each association row based on the calculating; and
updating rankings for the association rows with the determined rankings.

### Claim 15 (depends on 14)

The non-transitory computer program product of claim 14, wherein the determining comprises:
loading all association rows into memory.

### Claim 16 (depends on 14)

The non-transitory computer program product of claim 14, wherein the operations further comprise:
receiving, by the database, a query specifying an offset and a number of ranked records; and
providing results responsive to the query using the rankings in association rows responsive to the query.

### Claim 17 (depends on 14)

The non-transitory computer program product of claim 14, wherein the calculating comprises:
determining whether each association row has been updated or inserted; and
sorting the association rows that have been updated or inserted by a corresponding ranking column; and
updating a ranking column for at least a portion of the association rules based on the sorting.

### Claim 18 (depends on 14)

The non-transitory computer program product of claim 14, wherein the operations further comprise:
opening a database transaction to cause the loading of the parent row.

### Claim 19 (depends on 18)

The non-transitory computer program product of claim 18, wherein the operations further comprise:
committing operations specified by the database transaction; and
closing the database transaction after the operations are committed.

### Claim 20 (depends on 14)

The non-transitory computer program product of claim 14, wherein the database is an in-memory database.
