IP Library Granted Patent US 12,259,877
Granted Patent B2
US 12,259,877 · App. 18/668,993 · Granted Mar 25, 2025

Tracking intermediate changes in database data

Inventors: Torsten Grabs (San Mateo, CA); Istvan Cseri (Seattle, WA); Benoit Dageville (San Mateo, CA)
Assignee: Snowflake Inc.
G06F16/2379G06F16/2282G06F16/24554G06F16/2456
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 12,259,877
App. No.
18/668,993
Granted
Mar 25, 2025
Kind
B2
Abstract

Systems, methods, and devices for tracking a series of changes to database data are disclosed. A method includes executing a transaction to modify data in a micro-partition of a table of a database by generating a new micro-partition that embodies the transaction. The method includes associating transaction data with the new micro-partition, wherein the transaction data comprises a timestamp when the transaction was fully executed, and further includes associating modification data with the new micro-partition that comprises an indication of one or more rows of the table that were modified by the transaction. The method includes joining the transaction data with the modification data to generate joined data and querying the joined data to determine a listing of intermediate modifications made to the table between a first timestamp and a second timestamp.

Claims (53)

1. A method comprising:

storing data in a first micro-partition of a table, the first micro-partition including a plurality of columns individually encrypted;

receiving a command related to the stored data in the first micro-partition;

decrypting one or more columns of the first micro-partition to execute a transaction to generate transaction data in response to receiving the command;

performing one or more modifications to the decrypted one or more columns in the first micro-partition to generate a second micro-partition, the second micro-partition including a plurality of columns individually encrypted;

removing the first micro-partition from the table;

generating a delta table, the delta table storing final changes to the stored data in the second micro-partition from the first micro-partition, the delta table being encrypted using a first file key; and

generating modification data, the modification data tracking the modifications performed to the stored data between the second micro-partition and the first micro-partition, the modification data being encrypted using a second file key.

2. The method of claim 1 , further comprising:

joining the modification data with the transaction data to generate joined data, the joined data indicating intermediate changes to the stored data between the second micro-partition and the first micro-partition.

3. The method of claim 2 , wherein the transaction data includes one or more of: an identity of an account that initiated the transaction, a first timestamp when the transaction was requested, a second timestamp when execution of the transaction began, a listing of all rows that were modified by the transaction, and details of the modifications.

4. The method of claim 2 , wherein multiple modifications to a row of a plurality of rows in the first micro-partition are performed and the joined data indicates at least one intermediate change to the row between initial and final values.

5. The method of claim 1 , further comprising:

determining tuple changes between each of a series of sequential micro-partition pairs between the first and second micro-partitions.

6. The method of claim 1 , wherein the modification data is stored in the second micro-partition as metadata, wherein the modification data includes a lineage of modifications made to the table.

7. The method of claim 1 , further comprising:

wherein the delta table includes information indicating which rows have been modified, final values of rows that have been modified between the first and second micro-partitions, and an action type of the modification for each row modified.

8. A system comprising:

one or more processors of a machine; and

a memory storing instructions that, when executed by the one or more processors, cause the machine to perform operations comprising:

storing data in a first micro-partition of a table, the first micro-partition including a plurality of columns individually encrypted;

receiving a command related to the stored data in the first micro-partition;

decrypting one or more columns of the first micro-partition to execute a transaction to generate transaction data in response to receiving the command;

performing one or more modifications to the decrypted one or more columns in the first micro-partition to generate a second micro-partition, the second micro-partition including a plurality of columns individually encrypted;

removing the first micro-partition from the table;

generating a delta table, the delta table storing final changes to the stored data in the second micro-partition from the first micro-partition, the delta table being encrypted using a first file key; and

generating modification data, the modification data tracking the modifications performed to the stored data between the second micro-partition and the first micro-partition, the modification data being encrypted using a second file key.

9. The system of claim 8 , the operations further comprising:

joining the modification data with the transaction data to generate joined data, the joined data indicating intermediate changes to the stored data between the second micro-partition and the first micro-partition.

