# Stop Handcrafting Your Engine! GenDB-V: Towards AI-Generated and Formally Verified Database Systems

DevFeed: [Stop Handcrafting Your Engine! GenDB-V: Towards AI-Generated and Formally Verified Database Systems](<https://devfeed.tech/articles/stop-handcrafting-your-engine-gendb-v-towards-ai-generated-and-formally-verified-database-systems-113656.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.02779>)

Author: Jiale Lao, Immanuel Trummer

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Databases](<https://devfeed.tech/sources/arxiv-databases.md>)

Topics: [database-optimization](<https://devfeed.tech/topics/database-optimization.md>), [Formal verification](<https://devfeed.tech/topics/formal-verification.md>), [DuckDB](<https://devfeed.tech/topics/duckdb.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-db](<https://devfeed.tech/tags/cs-db.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [database](<https://devfeed.tech/tags/database.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [engine](<https://devfeed.tech/tags/engine.md>), [engines](<https://devfeed.tech/tags/engines.md>), [execution](<https://devfeed.tech/tags/execution.md>), [fast](<https://devfeed.tech/tags/fast.md>), [formal](<https://devfeed.tech/tags/formal.md>), [general](<https://devfeed.tech/tags/general.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [llm](<https://devfeed.tech/tags/llm.md>), [low-level](<https://devfeed.tech/tags/low-level.md>), [modular](<https://devfeed.tech/tags/modular.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [optimization-performance](<https://devfeed.tech/tags/optimization-performance.md>), [performance](<https://devfeed.tech/tags/performance.md>), [systems](<https://devfeed.tech/tags/systems.md>)

## AI overview

GenDB-V uses AI agents to synthesize database engines tailored to hardware and workloads, with formal verification intended to establish SQL correctness and program safety. It supports both specialized SQL template implementations and general-purpose engines for a supported SQL subset. Its pipeline formalizes semantics in SQLSpec, co-optimizes storage and execution while synthesizing code and modular proofs, then checks both against fixed synthesis targets. On TPC-H and SEC-EDGAR, verified template implementations report 22.0-61.3x geometric-mean speedups over DuckDB and Umbra; a verified general-purpose engine reports 1.27-3.4x speedups on TPC-H. Compared with a testing-based LLM synthesis method, GenDB-V performed better, and audits and tests found wrong answers in that method's implementations for 16 of 28 templates.

## Source excerpt

arXiv:2611.02779v1 Announce Type: new Abstract: For over 50 years, the database community has developed a wide range of successful engines to answer two fundamental questions: how can database systems run faster, and how can we ensure their correctness? Experience with these engines shows that performance depends on hardware and workloads. As both change over time, we repeatedly redesign and rebuild database systems, a time-consuming and expensive process. Correctness remains another long-standing challenge: recent studies continue to uncover wrong-answer bugs even in mature database engines, despite years of development and testing. To address these, we present GenDB-V, a system that enables AI agents to synthesize database engines specialized to hardware and workloads for performance, and formally verified for correctness. GenDB-V supports specialized implementations of SQL templates and general-purpose engines that accept any query within a supported SQL subset. First, we develop SQLSpec to formalize SQL semantics and deterministically construct fixed, implementation-agnostic synthesis targets. Second, we enable joint synthesis of fast code and formal proofs through storage--execution co-optimization, performance-first exploration, and three-layer modular proofs that bridge low-level execution to SQLSpec semantics. Third, we verify the synthesized code and proofs against the fixed synthesis targets in an isolated pipeline, proving SQL correctness and program safety. We evaluate GenDB-V on TPC-H and SEC-EDGAR. For verified template implementations, GenDB-V achieves geometric-mean speedups of 22.0-61.3x over DuckDB and Umbra. For a verified general-purpose engine, GenDB-V also achieves speedups of 1.27-3.4x on TPC-H. GenDB-V also achieves better performance than a testing-based LLM synthesis method, while our audit and tests expose incorrect answers in that method's implementations for 16 of 28 templates.