# US 2021/0081460 A1 · Maintaining character set compatibility in database systems

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

- Number: US 2021/0081460 A1
- Document ID: US20210081460A1
- Status: Published application
- Kind: A1
- Application number: 17/103,885
- Filed: 2020-11-24
- Published: 2021-03-18
- Earliest claimed: 2018-01-17
- Assignees: Actian Corporation
- Applicants: Actian Corporation
- Inventors: Ian Philip Kirkham
- Web page: https://patentgrep.com/patent/US20210081460A1

## CPC

- G06F 16/90335: {Query processing}
- G06F 16/164: {File meta data generation}
- G06F 16/23: Updating
- G06F 16/2455: Query execution
- G06F 16/258: {Data format conversion from or to a database}
- G06F 16/9032: Query formulation
- G06F 16/904: Browsing; Visualisation therefor (for navigating the web G06F16/954; browsing optimisation for the web G06F16/957)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Database systems handle queries represented in different character sets. A database system allows data stored in the same database column to be represented in different character sets. In response to a query, the database system returns query results in the same character set as the received query even though the data stored in the database column is in a different character set. The database system creates and maintains a metadata table that stores attributes of database columns. The attributes of database columns include, among others, a data type, and a collation attribute. By tracking the collation attributes for data stored in database columns, the database system determines whether to convert data stored in a database column when processing database queries.

## Claims

### Claim 1

A computer-implemented method, comprising:
storing, by a database system, first data represented in a first character set associated with a first collation attribute value, the first data stored in a first column of a database table;
receiving, from a client application, a database query, the client application associated with a client collation attribute value, the client collation attribute value different than the first collation attribute value;
comparing, by the database system, the first collation attribute value associated with the first column of the database table with the client collation attribute value;
responsive to determining that the first collation attribute value is different from the client collation attribute value, including, by the database system, in an execution plan, a transliterate operator configured to convert the first data represented in the first character set to a client character set associated with the client collation attribute value; and
providing, to the client application, a result of execution of the database query by executing the execution plan, wherein the result provided to the client application is represented in the client character set.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein executing the execution plan including the transliterate operation comprises:
converting the first data represented in the first character set to a second data represented in the client character set;
replacing the first data represented in the first character set stored in the first column of the database table with the second data represented in the client character set; and
updating a metadata associated with the first column of the database table to the client collation attribute value.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein executing the execution plan including the transliterate operation further comprises:
locking the database table during conversion of the first data represented in the first character set.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the transliterate operator is included in the execution plan responsive to determining that the first column of the database table is associated with the received database query.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, further comprising:
receiving, from the client application, a second query, the second query associated with the first column of the database table;
comparing, by the database system, an updated collation attribute value associated with the first column of the database table with the client collation attribute value; and
responsive to determining that the updated collation attribute value associated with the first column of the database table is the same as the client collation attribute value, generating, by the database system, a second execution plan without the transliterate operation for the first column of the database table.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the first character set encodes the first data using a first encoding scheme, the first encoding scheme mapping each character supported by the first character set to a digital representation.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein the first character set is a national character set (NCS) and the second character set is a UTF-8 character set.

### Claim 8

A database system, comprising:
a computer processor; and
a non-transitory computer-readable storage medium storing instructions, the instructions when executed by the computer processor cause the computer processor to:
store, by the database system, first data represented in a first character set associated with a first collation attribute value, the first data stored in a first column of a database table;
receive, from a client application, a database query, the client application associated with a client collation attribute value, the client collation attribute value different than the first collation attribute value;
compare, by the database system, the first collation attribute value associated with the first column of the database table with the client collation attribute value;
responsive to determining that the first collation attribute value is different from the client collation attribute value, include, by the database system, in an execution plan, a transliterate operator configured to convert the first data represented in the first character set to a client character set associated with the client collation attribute value; and
provide, to the client application, a result of execution of the database query by executing the execution plan, wherein the result provided to the client application is represented in the client character set.

### Claim 9 (depends on 8)

The database system of claim 8, wherein the instructions for executing the execution plan including the transliterate operation further causes the computer processor to:
convert the first data represented in the first character set to a second data represented in the client character set;
replace the first data represented in the first character set stored in the first column of the database table with the second data represented in the client character set; and
update a metadata associated with the first column of the database table to the client collation attribute value.

### Claim 10 (depends on 9)

The database system of claim 9, wherein the instructions for executing the execution plan including the transliterate operation further causes the computer processor to:
lock the database table during conversion of the first data represented in the first character set.

### Claim 11 (depends on 8)

The database system of claim 8, wherein the transliterate operator is included in the execution plan responsive to determining that the first column of the database table is associated with the received database query.

### Claim 12 (depends on 11)

The database system of claim 11, wherein the instructions further cause the computer processor to:
receive, from the client application, a second query, the second query associated with the first column of the database table;
compare, by the database system, an updated collation attribute value associated with the first column of the database table with the client collation attribute value; and
responsive to determining that the updated collation attribute value associated with the first column of the database table is the same as the client collation attribute value, generate, by the database system, a second execution plan without the transliterate operation for the first column of the database table.

### Claim 13 (depends on 8)

The database system of claim 8, wherein the first character set encodes the first data using a first encoding scheme, the first encoding scheme mapping each character supported by the first character set to a digital representation.

### Claim 14 (depends on 8)

The database system of claim 8, wherein the first character set is a national character set (NCS) and the second character set is a UTF-8 character set.

### Claim 15

A non-transitory computer-readable storage medium storing instructions, the instructions when executed by a processor cause the processor to:
store, by the database system, first data represented in a first character set associated with a first collation attribute value, the first data stored in a first column of a database table;
receive, from a client application, a database query, the client application associated with a client collation attribute value, the client collation attribute value different than the first collation attribute value;
compare, by the database system, the first collation attribute value associated with the first column of the database table with the client collation attribute value;
responsive to determining that the first collation attribute value is different from the client collation attribute value, include, by the database system, in an execution plan, a transliterate operator configured to convert the first data represented in the first character set to a client character set associated with the client collation attribute value; and
provide, to the client application, a result of execution of the database query by executing the execution plan, wherein the result provided to the client application is represented in the client character set.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the instructions for executing the execution plan including the transliterate operation further causes the processor to:
convert the first data represented in the first character set to a second data represented in the client character set;
replace the first data represented in the first character set stored in the first column of the database table with the second data represented in the client character set; and
update a metadata associated with the first column of the database table to the client collation attribute value.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the instructions for executing the execution plan including the transliterate operation further causes the processor to:
lock the database table during conversion of the first data represented in the first character set.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the transliterate operator is included in the execution plan responsive to determining that the first column of the database table is associated with the received database query.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the instructions further cause the processor to:
receive, from the client application, a second query, the second query associated with the first column of the database table;
compare, by the database system, an updated collation attribute value associated with the first column of the database table with the client collation attribute value; and
responsive to determining that the updated collation attribute value associated with the first column of the database table is the same as the client collation attribute value, generate, by the database system, a second execution plan without the transliterate operation for the first column of the database table.

### Claim 20 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the first character set encodes the first data using a first encoding scheme, the first encoding scheme mapping each character supported by the first character set to a digital representation.
