# Query Processing in Blockchain Systems: Current State and Future Challenges
## 6 Overview of the State of the Art
### State of Research
** With verifiable queries, a user is able to verify the integrity of the result of a query. This ensures that the data and the execution have not been tampered with. For this purpose, a new class of database systems has emerged, the so-called verifiable database systems. [PERSON] et al. [127] propose such a verifiable database system called \(\upsilon\)SQL, which supports arbitrary SQL queries. Here, a user is able to outsource a relational database to an untrusted server and has only to store a hash value locally. Then, the user can send SQL queries to that untrusted server and verify the integrity of the result. This verification is done by an interactive protocol, which utilizes interactive proofs. [PERSON] et al. [128] propose another verifiable database system, which is called _Spirz_. It builds on top of _Forkbase_[129], which is a distributed multi-version storage engine utilizing the key-value data model, and maintains multiple index structures to facilitate verifiable query processing. The verification of the result of a query is done by comparing the hash value, which must be computed by using the proofs included in the result, with a previously locally stored hash value. [PERSON] et al. [130] propose an SGX-based verifiable database system called _VeriDB_, which uses a trusted execution environment called _Intel SGX_ (see [[https://www.intel.com/content/www/us/en/architecture-and-technology/software-guard-extensions.html](https://www.intel.com/content/www/us/en/architecture-and-technology/software-guard-extensions.html)]([https://www.intel.com/content/www/us/en/architecture-and-technology/software-guard-extensions.html](https://www.intel.com/content/www/us/en/architecture-and-technology/software-guard-extensions.html)); accessed on 15 December 2021) where data are isolated and encrypted in memory [131]. VeriDB hosts the query engine supporting SQL queries within an Intel SGX enclave, with the actual data residing in untrusted memory. The verification of the data is performed during the query processing by the query engine using a verifiable storage layer. Table 5 summarizes the main findings regarding the characteristics and features of these six research directions in the field of query processing in blockchains. Blockchains were conceptually not developed to compete with traditional database systems in terms of data and query throughput. However, due to their inherent security features, they are increasingly used for managing important data. Considering the current state of technology, however, blockchains are still at the very beginning as far as query capabilities are concerned. Either one has to live with the native but naive query interfaces or the data processing takes place in a connected database system, which partially eliminates or at least reduces the security features. Therefore, there is a large body of research that aims to improve query capabilities in terms of usability, power, and performance. However, as our assessment of the state of research has shown, there are still many open