# US 2022/0035815 A1 · Processing database queries using format conversion

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

- Number: US 2022/0035815 A1
- Document ID: US20220035815A1
- Status: Published application
- Kind: A1
- Application number: 17/500,194
- Filed: 2021-10-13
- Published: 2022-02-03
- Earliest claimed: 2010-12-30
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Chanho Jeong; Sangyong Hwang; Sang Kyun Cha; Sung Heun Wi
- Web page: https://patentgrep.com/patent/US20220035815A1

## CPC

- G06F 16/24542: {Plan optimisation}
- G06F 16/00: Information retrieval; Database structures therefor; File system structures therefor
- G06F 16/20: of structured data, e.g. relational data
- G06F 16/24547: {Optimisations to support specific applications; Extensibility of optimisers}
- G06F 16/24557: {Efficient disk access during query execution}
- G06F 16/258: {Data format conversion from or to a database}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Devices, methods and systems for processing database queries formatted differently than the database storage model being queried are disclosed. Processing database queries independent of the storage model of the queried database may be performed by receiving a query for one or more data items stored in a database, determining whether to use at least one query operator that uses data having a format different from the storage model format of at least one of one or more data items stored in the database and converting the format of the data used by the at least one query operator to a format that matches the storage model format of at least one of one or more data items stored in the database. Related systems, methods, and articles of manufacture are also described.

## Claims

### Claim at position 1

1-19. (canceled)

### Claim 20

A method comprising:
receiving a query for one or more data items stored at least in part in an in-memory database, wherein the query comprises a query plan including at least one operator;
identifying the at least one query operator uses data having a format that is different from a storage model format used at the in-memory database to store at least one of the one or more data items, wherein the format and the storage model format differ with respect to a row format and a column format; and
in response to the identifying, converting the format of the data used by the at least one query operator to the storage model format of the at least one of the one or more data items stored in the in-memory database.

### Claim 21 (depends on 20)

The method of claim 20 further comprising: generating at least one query plan, for the received query.

### Claim 22 (depends on 21)

The method of claim 21, wherein the identifying and the converting is performed based on the at least one query plan.

### Claim 23 (depends on 20)

The method of claim 20, wherein the at least one query operator comprises a select operator, a project operator, an aggregate operator, an insert operator, a delete operator, and/or an update operator.

### Claim 24

The method of 20, wherein the converting further comprises: converting the format of the data used by the at least one query operator to the column format.

### Claim 25

The method of 20, wherein the converting further comprises: converting the format of the data used by the at least one query operator to the row format.

### Claim 26 (depends on 20)

The method of claim 20, wherein the identifying and the converting is performed on a plurality of query plans for the query.

### Claim 27 (depends on 26)

The method of claim 26, further comprising: assessing the plurality of query plans based on a cost-based optimization and/or a syntax base optimization, the assessing including the at least one query operator undergoing the converting of the format of the data used by the at least one query operator to the storage model format of the at least one of the one or more data items stored in the in-memory database.

### Claim 28 (depends on 20)

The method of claim 20, wherein a database management system is coupled to the in-memory database, and wherein the database management system includes a query processor configured to at least receive the query and identify the at least one query operator using the data having the format that is different from the storage model format used at the in-memory database to store at least one of the one or more data items.

### Claim 29

A system comprising:
at least one processor; and
at least one memory including code which when executed by the at least one processor causes operations comprising:
receiving a query for one or more data items stored at least in part in an in-memory database, wherein the query comprises a query plan including at least one operator;
identifying the at least one query operator uses data having a format that is different from a storage model format used at the in-memory database to store at least one of the one or more data items, wherein the format and the storage model format differ with respect to a row format and a column format; and
in response to the identifying, converting the format of the data used by the at least one query operator to the storage model format of the at least one of the one or more data items stored in the in-memory database.

### Claim 30 (depends on 29)

The system of claim 29 further comprising: generating at least one query plan, for the received query.

### Claim 31 (depends on 30)

The system of claim 30, wherein the identifying and the converting is performed based on the at least one query plan.

### Claim 32 (depends on 29)

The system of claim 29, wherein the at least one query operator comprises a select operator, a project operator, an aggregate operator, an insert operator, a delete operator, and/or an update operator.

### Claim 33

The system of 29, wherein the converting further comprises: converting the format of the data used by the at least one query operator to the column format.

### Claim 34

The system of 29, wherein the converting further comprises: converting the format of the data used by the at least one query operator to the row format.

### Claim 35 (depends on 29)

The system of claim 29, wherein the identifying and the converting is performed on a plurality of query plans for the query.

### Claim 36 (depends on 35)

The system of claim 35, further comprising: assessing the plurality of query plans based on a cost-based optimization and/or a syntax base optimization, the assessing including the at least one query operator undergoing the converting of the format of the data used by the at least one query operator to the storage model format of the at least one of the one or more data items stored in the in-memory database.

### Claim 37 (depends on 29)

The system of claim 29, wherein a database management system is coupled to the in-memory database, and wherein the database management system includes a query processor configured to at least receive the query and identify the at least one query operator using the data having the format that is different from the storage model format used at the in-memory database to store at least one of the one or more data items.

### Claim 38

A non-transitory computer-readable storage medium including code which when executed by at least one processor causes operations comprising:
receiving a query for one or more data items stored at least in part in an in-memory database, wherein the query comprises a query plan including at least one operator;
identifying the at least one query operator uses data having a format that is different from a storage model format used at the in-memory database to store at least one of the one or more data items, wherein the format and the storage model format differ with respect to a row format and a column format; and
in response to the identifying, converting the format of the data used by the at least one query operator to the storage model format of the at least one of the one or more data items stored in the in-memory database.
