# Disentangling Structure and Semantics: How Schema Representation Affects LLM-Based SQL Generation

arXiv: https://arxiv.org/abs/2608.20356 · HTML: https://mlsanity.com/paper/2608.20356/

## Key facts

- Cited by 1 papers in the map (data through 24 Nov 2026).
- Submitted 17 Jun 2026.

## Built on by (most cited first, 1 of 1)

- [Mind the Trap As LLMs Guess the Data Model: Grain-Aware Guards Against Fan-out in Text-to-SQL and Its Benchmarks](https://mlsanity.com/paper/2611.29009/) (2026)

## Abstract (arXiv)

LLM-based text-to-SQL pipelines read the database schema as text, which carries both structural cues (tables, keys, relationships) and semantic cues (table and column names); prior work has studied each axis in isolation, leaving open how they compare in magnitude and whether they substitute for one another. We present a controlled 6 times 3 factorial design crossing structural levels L_1--L_6 (from a denormalised wide table to a 3NF schema with foreign keys and explicit join paths) with semantic levels S_1--S_3 (anonymous, abbreviated, descriptive identifiers), evaluated on 397 corrected BIRD questions with identical gold queries throughout; we materialise 1NF and 2NF variants for nine BIRD databases to support the lowest structural levels. Across nine models from 0.5B to flagship scale we find an asymmetric substitution between the two axes, meaningful names compensate for missing structure but richer structural metadata does not recover performance when names are opaque, which reproduces in 8 of 9 databases and emerges with model scale (negligible below 3B). Within the structural axis the dominant lever is normalisation itself, not metadata layered on top of 3NF, suggesting that for current LLM-based text-to-SQL the practical bottleneck is semantic grounding rather than relational exposure.
