# US 2017/0255662 A1 · Database engine for mobile devices

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

- Number: US 2017/0255662 A1
- Document ID: US20170255662A1
- Status: Published application
- Kind: A1
- Application number: 15/396,312
- Filed: 2016-12-30
- Published: 2017-09-07
- Earliest claimed: 2016-03-04
- Assignees: Inviso, Inc.
- Applicants: Inviso Corp.
- Inventors: Jeff Scherrer
- Web page: https://patentgrep.com/patent/US20170255662A1

## CPC

- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/196: {Specific adaptations of the file system to access devices and non-file objects via standard file system access operations, e.g. pseudo file systems (dedicated interfaces to storage systems G06F3/0601)}
- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 16/24569: {Query processing with adaptation to specific hardware, e.g. adapted for using GPUs or SSDs}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A novel database query and writing engine for rapidly storing, retrieving and modifying large amounts of data on mobile devices is disclosed. The innovative database engine software comprises the creation of a set of files for each table in a database, wherein CRUD (create-retrieve-update-delete) operations are streamlined for mobile or other devices by organizing memory for efficient read and write operations. The set of associated files segregate fixed length and variable length data types for faster seek, read and write operations, and keep track of changes to values and database table schema changes in terms of deletions and insertions of rows and columns. The innovative database engine manages complexities associated with storage and retrieval of large amounts of data, which comprise CRUD operations. In addition, the database engine introduces a dual buffer system to more rapidly process blocks of database memory.

## Claims

### Claim 1

A method for processing a database, comprising:
i) providing a database query engine for querying a relational database having at least one table and column and row schema for the at least one table, said database query engine comprising database query software stored on at least one storage medium accessible via an API or a SDK; and
ii) creating a set of files on the at least one storage medium, said set of files representing the relational database, the set of files comprising:
a) at least one Fixed-Length Values file for storing fixed-length values read from said relational database into the Fixed-Length Values file, the Fixed-Length Values file having a schema that is substantially the same as the schema of the relational database;
b) at least one Row-Existence file wherein said at least one Row Existence file comprises at least one data byte, each of the at least one data byte having up to 8 row existence flag bits, each flag bit corresponding to one of the rows in the one or more fixed-length values file, the number of data bytes in the row-existence file being at least the sum of the quotient and the modulus of the number of rows in the fixed-length values file divided by 8; and
c) at least one Columns file to store metadata for each column of the Fixed-Length Values file.

### Claim 2 (depends on 1)

The method of claim 1, wherein the step of creating a set of files on the at least one storage medium further comprises the steps of:
i) creating at least one Variable-Length Values file for storing variable length values read from said relational database, wherein the one or more variable-length values residing in the database are stored; and
ii) creating at least one Fragments file for storing pointers to offsets of fragments in the variable length values file, said fragments being gaps existing in the variable length values file created after a pre-existing variable length value is deleted or replaced by a new variable-length value that is shorter than the pre-existing variable length value.

### Claim 3 (depends on 2)

The method for processing a database of claim 2, further comprising the step of inserting a fixed-length pointer in the fixed-length values file at address offsets corresponding to each of the one or more columns residing in said database at a row and column position, wherein said fixed-length pointer comprises an address offset and length byte pointing to each of the one or more variable-length values stored in the Variable-Length Values file.

### Claim 4 (depends on 1)

The method for processing a database of claim 1, further comprising:
i) creating a dual buffer in a memory location, said dual buffer comprising a first buffer and a second buffer;
ii) reading a first block of data from the fixed-length values file into the first buffer for processing by a database processing engine;
iii) swapping the buffer pointers so that the said second buffer is prepared for reading the second block, and the first buffer is ready to be processed;
iv) reading a second block of data from the fixed-length values file into the second buffer;
v) processing the first block of data from the first buffer in parallel with reading a second block of data from the fixed-length values file into the second buffer; and
vi) reading the first block of data to the fixed-length values file from the first buffer after processing by the database processing engine; and
vii) swapping the buffer pointers so that the said second buffer is prepared for processing the second block of data, and the first buffer is prepared for reading a third block of data from the.

### Claim 5 (depends on 1)

The method for processing a database of claim 1, further comprising the step of passing one or more expression trees directly to the execution engine, wherein said one or more expression trees are converted into methods that are executed against the database.

### Claim 6 (depends on 5)

The method for processing a database of claim 5, wherein the step of passing one or more expression trees directly to the execution engine comprises converting the one or more expression trees into at least one method for deleting at least one column, and updating the columns file.

