IP Library Granted Patent US 8,868,512
Granted Patent B2
US 8,868,512 · App. 13/340,304 · Granted Oct 21, 2014

Logging scheme for column-oriented in-memory databases

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 8,868,512
App. No.
13/340,304
Granted
Oct 21, 2014
Kind
B2
Abstract

According to some embodiments, a column-oriented in-memory database structure may be established. The database structure may, for example, include a main store and a dictionary compressed delta store. Moreover, the delta store may comprise a value identifier vector and a delta dictionary associated with a column of the database. A transaction associated with the column may then be received and recorded within the delta store. According to some embodiments, entries associated with the transaction may be added to a value log of the value identifier vector and, independently, to a dictionary log of the delta dictionary.

Claims (58)

1. A method for a database system, comprising:

establishing a column-oriented in-memory database structure including a main store and a dictionary compressed delta store, wherein the delta store comprises a value identifier vector that includes each value of a record stored in a same row of a column of the database and a delta dictionary associated with the column of the database;

receiving a transaction associated with the column;

recording the transaction within the delta store;

adding an entry associated with the transaction to a value log of the value identifier vector, the value log comprising a transaction identifier and a row identifier indicating a row in the value identifier vector; and

adding an entry associated with the transaction to a dictionary log of the delta dictionary.

2. The method of claim 1 , wherein the main store is compressed using a sorted dictionary and supplemental compression techniques.

3. The method of claim 1 , wherein the received transaction comprises one of an insert transaction, an update transaction, or a delete operation.

4. The method of claim 1 , wherein the recordation of the transaction within the delta store comprises adding a new record/row into the delta store, including a transaction identifier indicating the transaction.

5. The method of claim 4 , wherein the entry added to the dictionary log includes: (i) a table name, (ii) a column index indicating the column, (iii) a new value added to the delta dictionary as a result of the transaction, and (iv) a value identifier used within the column for the new value.

6. The method of claim 5 , wherein the transaction identifier is not included in the entry added to the dictionary log.

7. The method of claim 4 , wherein the entry added to the value log further includes: (i) a table name and (ii) a column index indicating the column.

8. The method of claim 1 , wherein multiple columns are managed as a single table, each column being associated with a value log and dictionary log.

9. The method of claim 1 , further comprising:

periodically merging the delta store with the main store; and

subsequent to said merging, clearing the delta store, value log, and dictionary log.

10. The method of claim 1 , wherein the delta dictionary comprises an unsorted array.

11. The method of claim 1 , further comprising:

receiving a subsequent transaction associated with the column;

recording the subsequent transaction within the delta store;

determining that the subsequent transaction does not require a change to the delta dictionary; and

adding an entry associated with the subsequent transaction to the value log without adding an entry to the dictionary log.

12. The method of claim 1 , further comprising:

receiving an instruction to recover from a database crash; and

in response to the instruction,

recovering the main store from a snapshot stored in persisted memory;

reading and applying entries from the value log;

reading and applying entries from the dictionary log; and

recreating the delta store.

13. The method of claim 12 , wherein said reading and applying for the value and dictionary logs are performed in parallel.

14. The method of claim 12 , wherein said reading and applying for the dictionary log are performed out of order.

15. A non-transitory computer-readable medium storing program code, the program code executable by a computing system storing a column-oriented in-memory database structure including a main store and a dictionary compressed delta store, wherein the delta store comprises a value identifier vector that includes each value of a record stored in a same row of a column of the database and a delta dictionary associated with the column of the database, the program code comprising:

code to receive a transaction associated with the column;

code to record the transaction within the delta store;

code to add an entry associated with the transaction to a value log of the value identifier vector, the value log comprising a transaction identifier and a row identifier indicating a row in the value identifier vector; and

code to add an entry associated with the transaction to a dictionary log of the delta dictionary.

16. The medium of claim 15 , wherein the entry added to the dictionary log includes: (i) a table name, (ii) a column index indicating the column, (iii) a new value added to the delta dictionary as a result of the transaction, and (iv) a value identifier used within the column for the new value.

17. The medium of claim 15 , the program code further comprising:

code top periodically merge the delta store with the main store; and

code to, subsequent to said merging, clearing the delta store, value log, and dictionary log.

18. The medium of claim 15 , the program code further comprising:

code to receive a subsequent transaction associated with the column;

code to record the subsequent transaction within the delta store;

code to determine that the subsequent transaction does not require a change to the delta dictionary; and

code to add an entry associated with the subsequent transaction to the value log without adding an entry to the dictionary log.

19. The method of claim 15 , the program code further comprising:

code to receive an instruction to recover from a database crash;

code to recover, in response to the instruction, the main store from a snapshot stored in persisted memory;

code to read and apply entries from the value log;

code to read and apply entries from the dictionary log; and

code to recreate the delta store.

20. A system comprising:

a volatile memory storing a column-oriented table database structure including a main store and a dictionary compressed delta store, wherein the delta store comprises a value identifier vector that includes each value of a record stored in a same row of a column of the database and a delta dictionary associated with the column of the database;

a non-volatile value log storage unit;

a non-volatile dictionary log storage unit; and

a transaction manager coupled to the volatile memory, non-volatile value log storage unit, and non-volatile dictionary log storage unit, wherein the transaction manager is to: (i) receive a transaction associated with the column, record the transaction within the delta store, (iii) add an entry associated with the transaction to the value log of the value identifier vector, the value log comprising a transaction identifier and a row identifier indicating a row in the value identifier vector, and (iv) add an entry associated with the transaction to the dictionary log of the delta dictionary.

21. The system of claim 20 , further comprising:

a recover manager to: (i) receive an instruction to recover from a database crash, (ii) recover, in response to the instruction, the main store from a snapshot stored in persisted memory, (iii) read and apply entries from the value log, (iv) read and apply entries from the dictionary log, and (v) recreate the delta store.

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 May 16, 2012
From: RENKES, FRANK; BOSE, JOOS-HENDRIK
To: SAP AG
Reel/Frame 028216/0837 →