# US 2022/0027344 A1 · System and method for supporting sql-based rich queries in hyperledger fabric blockchains

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

- Number: US 2022/0027344 A1
- Document ID: US20220027344A1
- Status: Published application
- Kind: A1
- Application number: 17/496,208
- Filed: 2021-10-07
- Published: 2022-01-27
- Earliest claimed: 2018-07-27
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: CARLO INNOCENTI
- Web page: https://patentgrep.com/patent/US20220027344A1

## CPC

- G06F 16/2365: {Ensuring data consistency and integrity}
- G06Q 10/10: Office automation; Time management
- G06F 16/219: {Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477)}
- G06F 16/2474: {Sequence data queries, e.g. querying versioned data}
- G06F 16/284: {Relational databases}
- G06Q 20/223: {based on the use of peer-to-peer networks}
- H04L 9/0637: {Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]}
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L 63/00: {Network architectures or network communication protocols for network security (cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00; network architectures or network communication protocols for wireless network security H04W12/00; security arrangements for protecting computers or computer systems against unauthorised activity G06F21/00)}
- G06Q 10/08: Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q 50/10: Services
- H04L 9/3263: {involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements (network architectures or network communication protocols for supporting authentication of entities using certificates in a packet data network H04L63/0823)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Described herein are systems and methods for supporting SQL-based rich queries in a blockchain fabric. In accordance with an embodiment, the systems and methods provided herein provide the ability to execute SQL queries to allow for the creation of complex smart contracts much easier and more maintainable manner. Also, performance is improved both by pushing the data filtering back to the storage engine (rather than happening at the smart contract level), and by being able to rely on relational engines which support concurrent read and write data access. As well, the state of the world database can also provide for concurrent read/write access.

## Claims

### Claim 1

A system for supporting SQL-based rich queries in a blockchain fabric comprising:
one or more computers, each comprising a microprocessor;
a blockchain fabric, the blockchain fabric comprising a ledger of a plurality of blocks;
a state of the world database, the state of the world database being populated by a persistence engine running against the blockchain fabric;
wherein a smart contract comprising at least one rich query is run against the state of the world database.

### Claim 2 (depends on 1)

The system of claim 1,
wherein the at least one rich query runs a comparison among a plurality of values contained within the state of the world database.

### Claim 3 (depends on 2)

The system of claim 2,
wherein the state of the world database comprises a versioned database and a relational database interface.

### Claim 4 (depends on 3)

The system of claim 3,
wherein the state of the world database is accessible by the blockchain fabric.

### Claim 5 (depends on 4)

The system of claim 4,
wherein the relational database interface provides a relational database interface layer between the versioned database of the state of the world database and the at least one rich query.

### Claim 6 (depends on 5)

The system of claim 5,
wherein the state of the world database provides concurrent read/write access.

### Claim 7 (depends on 1)

The system of claim 1, wherein the blockchain fabric is provided as a distributed ledger fabric, the distributed ledger fabric being provisioned as a blockchain cloud service, the blockchain cloud service comprising:
a peer container,
an ordering container, and
a chaincode container.

### Claim 8

A method for supporting SQL-based rich queries in a blockchain fabric comprising:
providing, at one or more computers, each comprising a microprocessor, a blockchain fabric, the blockchain fabric comprising a ledger of a plurality of blocks;
providing a state of the world database, the state of the world database being populated by a persistence engine running against the blockchain fabric;
running a smart contract comprising at least one rich query against the state of the world database.

### Claim 9 (depends on 8)

The method of claim 8,
wherein the at least one rich query runs a comparison among a plurality of values contained within the state of the world database.

### Claim 10 (depends on 9)

The method of claim 9,
wherein the state of the world database comprises a versioned database and a relational database interface.

### Claim 11 (depends on 10)

The method of claim 10,
wherein the state of the world database is accessible by the blockchain fabric.

### Claim 12 (depends on 11)

The method of claim 11,
wherein the relational database interface provides a relational database interface layer between the versioned database of the state of the world database and the at least one rich query.

### Claim 13 (depends on 12)

The method of claim 12,
wherein the state of the world database provides concurrent read/write access.

### Claim 14 (depends on 8)

The method of claim 8, wherein the blockchain fabric is provided as a distributed ledger fabric, the distributed ledger fabric being provisioned as a blockchain cloud service, the blockchain cloud service comprising:
a peer container,
an ordering container, and
a chaincode container.

### Claim 15

A non-transitory computer readable storage medium having instructions thereon for supporting SQL-based rich queries in a blockchain fabric comprising, that when read and executed cause one or more computers to perform steps comprising:
providing, at one or more computers, each comprising a microprocessor, a blockchain fabric, the blockchain fabric comprising a ledger of a plurality of blocks;
providing a state of the world database, the state of the world database being populated by a persistence engine running against the blockchain fabric;
running a smart contract comprising at least one rich query against the state of the world database.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium of claim 15,
wherein the at least one rich query runs a comparison among a plurality of values contained within the state of the world database.

### Claim 17 (depends on 16)

The non-transitory computer readable storage medium of claim 16,
wherein the state of the world database comprises a versioned database and a relational database interface.

### Claim 18 (depends on 17)

The non-transitory computer readable storage medium of claim 17,
wherein the state of the world database is accessible by the blockchain fabric.

### Claim 19 (depends on 18)

The non-transitory computer readable storage medium of claim 18,
wherein the relational database interface provides a relational database interface layer between the versioned database of the state of the world database and the at least one rich query.

### Claim 20 (depends on 19)

The non-transitory computer readable storage medium of claim 19,
wherein the state of the world database provides concurrent read/write access.
