[Experiment, Analysis, and Benchmark] How well do LLMs comprehend and design relational database schemata?
Sriom Chakrabarti, Sean Bin Yang, Arijit Khan, Sebastian Link
Key points
From the paper's conclusion- We present SchemaBridge, a benchmark of 902 schemata from three collections, stratified by size and constraint complexity, that scores fidelity separately for tables, attributes, domain (data types and nullability), entity, and referential integrity.
Abstract
Large Language Models (LLMs) are increasingly used for database tasks, yet most work, such as Text2SQL, assumes that the relational schema already exists. We ask whether LLMs can design a schema from natural language requirements (Text2Schema), verbalize an existing schema (Schema2Text), and preserve its structure through a Schema-to-Text-to-Schema round trip. We present SchemaBridge, a benchmark of 902 schemata from three collections, stratified by size and constraint complexity, that scores fidelity separately for tables, attributes, domain (data types and nullability), entity, and referential integrity. Evaluating six open-weight and proprietary LLMs, we find that: (i) human-written requirements under-specify schemata, with no model exceeding 0.27 referential integrity F1; (ii) LLM-generated descriptions carry far more structure when explicitly asked to be complete, raising GPT-5.4-mini's referential F1 on SchemaBench from 0.228 to 0.909, even as BLEU, ROUGE-L, and BERTScore decrease; (iii) controlled experiments show that both constructor and describer choices influence round-trip fidelity under fixed settings; and (iv) masked schema experiments show that structural cues support recovery of keys and relationships, while joint data-type and nullability information is poorly retained through verbalization. Code and data are available at https://github.com/iamsriom/SchemaBridge
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- SchemaRAG: A Schema-aware Retrieval-Augmented Generation Framework for Text-to-SQLProceedings of the ACM on Management of Data · 2026
- Text-to-SQL in the Era of Large Language Models: A Survey of Reasoning-Centric and Efficiency-Centric ApproachesElectronics · 2026
- Can LLMs Normalize Databases? A Benchmark and Multi-Agent Framework for Schema NormalizationarXiv · 2026
- Reimagining Text-to-SQL: A Survey of Large Language Model Architectures and StrategiesarXiv · 2026
- text2ql: Multi-Target Natural Language Querying via a Language-Agnostic Intermediate RepresentationarXiv · 2026
- Schema Retrieval with Embeddings and Vector Stores Using Retrieval-Augmented Generation and LLM-Based SQL Query GenerationApplied Sciences · 2026