# US 2016/0253372 A1 · Database query processing

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

- Number: US 2016/0253372 A1
- Document ID: US20160253372A1
- Status: Published application
- Kind: A1
- Application number: 14/632,736
- Filed: 2015-02-26
- Published: 2016-09-01
- Earliest claimed: 2015-02-26
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Filip Nguyen; Filip Elias
- Web page: https://patentgrep.com/patent/US20160253372A1

## CPC

- G06F 16/245: Query processing
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Various examples are directed to systems and methods for managing a database organized according to a schema. The database may comprise a database file corresponding to a table described by the schema. The database file may comprise a first row entry corresponding to a first row of the table. The first row entry may comprise at least one data item. A command may be received. The command may modify a first data item in the first row of the table. An indication of the modified value for the first data item may be written to a change location at the first file. The first entry may be modified to include a pointer to the indication of the modified value for the first data item.

## Claims

### Claim 1

A system for managing a database organized according to a schema, the system comprising:
a computer-readable medium, the computer readable medium comprising a first file, wherein the first file corresponds to a database table described by the schema, and wherein the first file comprises a sequence of row entries, wherein each row entry in the sequence of row entries corresponds to a row of the table, and wherein each row entry in the sequence of row entries comprises a sequence of data items in the row corresponding to the row entry; and
at least one processor in communication with the computer-readable medium and programmed to:
receive a command to modify a first data item of the database table, wherein the command indicates a modified value for the first data item;
write a first change entry to the file prior to the sequence of row entries, wherein the first change entry comprises the modified value for the first data item, and an indicator of a column corresponding to the first data item;
identify from the sequence of row entries a first row entry comprising the data item; and
write to the first row entry, at a position corresponding to the first data item, a pointer to the first change entry.

### Claim 2 (depends on 1)

The system of claim 1, wherein the at least one processor is further programmed to:
receive, from a client, a query for a plurality of data items comprising the first data item;
determine that the client has not previously received a result for the query;
load to a cache location and from the first file a set of row entries selected from the sequence of row entries, wherein the set of row entries corresponds to rows potentially relevant to the query, and wherein the set of row entries comprises the first row entry;
at the cache location, create a modified first row entry by replacing the pointer with the modified value for the first data item;
return to the client a result of the query, wherein the result comprises the modified first row entry record value.

### Claim 3 (depends on 1)

The system of claim 1, wherein the at least one processor is further programmed to:
receive, from a client, a query for a plurality of data items comprising the first data item;
determine that the client has previously receive a result for the query;
identify a plurality of change entries, including the first change entry, that have been added to the first file since a most recent result for the query was sent to the client; and
return to the client a result of the query, wherein the result comprises the plurality of change entries.

### Claim 4

A system for managing a database organized according to a schema, the system comprising:
a computer-readable medium, the computer readable medium comprising a first file corresponding to a table described by the schema, wherein the first file comprises a first row entry, wherein the first row entry corresponds to a first row of the table, and wherein the first row entry comprises at least one data item; and
at least one processor in communication with the computer-readable medium and programmed to:
receive a command to modify a first data item in the first row of the table, wherein the command indicates a modified value for the first data item;
write an indication of the modified value for the first data item to a change location at the first file;
identify the first row entry from the file; and
write to the first row entry a pointer to the indication of the modified value for the first data item.

### Claim 5 (depends on 4)

The system of claim 4, wherein the at least one processor is further programmed to write to the change location at the first file, in association with the modified value for the first data item, an indicator of a column corresponding to the first data item.

### Claim 6 (depends on 4)

The system of claim 4, wherein the first file comprises a set of sequential row entries comprising the first row entry, and wherein the change location at the first file is prior to the set of sequential row entries.

### Claim 7 (depends on 4)

The system of claim 4, wherein the first file comprises a set of sequential row entries comprising the first row entry, and wherein the change location at the first file is after the set of sequential row entries.

### Claim 8 (depends on 4)

The system of claim 4, wherein the at least one processor is further programed to:
receive, from a client, a query for the first data item;
determine that the client has not previously received a result for the query;
load a plurality of row entries, the plurality of row entries comprising the first row entry;
modify the loaded first row entry to replace the pointer with the modified value for the first data item;
return to the client a result of the query, wherein the result comprises the modified value for the first data item.

### Claim 9 (depends on 8)

The system of claim 8, wherein the at least one processor is further programmed to write to a query log an indication that the client received the result of the query.

### Claim 10 (depends on 9)

The system of claim 9, wherein the at least one processor is further programmed to:
receive a command to modify a second data item in the first row of the table, wherein the command indicates a modified value for the second data item;
write an indication of the modified value for the second data item to the change location at the first file;
write to the first row entry, at a position corresponding to the second data item, a pointer to the indication of the modified value for the second data item.

### Claim 11 (depends on 10)

The system of claim 10, wherein the at least one processor is further programmed to write to the query log an indication of the command to modify the second record.

### Claim 12 (depends on 4)

The system of claim 4, wherein the at least one processor is further programmed to:
receive, from a client, a query to the database;
determine that the client has previously received a result of the query;
identify at least one change to the database that has occurred since the client previously received the result of the query;
read from the change location at least one data item value corresponding to the at least one change; and
transmit the at least one data item value to the client.

### Claim 13 (depends on 4)

The system of claim 4, wherein the at least one processor is further programmed to:
receive from a client a query for the first data item;
determine that the client has previously received a result of the query;
identify at least one modified value for a data item at the change location of the first file that has been added to the first file since the client previously received the result of the query, wherein the at least one modified value for the data item comprises the modified value for the first data item; and
return to the second client a result of the second query, wherein the result of the second query comprises the at least one change entry.

### Claim 14 (depends on 4)

The system of claim 4, wherein the first file also comprises at least one row entry corresponding to a row of a second table described by the schema.

### Claim 15

A system for managing a database organized according to a schema, the system comprising:
a computer-readable medium, the computer readable medium comprising a first file corresponding to a table described by the schema, wherein the first file comprises:
a first change entry comprising a modified value for a first data item, wherein the first change entry is written to a change location of the first file; and
a first row entry, wherein the first row entry corresponds to a first row of the table, and wherein the first row entry comprises at a position corresponding to the first data item, a pointer to the first change entry; and
at least one processor in communication with the computer-readable medium and programmed to:
receive from a client a query for the first data item;
determine that the client has not previously received a result for the query;
load from the first file a plurality of row entries, the plurality of row entries comprising the first row entry;
modify the loaded first row entry to replace the pointer with the modified value for the first data item; and
return to the client a result of the query, wherein the result of the query comprises the modified value for the first data item.

### Claim 16 (depends on 15)

The system of claim 15, wherein the at least one processor is further programmed to:
receive from a second client a second query for the first data item;
determine that the second client has previously received a result of the second query;
identify at the change location at least one change entry that has been added to the first file since the second client previously received the result of the second query, the at least one change entry comprising the first change entry; and
return to the second client a result of the second query, wherein the result of the second query comprises the at least one change entry.

### Claim 17 (depends on 15)

The system of claim 15, wherein the first file comprises a set of sequential row entries comprising the first row entry, and wherein the change location at the first file is prior to the set of sequential row entries.

### Claim 18 (depends on 15)

The system of claim 15, wherein the first file comprises a set of sequential row entries comprising the first row entry, and wherein the change location at the first file is after the set of sequential row entries.

### Claim 19 (depends on 15)

The system of claim 15, wherein the first change entry further comprises an indication of a column corresponding to the first data item.

### Claim 20 (depends on 15)

The system of claim 15, wherein the first file also comprises a second row entry corresponding to a first row of a second table described by the schema.
