We address the problem of checking query containment, a foundational problem in database research. Although extensively studied in theory research, optimization opportunities arising from query containment are not fully leveraged in commercial database systems, due to the high computational complexity and sometimes even undecidability of the underlying decision problem. In this article, we present the first approach to applying quantum computing to the query containment problem for conjunctive queries under set semantics. We propose a novel formulation as an optimization problem that can be solved on gate-based quantum hardware, and in some cases directly maps to quantum annealers. We formally prove this formulation to be correct and present a prototype implementation which we evaluate using simulator software as well as quantum devices. Our experiments successfully demonstrate that our approach is sound and scales within the current limitations of quantum hardware. In doing so, we show that quantum optimization can effectively address this problem. Thereby, we contribute a new computational perspective on the query containment problem.
翻译:本文研究查询包含性判定问题,这是数据库研究中的一个基础性问题。尽管该问题在理论研究领域已得到广泛探索,但由于其底层判定问题的高计算复杂度乃至不可判定性,查询包含性所蕴含的优化潜力在商用数据库系统中尚未得到充分利用。本文首次提出将量子计算应用于集合语义下合取查询的包含性判定问题。我们构建了一种可转化为优化问题的新形式化方法,该问题可在基于逻辑门的量子硬件上求解,并在某些情况下可直接映射至量子退火机。我们通过形式化证明验证了该表述的正确性,并开发了原型系统,通过模拟器软件与真实量子设备进行了实验评估。实验结果表明,该方法具备可靠性,且在当前量子硬件限制范围内具有良好的可扩展性。由此证明,量子优化技术能够有效解决该问题。我们的工作为查询包含性判定问题提供了全新的计算视角。