IP Library Granted Patent US 9,632,944
Granted Patent B2
US 9,632,944 · App. 13/931,995 · Granted Apr 25, 2017

Enhanced transactional cache

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 9,632,944
App. No.
13/931,995
Granted
Apr 25, 2017
Kind
B2
Abstract

Described herein is a technology for providing enhanced transactional caching. In accordance with one aspect, a transactional cache associated with a database is configured. The enhanced cache may support write operation by partial key or index. Execution of a write operation on the database is delayed until a flush is determined to be necessary. The write operation is delayed by performing the write operation on the transactional cache. The flush is invoked by performing a row-wise bulk operation that updates the database based on the transactional cache.

Claims (54)

1. A computer-implemented method of transactional caching, comprising:

configuring a transactional cache associated with a database, wherein the database comprises a column-based database with a column architecture;

receiving a write operation with a partial key;

mapping the partial key to one or more primary keys, wherein a primary key uniquely identifies one row in the transactional cache, wherein the partial key is non-unique and identified by a subset of a string representing the primary key;

applying a write-through-DB policy for order-sensitive query operations, wherein the write-through-DB policy executes the order-sensitive query operations directly on the database;

delaying execution of the write operation other than the order-sensitive query operations on the database until a flush is determined to be necessary, wherein the write operation is delayed by performing the write operation on the identified one row in the transactional cache; and

invoking the flush by performing a bulk operation that updates the database based on the transactional cache.

2. A computer-implemented method of transactional caching, comprising:

configuring a transactional cache associated with a database;

receiving a write operation with a partial key;

mapping the partial key to one or more primary keys, wherein a primary key uniquely identifies one row in the transactional cache, wherein the partial key is non-unique and identified by a subset of a string representing the primary key;

delaying execution of the write operation on the database until a flush is determined to be necessary, wherein the write operation is delayed by performing the write operation on the transactional cache; and

invoking the flush by performing a row-wise bulk operation that updates the database based on the transactional cache.

3. The computer-implemented method of claim 2 wherein the database comprises an in-memory database.

4. The computer-implemented method of claim 2 wherein mapping comprises:

mapping, using a secondary index, the partial key to the one or more primary keys that uniquely identify the one row in the transactional cache.

5. The computer-implemented method of claim 4 wherein mapping the partial key to the one or more primary keys comprises:

mapping an identifier of the partial key to a column number;

mapping the column number to a field value; and

mapping the field value to a primary key set including the one or more primary keys.

6. The computer-implemented method of claim 2 further comprising applying, to a record in the transactional cache, a same lock level that is applied to a corresponding record in the database.

7. The computer-implemented method of claim 6 wherein the lock level comprises No Lock, Share Lock, Update Lock or Exclusive Lock.

8. The computer-implemented method of claim 6 further comprising:

if the lock level of the record in the transactional cache is lower than a lock level requested by a user, executing access to the database to acquire a lock.

9. The computer-implemented method of claim 6 further comprising:

if the lock level of the record in the transactional cache is higher than a lock level requested by a user, returning the record in the transactional cache to the user.

10. The computer-implemented method of claim 6 further comprising:

changing the lock level of the record from Share Lock or Update Lock to Exclusive Lock when the record is flushed.

11. The computer-implemented method of claim 2 further comprising:

receiving a delete by key operation;

deleting corresponding records from the database and the transactional cache; and

updating a secondary index if necessary.

12. The computer-implemented method of claim 2 wherein the write operation comprises an insert operation, and the write operation is delayed by writing a new record to the transactional cache.

13. The computer-implemented method of claim 2 wherein the write operation comprises an update by key operation and delaying execution of the write operation on the database until a flush is determined to be necessary comprises:

if a corresponding record is not found in the transactional cache, adding a new record to the transactional cache; and

if a corresponding record is found in the transactional cache, updating the corresponding record in the transactional cache.

14. The computer-implemented method of claim 2 wherein the write operation comprises a batch update or batch delete operation.

15. The computer-implemented method of claim 14 further comprising determining the flush to be necessary if the write operation is related to a view.

16. The computer-implemented method of claim 14 further comprising determining the flush to be necessary if the transactional cache includes any newly inserted or old dirty record that is associated with a table related to the write operation.

17. The computer-implemented method of claim 2 further comprising determining the flush to be necessary when a transaction is committing or before executing a general query, batch update, batch delete or stored procedure.

18. A non-transitory computer-readable medium having stored thereon program code, the program code executable by a computer to perform a method of transactional caching, comprising:

configuring a transactional cache associated with a database, wherein the database comprises a column-based database with a column architecture;

receiving a write operation with a partial key;

mapping the partial key to one or more primary keys, wherein a primary key uniquely identifies one row in the transactional cache, wherein the partial key is non-unique and identified by a subset of a string representing the primary key;

delaying execution of the write operation on the database until a flush is determined to be necessary, wherein the write operation is delayed by inserting or updating records in the transactional cache; and

invoking the flush by performing a row-wise bulk operation that updates the database based on the transactional cache, wherein performing the row-wise bulk operation comprises writing the records in the transactional cache into respective rows of records in a data table in the column-based database.

19. A system for transactional caching, comprising:

a non-transitory memory device for storing computer-readable program code; and

a processor in communication with the memory device, the processor being operative with the computer-readable program code to

configure a transactional cache associated with a database, wherein the database comprises a column-based database with a column architecture,

receiving a write operation with a partial key,

mapping the partial key to one or more primary keys, wherein a primary key uniquely identifies one row in the transactional cache, wherein the partial key is non-unique and identified by a subset of a string representing the primary key,

delay execution of the write operation on the database until a flush is determined to be necessary, wherein the write operation is delayed by inserting or updating records in the transactional cache, and

invoke the flush by performing a row-wise bulk operation that updates the column-based database based on the transactional cache, wherein performing the row-wise bulk operation comprises writing the records in the transactional cache into respective rows of records of a data table in the column-based database.

Assignments (2)
CHANGE OF NAME Recorded Aug 26, 2014
From: SAP AG
To: SAP SE
Reel/Frame 033625/0223 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 30, 2013
From: WANG, BO
To: SAP AG
Reel/Frame 030743/0328 →