# US 2022/0292067 A1 · Technique of comprehensively supporting multi-value, multi-field, multilevel, multi-position functional index over stored aggregately stored data in rdbms

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

- Number: US 2022/0292067 A1
- Document ID: US20220292067A1
- Status: Published application
- Kind: A1
- Application number: 17/198,159
- Filed: 2021-03-10
- Published: 2022-09-15
- Earliest claimed: 2021-03-10
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: HUI ZHANG; ZHEN HUA LIU; YING LU; BEDA CHRISTOPH HAMMERSCHMIDT; DOUGLAS JAMES MCMAHON; DENIS B. MUKHIN
- Web page: https://patentgrep.com/patent/US20220292067A1

## CPC

- G06F 16/22: Indexing; Data structures therefor; Storage structures
- G06F 16/2246: {Trees, e.g. B+trees}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/284: {Relational databases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Herein is acceleration for JavaScript object notation (JSON) documents in a relational database based on multilevel, multifield, multivalued indexing and querying. In an embodiment, into a table in a relational database, a computer stores many hierarchical data objects that respectively contain multiple levels that respectively contain one or more fields. An index is generated for indexed values in fields in at least two of the multiple levels. Based on the index, a database statement that references the table in the relational database and at least one of the indexed fields is executed. Indices herein provide matching to more fields in more levels of hierarchical data objects thereby decreasing or eliminating further filtering by brute force after index access. Matching ordinal positions within an array field needs no further filtration after index access. A single index provides increased spatial locality of index entries for acceleration. Index maintenance is minimized for acceleration.

## Claims

### Claim 1

A method comprising:
storing, in a table in a relational database, a plurality of hierarchical data objects, wherein each hierarchical data object of the plurality of hierarchical data objects contains a respective plurality of levels, and each level of the plurality of levels of the hierarchical data object contains respective one or more fields;
generating an index for an indexed plurality of values in a plurality of fields in at least two levels of the pluralities of levels of the plurality of hierarchical data objects;
executing, based on said index for said indexed plurality of values in said plurality of fields in said at least two levels, a database statement that references said table in the relational database and at least one field of said plurality of fields.

### Claim 2 (depends on 1)

The method of claim 1 wherein a field in said plurality of fields in said at least two levels in a hierarchical data object of said plurality of hierarchical data objects contains a field plurality of values in said indexed plurality of values.

### Claim 3 (depends on 2)

The method of claim 2 wherein:
said field plurality of values in said field in said hierarchical data object are ordered in a sequence of respective ordinal positions;
the method further comprises indicating said ordinal position of a value in said field plurality of values in said field in said hierarchical data object within one selected from the group consisting of:
said database statement that references said at least one field of said plurality of fields, and
said index for said indexed plurality of values in said plurality of fields in said at least two levels.

### Claim 4 (depends on 3)

The method of claim 3 wherein said indicating said ordinal position of said value comprises said index indexing said ordinal position of said value in a same way as said generating said index for said indexed plurality of values in said plurality of fields in said at least two levels.

### Claim 5 (depends on 2)

The method of claim 2 wherein:
said database statement contains a predicate that matches multiple distinct or non-distinct values in said field plurality of values in said field in said hierarchical data object;
said executing said database statement comprises generating a same result as if said predicate had matched only one value in said field plurality of values in said field in said hierarchical data object.

### Claim 6 (depends on 2)

The method of claim 2 wherein:
said field plurality of values in said field in said hierarchical data object contains multiple distinct or non-distinct values;
said generating said index for said indexed plurality of values in said plurality of fields in said at least two levels comprises generating multiple index entries in said index for same said hierarchical data object.

### Claim 7 (depends on 2)

The method of claim 2 wherein:
said field plurality of values in said field in said hierarchical data object contains duplicate values;
said generating said index for said indexed plurality of values in said plurality of fields in said at least two levels does not comprise generating multiple index entries in said index for same said hierarchical data object.

### Claim 8 (depends on 1)

The method of claim 1 wherein said storing the plurality of hierarchical data objects comprising storing the plurality of hierarchical data objects in a single column of the table.

### Claim 9 (depends on 1)

The method of claim 1 wherein said index for said indexed plurality of values in said plurality of fields in said at least two levels comprises a B+ tree that contains a plurality of tree leaves that contain said indexed plurality of values in said plurality of fields in said at least two levels.

### Claim 10 (depends on 1)

The method of claim 1 wherein said generating said index for said indexed plurality of values in said plurality of fields in said at least two levels is based on a data definition language (DDL) statement.

### Claim 11 (depends on 1)

The method of claim 1 further comprising revising a hierarchical data object of said plurality of hierarchical data objects in said table without accessing said index for said indexed plurality of values in said plurality of fields in said at least two levels.

### Claim 12 (depends on 1)

The method of claim 1 wherein:
said generating said index for said indexed plurality of values in said plurality of fields in said at least two levels comprises:
generating a first index entry in said index for a first value in said indexed plurality of values for a hierarchical data object of said plurality of hierarchical data objects, and
generating a second index entry in said index for a second value in said indexed plurality of values for same said hierarchical data object;
said executing said database statement comprises deleting said first index entry for said hierarchical data object without deleting said second index entry for same said hierarchical data object.

### Claim 13 (depends on 1)

The method of claim 1 further comprising generating a second index for a second indexed plurality of values in a second plurality of fields in a second at least two levels of the plurality of levels of same said plurality of hierarchical data objects.

### Claim 14 (depends on 1)

The method of claim 1 wherein said executing said database statement comprises accessing said index for said indexed plurality of values in said plurality of fields in said at least two levels based on an invocation in said database statement of at least one selected from the group consisting of: JSON_EXISTS, JSON_VALUE, JSON_TRANSFORM, and JSON_MERGEPATCH.

### Claim 15 (depends on 1)

The method of claim 1 wherein said plurality of hierarchical data objects are a plurality of extensible markup language (XML) documents.

### Claim 16

One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause:
storing, in a table in a relational database, a plurality of hierarchical data objects, wherein each hierarchical data object of the plurality of hierarchical data objects contains a respective plurality of levels, and each level of the plurality of levels of the hierarchical data object contains respective one or more fields;
generating an index for an indexed plurality of values in a plurality of fields in at least two levels of the pluralities of levels of the plurality of hierarchical data objects;
executing, based on said index for said indexed plurality of values in said plurality of fields in said at least two levels, a database statement that references said table in the relational database and at least one field of said plurality of fields.

### Claim 17 (depends on 16)

The one or more non-transitory computer-readable media of claim 16 wherein a field in said plurality of fields in said at least two levels in a hierarchical data object of said plurality of hierarchical data objects contains a field plurality of values in said indexed plurality of values.

### Claim 18 (depends on 16)

The one or more non-transitory computer-readable media of claim 16 wherein:
said generating said index for said indexed plurality of values in said plurality of fields in said at least two levels comprises:
generating a first index entry in said index for a first value in said indexed plurality of values for a hierarchical data object of said plurality of hierarchical data objects, and
generating a second index entry in said index for a second value in said indexed plurality of values for same said hierarchical data object;
said executing said database statement comprises deleting said first index entry for said hierarchical data object without deleting said second index entry for same said hierarchical data object.

### Claim 19 (depends on 16)

The one or more non-transitory computer-readable media of claim 16 wherein said executing said database statement comprises accessing said index for said indexed plurality of values in said plurality of fields in said at least two levels based on an invocation in said database statement of at least one selected from the group consisting of: JSON_EXISTS, JSON_VALUE, JSON_TRANSFORM, and JSON_MERGEPATCH.

### Claim 20 (depends on 16)

The one or more non-transitory computer-readable media of claim 16 wherein said plurality of hierarchical data objects are a plurality of extensible markup language (XML) documents.
