# US 12,222,944 B2 · 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 12,222,944 B2
- Document ID: US12222944B2
- Status: Granted
- Kind: B2
- Application number: 18/362,399
- Filed: 2023-07-31
- Published: 2023-11-23
- Granted: 2025-02-11
- 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/US12222944B2

## 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 1

A method comprising:
responsive to a query for one or more data items stored in a database, identifying at least one query operator uses data having a format that is different from a storage model format used at the 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 database.

### Claim 2 (depends on 1)

The method of claim 1 further comprising: receiving a query and generating at least one query plan for the received query.

### Claim 3 (depends on 2)

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

### Claim 4 (depends on 1)

The method of claim 1, 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 5

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

### Claim 6

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

### Claim 7 (depends on 1)

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

### Claim 8 (depends on 7)

The method of claim 7, 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 database.

### Claim 9 (depends on 1)

The method of claim 1, wherein a database management system is coupled to the 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 database to store at least one of the one or more data items.

### Claim 10

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:
responsive to a query for one or more data items stored in a database, identifying at least one query operator uses data having a format that is different from a storage model format used at the 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 database.

### Claim 11 (depends on 10)

The system of claim 10 further comprising: receiving a query and generating at least one query plan for the received query.

### Claim 12 (depends on 11)

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

### Claim 13 (depends on 10)

The system of claim 10, 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 14

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

### Claim 15

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

### Claim 16 (depends on 10)

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

### Claim 17 (depends on 16)

The system of claim 16, 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 database.

### Claim 18 (depends on 10)

The system of claim 10, wherein a database management system is coupled to the 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 database to store at least one of the one or more data items.

### Claim 19

A non-transitory computer-readable storage medium including code which when executed by at least one processor causes operations comprising:
responsive to a query for one or more data items stored in a database, identifying at least one query operator uses data having a format that is different from a storage model format used at the 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 database.
