Castle: Causal Cascade Updates in Relational Databases with Large Language Models
Yongye Su, Yucheng Zhang, Zeru Shi, Bruno Ribeiro, Elisa Bertino

TL;DR
Castle is a novel framework that leverages large language models to generate causally consistent cascade SQL updates from natural language instructions, addressing the limitations of static constraints in modern databases.
Contribution
It introduces a dynamic, schema-aware approach for cascade update generation using LLMs, enabling context-sensitive updates without exposing data content.
Findings
Accurately generates multi-column cascade updates from natural language.
Demonstrates reasoning capacity of LLMs in complex database update scenarios.
Effective on real-world causal update cases.
Abstract
This work introduces Castle, the first framework for schema-only cascade update generation using large language models (LLMs). Despite recent advances in LLMs for Text2SQL code generation, existing approaches focus primarily on SELECT queries, neglecting the challenges of SQL update operations and their ripple effects. Traditional CASCADE UPDATE constraints are static and unsuitable for modern, denormalized databases, which demand dynamic, context-aware updates. Castle enables natural language instructions to trigger multi-column, causally consistent SQL UPDATE statements, without revealing table content to the model. By framing UPDATE SQL generation as a divide-and-conquer task with LLMs' reasoning capacity, Castle can determine not only which columns must be directly updated, but also how those updates propagate through the schema, causing cascading updates -- all via nested queries…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsAdvanced Database Systems and Queries · Scientific Computing and Data Management · Data Quality and Management
