arXiv:2603.23050cs.DBcs.AI2026-03

用统计分析+大模型迭代,自动补全缺失的数据库文档

DBAutoDoc: Automated Discovery and Documentation of Undocumented Database Schemas via Statistical Analysis and Iterative LLM Refinement

  • 结合数据统计与多轮大模型修正,逐步完善数据库结构理解
  • 在基准测试中达96.1%综合得分,比纯大模型提23点F1
  • 适合需要快速理解复杂或无文档数据库的开发者和运维

大量关键数据库系统缺乏完整文档:主键缺失、外键被移除以提升性能、字段名使用晦涩缩写,且无实体关系图。我们提出DBAutoDoc,一个通过统计数据分析与迭代式大语言模型(LLM)优化相结合,自动化发现并生成未文档化关系型数据库模式的系统。其核心洞察是:模式理解本质上是一个迭代式的图结构问题。受神经网络反向传播启发,DBAutoDoc在模式依赖图上逐轮传播语义修正,直至描述收敛。这一过程为离散且语义导向,但结构类比精确:早期迭代产出粗略描述,如随机初始化;后续迭代通过图中上下文流动逐步优化全局视图。系统有四项具体贡献。在一组基准数据库上,使用Google Gemini与Anthropic Claude两类模型,整体加权得分达96.1%。消融实验表明,确定性处理流程相比仅用大模型检测外键提升23点F1,证实系统贡献显著且独立于大模型预训练知识。DBAutoDoc已开源,包含所有评估配置与提示模板,确保可复现性。

原文摘要 · Abstract (English)

A tremendous number of critical database systems lack adequate documentation. Declared primary keys are absent, foreign key constraints have been dropped for performance, column names are cryptic abbreviations, and no entity-relationship diagrams exist. We present DBAutoDoc, a system that automates the discovery and documentation of undocumented relational database schemas by combining statistical data analysis with iterative large language model (LLM) refinement. DBAutoDoc's central insight is that schema understanding is fundamentally an iterative, graph-structured problem. Drawing structural inspiration from backpropagation in neural networks, DBAutoDoc propagates semantic corrections through schema dependency graphs across multiple refinement iterations until descriptions converge. This propagation is discrete and semantic rather than mathematical, but the structural analogy is precise: early iterations produce rough descriptions akin to random initialization, and successive passes sharpen the global picture as context flows through the graph. The system makes four concrete contributions detailed in the paper. On a suite of benchmark databases, DBAutoDoc achieved overall weighted scores of 96.1% across two model families (Google's Gemini and Anthropic's Claude) using a composite metric. Ablation analysis demonstrates that the deterministic pipeline contributes a 23-point F1 improvement over LLM-only FK detection, confirming that the system's contribution is substantial and independent of LLM pre-training knowledge. DBAutoDoc is released as open-source software with all evaluation configurations and prompt templates included for full reproducibility.

数据库大模型自动化文档生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。