10. The system of claim 9 , wherein the transaction data includes one or more of: an identity of an account that initiated the transaction, a first timestamp when the transaction was requested, a second timestamp when execution of the transaction began, a listing of all rows that were modified by the transaction, and details of the modifications.

11. The system of claim 9 , wherein multiple modifications to a row of a plurality of rows in the first micro-partition are performed and the joined data indicates at least one intermediate change to the row between initial and final values.

12. The system of claim 8 , the operations further comprising:

determining tuple changes between each of a series of sequential micro-partition pairs between the first and second micro-partitions.

13. The system of claim 8 , wherein the modification data is stored in the second micro-partition as metadata, wherein the modification data includes a lineage of modifications made to the table.

14. The system of claim 8 , the operations further comprising:

wherein the delta table includes information indicating which rows have been modified, final values of rows that have been modified between the first and second micro-partitions, and an action type of the modification for each row modified.

15. A non-transitory computer readable storage media storing instructions that, when executed by one or more processors, cause the one or more processors to:

storing data in a first micro-partition of a table, the first micro-partition including a plurality of columns individually encrypted;

receiving a command related to the stored data in the first micro-partition;

decrypting one or more columns of the first micro-partition to execute a transaction to generate transaction data in response to receiving the command;

performing one or more modifications to the decrypted one or more columns in the first micro-partition to generate a second micro-partition, the second micro-partition including a plurality of columns individually encrypted;

removing the first micro-partition from the table;

generating a delta table, the delta table storing final changes to the stored data in the second micro-partition from the first micro-partition, the delta table being encrypted using a first file key; and

generating modification data, the modification data tracking the modifications performed to the stored data between the second micro-partition and the first micro-partition, the modification data being encrypted using a second file key.

16. The non-transitory computer readable storage media of claim 15 , further comprising:

joining the modification data with the transaction data to generate joined data, the joined data indicating intermediate changes to the stored data between the second micro-partition and the first micro-partition.

17. The non-transitory computer readable storage media of claim 16 , wherein the transaction data includes one or more of: an identity of an account that initiated the transaction, a first timestamp when the transaction was requested, a second timestamp when execution of the transaction began, a listing of all rows that were modified by the transaction, and details of the modifications.

18. The non-transitory computer readable storage media of claim 16 , wherein multiple modifications to a row of a plurality of rows in the first micro-partition are performed and the joined data indicates at least one intermediate change to the row between initial and final values.

19. The non-transitory computer readable storage media of claim 15 , further comprising:

determining tuple changes between each of a series of sequential micro-partition pairs between the first and second micro-partitions.

20. The non-transitory computer readable storage media of claim 15 , wherein the modification data is stored in the second micro-partition as metadata, wherein the modification data includes a lineage of modifications made to the table.

21. The non-transitory computer readable storage media of claim 15 , further comprising:

wherein the delta table includes information indicating which rows have been modified, final values of rows that have been modified between the first and second micro-partitions, and an action type of the modification for each row modified.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 30, 2024
From: GRABS, TORSTEN; CSERI, ISTVAN; DAGEVILLE, BENOIT
To: SNOWFLAKE COMPUTING, INC.
Reel/Frame 068127/0740 →
CHANGE OF NAME Recorded Jul 30, 2024
From: SNOWFLAKE COMPUTING, INC.
To: SNOWFLAKE INC.
Reel/Frame 068222/0611 →
Continuity (7)
Continuation 18179762 · Mar 7, 2023
Continuation 17656960 · Mar 29, 2022
Continuation 17384269 · Jul 23, 2021
Continuation 17219600 · Mar 31, 2021
Continuation 16824676 · Mar 19, 2020
Continuation 16182216 · Nov 6, 2018
Related Publication 20240311369A1 · Sep 19, 2024
References Cited (5)
US 6546402B1 · Beyer · 2003 [cited by examiner]
US 20070106771A1 · Lucash · 2007 [cited by examiner]
US 20110191299A1 · Huynh Huu · 2011 [cited by examiner]
US 20130006963A1 · Chaliparambil · 2013 [cited by examiner]
“Chinese Application Serial No. 201980072404.2, Office Action mailed Dec. 31, 2024”, with English translation, 18 pages. [cited by applicant]