Graphiti: Bridging Graph and Relational Database Queries

📅 2025-04-04
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the open problem of automated verification of cross-paradigm query equivalence between graph databases (Cypher) and relational databases (SQL). We propose the first formal-semantics-based unified verification framework. Our core method introduces a database transformer that directionally embeds a syntactically restricted subset of Cypher into SQL, thereby reducing cross-model equivalence checking to standard SQL query equivalence verification—without requiring joint semantic modeling of both data models. Technically, we integrate formal semantic definitions, syntax-driven translation, SMT solving, and automated theorem proving. We implement our approach in Graphiti, an open-source tool that successfully detects subtle semantic inconsistencies in the official Cypher tutorial and multiple research papers. Graphiti supports efficient equivalence checking and counterexample generation, delivering the first rigorous, formally verifiable, and practically applicable solution for automated cross-paradigm query equivalence verification.

Technology Category

Application Category

📝 Abstract
This paper presents an automated reasoning technique for checking equivalence between graph database queries written in Cypher and relational queries in SQL. To formalize a suitable notion of equivalence in this setting, we introduce the concept of database transformers, which transform database instances between graph and relational models. We then propose a novel verification methodology that checks equivalence modulo a given transformer by reducing the original problem to verifying equivalence between a pair of SQL queries. This reduction is achieved by embedding a subset of Cypher into SQL through syntax-directed translation, allowing us to leverage existing research on automated reasoning for SQL while obviating the need for reasoning simultaneously over two different data models. We have implemented our approach in a tool called Graphiti and used it to check equivalence between graph and relational queries. Our experiments demonstrate that Graphiti is useful both for verification and refutation and that it can uncover subtle bugs, including those found in Cypher tutorials and academic papers.
Problem

Research questions and friction points this paper is trying to address.

Checking equivalence between Cypher and SQL queries
Formalizing database transformers for model conversion
Reducing verification to SQL equivalence via translation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Automated equivalence checking between Cypher and SQL
Database transformers for model conversion
Syntax-directed Cypher to SQL translation
🔎 Similar Papers
No similar papers found.
Y
Yang He
Simon Fraser University, Canada
R
Ruijie Fang
University of Texas at Austin, USA
I
Işıl Dillig
University of Texas at Austin, USA
Yuepeng Wang
Yuepeng Wang
Simon Fraser University
Programming LanguagesProgram SynthesisProgram VerificationDatabases