# US 2024/0004837 A1 · Deleting data in a versioned database

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

- Number: US 2024/0004837 A1
- Document ID: US20240004837A1
- Status: Published application
- Kind: A1
- Application number: 18/345,420
- Filed: 2023-06-30
- Published: 2024-01-04
- Earliest claimed: 2022-06-30
- Assignees: Kinaxis Inc.
- Applicants: Kinaxis Inc.
- Inventors: Marin CREANGA; Dylan ELLICOTT
- Web page: https://patentgrep.com/patent/US20240004837A1

## CPC

- G06F 16/162: {Delete operations (erasing in storage systems G06F3/0652)}
- G06F 16/1727: {Details of free space management performed by the file system (saving storage space on storage systems G06F3/0608; management of blocks in storage devices G06F3/064)}
- G06F 16/219: {Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods for deleting data in a versioned database, comprising: generating a version visibility data structure (VVDS) from a version graph and scenario structure; determining each combination of feasible scenarios that when deleted, delete memory; evaluating an amount of memory reclaimed for each combination of feasible scenarios; and deleting one or more combination of scenarios to free up a specific amount of memory.

## Claims

### Claim 1

A computer-implemented method for deleting data in a versioned database, the method comprising:
generating, by a processor, a version visibility data structure (VVDS) from a version graph and scenario structure;
determining, by the processor, each combination of feasible scenarios that when deleted, delete memory;
evaluating, by the processor, an amount of memory reclaimed for each combination of feasible scenarios; and
deleting, by the processor, one or more combination of scenarios to free up a specific amount of memory.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein generating the VVDS comprises:
initializing, by the processor, the VVDS by setting a unique version as a key to an entry of the VVDS, and a respective empty Version Scenario List (VSL) in the entry;
iterating, by the processor, a list of all scenarios in the database;
for each scenario in the database:
accessing, by the processor, a respective Scenario Version List (SVL):
iterating, by the processor, each version in the respective SVL;
for each version in the respective SVL:
finding, by the processor, a corresponding entry in the VVDS; and
adding, by the processor, the respective scenario to the VSL corresponding to the version in the respective SVL.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein determining each combination of feasible scenarios comprises:
iterating, by the processor, each entry in the VVDS;
for each entry in the VVDS:
obtaining, by the processor, a combination of scenarios in a Version Scenario List (VSL) of each entry.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein evaluating the amount of memory reclaimed for each combination of feasible scenarios comprises:
obtaining, by the processor, a corresponding version associated with each combination of feasible scenarios; and
determining, by the processor, an amount of memory used by the corresponding version.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein determining the amount of memory used by the corresponding version comprises:
obtaining, by the processor, a set of record data containers associated with the corresponding version;
for each record data container in the set of record data containers:
returning, by the processor, an on-disk size of the record data container; or
returning, by the processor, an estimate of an amount of memory of the record data container based on a total number of records in the record data container, a total number of records in the record data container and an overhead; or
returning, by the processor, an accurate amount of memory comprising:
loading, by the processor, the record data container in memory; and
returning, by the processor an actual memory footprint of the record data container loaded in memory.

### Claim 6

A system for deleting data in a versioned database comprising:
a processor; and
a memory storing instructions that, when executed by the processor, configure the system to:
generate, by the processor, a version visibility data structure (VVDS) from a version graph and scenario structure;
determine, by the processor, each combination of feasible scenarios that when deleted, delete memory;
evaluate, by the processor, an amount of memory reclaimed for each combination of feasible scenarios; and
delete, by the processor, one or more combination of scenarios to free up a specific amount of memory.

### Claim 7 (depends on 6)

The system of claim 6, wherein when generating the VVDS, the system is further configured to:
initialize, by the processor, the VVDS by setting a unique version as a key to an entry of the VVDS, and a respective empty Version Scenario List (VSL) in the entry;
iterate, by the processor, a list of all scenarios in the database;
for each scenario in the database:
access, by the processor, a respective Scenario Version List (SVL):
iterate, by the processor, each version in the respective SVL;
for each version in the respective SVL:
find, by the processor, a corresponding entry in the VVDS; and
add, by the processor, the respective scenario to the VSL corresponding to the version in the respective SVL.

### Claim 8 (depends on 6)

The system of claim 6, wherein when determining each combination of feasible scenarios, the system is further configured to:
iterate, by the processor, each entry in the VVDS;
for each entry in the VVDS:
obtain, by the processor, a combination of scenarios in a Version Scenario List (VSL) of each entry.

### Claim 9 (depends on 6)

The system of claim 6, wherein when evaluating the amount of memory reclaimed for each combination of feasible scenarios, the system is further configured to:
obtain, by the processor, a corresponding version associated with each combination of feasible scenarios; and
determine, by the processor, an amount of memory used by the corresponding version.

### Claim 10 (depends on 9)

The system of claim 9, wherein when determining the amount of memory used by the corresponding version, the system is further configured to:
obtain, by the processor, a set of record data containers associated with the corresponding version;
for each record data container in the set of record data containers:
return, by the processor, an on-disk size of the record data container; or
return, by the processor, an estimate of an amount of memory of the record data container based on a total number of records in the record data container, a total number of records in the record data container and an overhead; or
return, by the processor, an accurate amount of memory comprising:
load, by the processor, the record data container in memory; and
return, by the processor an actual memory footprint of the record data container loaded in memory.

### Claim 11

A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:
generate, by a processor, a version visibility data structure (VVDS) from a version graph and scenario structure;
determine, by the processor, each combination of feasible scenarios that when deleted, delete memory;
evaluate, by the processor, an amount of memory reclaimed for each combination of feasible scenarios; and
delete, by the processor, one or more combination of scenarios to free up a specific amount of memory.

### Claim 12 (depends on 11)

The non-transitory computer-readable storage medium of claim 11, wherein when generating the VVDS, the instructions that when executed by the computer, cause the computer to:
initialize, by the processor, the VVDS by setting a unique version as a key to an entry of the VVDS, and a respective empty Version Scenario List (VSL) in the entry;
iterate, by the processor, a list of all scenarios in a versioned database;
for each scenario in the database:
access, by the processor, a respective Scenario Version List (SVL):
iterate, by the processor, each version in the respective SVL;
for each version in the respective SVL:
find, by the processor, a corresponding entry in the VVDS; and
add, by the processor, the respective scenario to the VSL corresponding to the version in the respective SVL.

### Claim 13 (depends on 11)

The non-transitory computer-readable storage medium of claim 11, wherein when determining each combination of feasible scenarios, the instructions that when executed by the computer, cause the computer to:
iterate, by the processor, each entry in the VVDS;
for each entry in the VVDS:
obtain, by the processor, a combination of scenarios in a Version Scenario List (VSL) of each entry.

### Claim 14 (depends on 11)

The non-transitory computer-readable storage medium of claim 11, wherein when evaluating the amount of memory reclaimed for each combination of feasible scenarios, the instructions that when executed by the computer, cause the computer to:
obtain, by the processor, a corresponding version associated with each combination of feasible scenarios; and
determine, by the processor, an amount of memory used by the corresponding version.

### Claim 15 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, wherein when determining the amount of memory used by the corresponding version, the instructions that when executed by the computer, cause the computer to:
obtain, by the processor, a set of record data containers associated with the corresponding version;
for each record data container in the set of record data containers:
return, by the processor, an on-disk size of the record data container; or
return, by the processor, an estimate of an amount of memory of the record data container based on a total number of records in the record data container, a total number of records in the record data container and an overhead; or
return, by the processor, an accurate amount of memory comprising:
load, by the processor, the record data container in memory; and
return, by the processor an actual memory footprint of the record data container loaded in memory.
