[Experiment, Analysis, and Benchmark] How well do LLMs comprehend and design relational database schemata?
Sriom Chakrabarti, Sean Bin Yang, Arijit Khan, Sebastian Link
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
Create a lesson
Related papers
Agents Propose, Code Verifies, Humans Decide: Verified Agentic Ingestion of Heterogeneous Scientific Tables into Relational Databases
Shared title terminology · Bharatha Rankothge, Suzanne Hodgkins, Virginia Rich et al.
Cleaning or Recalling? Knowledge Dependence in LLM-based Data Cleaning [Experiment, Analysis & Benchmark]
Shared title terminology · Jingru Yang, Honglu Zhang, Jiayi Mi et al.
DiagDBench: Evaluating Agentic LLMs on Interactive Database Diagnosis and Anomaly Remediation
Shared title terminology · Xinxin Zhao, Rong Kang, Tieying Zhang et al.
Mixed-Type Relational Database Synthesis with Graph-Prompted Language Model
Shared title terminology · Yuxiang Sun, Mengshi Chen, Jianwei Wang et al.
NovaFilter - A Rule-Based ETL Staging Framework for Fault-Tolerant Relational Databases
Shared title terminology · Meike Klettke
Tessera: Fast Join-Aggregates over Skewed Sparse Relations in Database Engines
Shared title terminology · Gyuyeong Kim