### Claim 7 (depends on 5)

The method for processing a database of claim 5, wherein the step of passing one or more expression trees directly to the execution engine comprises converting the one or more expression trees into at least one method for adding or deleting at least one row in the Fixed-Length Values file, wherein the row existence file is updated by changing the Boolean state of the flag bit in the Row Existence file corresponding to the table index of the added row.

### Claim 8 (depends on 5)

The method for processing a database of claim 5, wherein the step of passing one or more expression trees directly to the execution engine comprises converting the one or more expression trees into at least one method for updating at least one column in the fixed-length values file, wherein the metadata for the column is updated in the Columns file.

### Claim 9 (depends on 5)

The method for processing a database of claim 5, wherein the step of passing one or more expression trees directly to the execution engine comprises converting the one or more expression trees into at least one method for updating at least one row contained in the Fixed-Length Values file by updating at least one fixed-length value, each of the at least one fixed-length values having a row index corresponding to the at least one row.

### Claim 10 (depends on 5)

The method for processing a database of claim 5, wherein the step of passing one or more expression trees directly to the execution engine comprises converting the one or more expression trees into at least one method for updating at least one variable-length value contained in the Variable-Length Values file, and accessing and updating the at least one variable-length value pointer contained in the Fragments file.

### Claim 11 (depends on 5)

The method for processing a database of claim 5, wherein the step of passing one or more expression trees directly to the execution engine comprises converting the one or more expression trees into at least one method for reading the blocks of data and swapping buffers to allow one buffer to be read in parallel with another buffer being operated against.

### Claim 12 (depends on 1)

The method for processing a database of claim 1, further comprising the step of changing Boolean state of a row existence flag bit in the Row Existence file when the corresponding row is deleted from the database or added to the database.

### Claim 13 (depends on 12)

The method for processing a database of claim 12, wherein the step of changing the Boolean state of a row existence flag bit in the Row Existence file comprises setting said row existence flag bit from logical zero to logical one when the corresponding row is reclaimed by a newly inserted row.

### Claim 14 (depends on 12)

The method for processing a database of claim 12, wherein the step of changing the Boolean state of a row existence flag bit in the Row Existence file comprises clearing said row existence flag bit from logical one to logical zero when the corresponding row is reclaimed by a newly inserted row.

### Claim 15 (depends on 12)

The method for processing a database of claim 12, wherein the step of changing the Boolean state of a row existence flag it in the Row Existence file comprises clearing said row existence flag bit from a logical one to a logical zero when the corresponding row is deleted.

### Claim 16 (depends on 12)

The method for processing a database of claim 12, wherein the step of changing the Boolean state of a row existence flag it in the Row Existence file comprises setting said row existence flag bit from a logical zero to a logical one when the corresponding row is deleted.

### Claim 17 (depends on 1)

The method for processing a database of claim 1, wherein the step of creating one or more fixed-length values files comprises creating one or more fixed-length values files having row headers comprising metadata containing the number of nullable columns contained within each row of the fixed-length values file.

### Claim 18 (depends on 16)

The method for processing a database of claim 16, wherein the metadata created in the step of creating one or more fixed-length values files having row headers comprising metadata containing the number of nullable columns contained within each row of the fixed-length values file comprise one or more data bytes, each of the one or more data bytes storing up to eight nullable column identification bits, the value of each of said nullable column identification bits corresponds to a nullable column value in the row.

### Claim 19 (depends on 16)

The method for processing a database of claim 16, wherein the step of creating one or more fixed-length values files having row headers comprising metadata containing the number of nullable columns contained within each row of the fixed-length values file further comprises setting each nullable column identification bit when the corresponding column within the row contains a value, and clearing said nullable column identification bit when the corresponding column within the row contains is null.

### Claim 20 (depends on 1)

The method for processing a database of claim 1, wherein the step of querying a set of rows from a table is performed by compiling a set of expressions that perform deserialization of data from either the first buffer or the second buffer.

### Claim 21 (depends on 11)

The method for processing a database of claim 11, wherein the step of compiling a set of expressions based on how the data is being queried, interleaved with expressions based on how the data is stored in the files and the combination of these two sets of expressions making up the expression set that gets compiled and executed against the buffers.

### Claim 22 (depends on 1)

The method for processing a database of claim 1, wherein the database and the database query engine software are stored on the same mass storage device.

### Claim 23 (depends on 22)

The method for processing a database of claim 22, wherein the mass storage device is carried on a mobile computing device.
