Schema-Free Text-to-SQL: Learning Enterprise Database Structure from Query Logs
Not on the map. Why?
Abstract (arXiv)
Text-to-SQL systems achieve remarkable accuracy on academic benchmarks, yet performance drops dramatically in enterprise deployments. This gap stems from a fundamental assumption: existing approaches require complete schema documentation, but enterprise databases typically lack comprehensive documentation, featuring cryptic naming and implicit relationships. We present the first text-to-SQL framework that operates without schema documentation, instead learning database structure from historical query logs. Query logs encode implicit structural knowledge: which tables are queried together, how they join, and what columns map to business concepts. We construct a knowledge graph from parsed query patterns and introduce entity-driven GraphRAG retrieval that grounds user questions in domain terminology rather than relying solely on embedding similarity. Validated on both an industrial deployment with expert evaluation and the Beaver benchmark, our approach substantially outperforms similarity-based retrieval methods, the dominant industry approach, in both executability and answer quality. On Beaver, we achieve 95.7% execution validity compared to 60.8% for embedding-based retrieval, with expert data engineers preferring our system 70% to 10% on internal deployment. Our work demonstrates that text-to-SQL can operate effectively in schema-ambiguous enterprise environments, enabling natural language database interfaces "in the wild".
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 17 of its 22 references that are in the map. Submitted 24 Oct 2026.
Builds on
17 of 22 references.
References · 17
- 2024From Local to Global: A Graph RAG Approach to Query-Focused Summarizationcited by 1,566
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,205
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 747
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 503
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 446
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 407
- 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 267
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 204
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 196
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 172
- 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 151
- 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 121
5 more
- 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 110
- 2024BEAVER: An Enterprise Benchmark for Text-to-SQLcited by 51
- 2025Automatic Metadata Extraction for Text-to-SQLcited by 31
- 2025RASL: Retrieval Augmented Schema Linking for Massive Database Text-to-SQLcited by 7
- 2025RubikSQL: Lifelong Learning Agentic Knowledge Base as an Industrial NL2SQL Systemcited by 7
Built on by
Not cited yet.