MDB-Link: Hierarchical Schema Linking for Multi-Database Text-to-SQL
作者: Beiyu Xu, Zhenyu Wu, Jiaoyan Chen, Riza theresa Batista-navarro
分类: cs.CL
发布日期: 2026-08-10
💡 一句话要点
提出MDB-Link以解决多数据库文本到SQL查询问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 文本到SQL 多数据库 模式链接 大型语言模型 查询优化 数据库定位 层次化框架
📋 核心要点
- 现有的文本到SQL方法通常假设目标数据库已知,无法处理多数据库环境中的查询路由问题。
- MDB-Link通过层次化的模式链接框架,首先定位目标数据库,再构建与SQL相关的模式,提升了查询的准确性。
- 在MMQA、Spider2-Snow和BIRD-dev数据集上,MDB-Link的准确匹配率显著提高,且运行速度快于现有方法。
📝 摘要(中文)
传统的文本到SQL研究和基准测试假设目标数据库已知,忽视了在大型异构数据库集合中路由查询的场景。因此,本文研究了多数据库环境中的模式链接,系统需首先定位目标数据库,然后构建紧凑的、与SQL相关的模式以进行生成。我们提出了MDB-Link,一个层次化的模式链接框架,该框架从全局索引中检索与问题相关的列,聚合检索证据以缩小数据库范围,并使用预算感知的大型语言模型(LLM)进行数据库重排序、表选择和列定位。实验结果表明,MDB-Link在数据库定位和列选择方面优于LinkAlign,并且生成的模式子集大小接近黄金模式。
🔬 方法详解
问题定义:本文旨在解决在多数据库环境中进行文本到SQL查询时,如何有效定位目标数据库和构建相关模式的问题。现有方法未能处理异构数据库集合中的查询路由,导致准确性不足。
核心思路:MDB-Link的核心思路是通过层次化的模式链接框架,首先从全局索引中检索与用户问题相关的列,然后聚合检索证据以缩小数据库范围,最后利用大型语言模型进行数据库重排序和列定位。
技术框架:MDB-Link的整体架构包括三个主要模块:1) 从全局索引中检索相关列;2) 聚合证据以缩小候选数据库;3) 使用预算感知的LLM进行数据库重排序和列选择。
关键创新:MDB-Link的创新在于其层次化的模式链接方法,能够有效整合多数据库的信息,显著提升了查询的准确性和效率,与现有方法相比具有本质区别。
关键设计:在设计中,MDB-Link采用了预算感知的LLM,优化了数据库重排序和列定位的过程,确保在保持高准确率的同时,提高了处理速度。
🖼️ 关键图片
📊 实验亮点
MDB-Link在MMQA、Spider2-Snow和BIRD-dev数据集上的实验结果显示,准确匹配率分别从16.88提高到51.41、2.50提高到9.17、12.52提高到38.01,且运行速度优于LinkAlign和AutoLink,验证了其层次化模式减少的有效性。
🎯 应用场景
MDB-Link的研究成果在多个领域具有潜在应用价值,特别是在需要处理大量异构数据库的场景,如智能问答系统、数据分析和商业智能等。随着数据量的不断增长,MDB-Link能够有效提升数据库查询的效率和准确性,具有广泛的实际应用前景。
📄 摘要(原文)
Traditional Text-to-SQL research and benchmarks assume a known target database, overlooking settings in which a query must be routed within a large, heterogeneous database collection. We therefore study schema linking in a multi-database setting, where the system must first locate the target database and then construct a compact, SQL-relevant schema for generation. We propose MDB-Link, a hierarchical schema-linking framework that retrieves question-relevant columns from a global index, aggregates retrieval evidence to shortlist databases, and uses a budget-aware large language model (LLM) for database reranking, table selection, and column grounding. With Qwen2.5-14B, MDB-Link outperforms LinkAlign on MMQA, Spider2-Snow, and BIRD-dev in database localization and column selection while producing schema subsets close in size to the gold schemas. Exact match improves from 16.88 to 51.41 on MMQA, 2.50 to 9.17 on Spider2-Snow, and 12.52 to 38.01 on BIRD-dev. MDB-Link also runs faster than LinkAlign and AutoLink, demonstrating the effectiveness of hierarchical schema reduction for downstream SQL generation.