Most production databases are undocumented. Primary keys are missing or wrong. Foreign key constraints were dropped for performance. Column names are cryptic abbreviations from a developer who left years ago. Entity-relationship diagrams, if they ever existed, describe a schema three migrations old.
Nagarajan and Altman (arXiv:2603.23050) build DBAutoDoc, a system that infers documentation from the database itself. The method combines statistical analysis of actual data (column distributions, value overlaps between tables, cardinality patterns) with LLM-driven semantic interpretation, iterated across the schema's dependency graph.
Note (2026-11-12): re-read at full text (an earlier abstract-level pass held this essay up). The design (statistical analysis plus LLM interpretation, iterated across the dependency graph until descriptions converge), the 96.1 percent weighted score for the Gemini and Anthropic models and the 23-point F1 gain from the deterministic pipeline over LLM-only foreign-key detection are all in the paper. Scope: in the paper's table the 96.1 percent is the score on AdventureWorks2022 (the primary stress test, 71 tables), where the GPT model scored 87.9 percent; the weighting is 35 percent for foreign-key F1, 30 for primary-key F1 and 20 and 15 for table and column descriptions; on the small Northwind schema the primary-key score was lower (75 percent), which the paper attributes partly to an evaluation artifact and to low row counts. The paper calls the link to backpropagation a structural analogy and says the propagation is discrete and semantic rather than mathematical; the essay's 'schema understanding as backpropagation on a graph' reads it more literally.
The key design: schema understanding as backpropagation on a graph. Each table and column gets an initial description from the LLM based on names and data samples. Then semantic corrections propagate through the graph — if table A has a column that statistically matches table B's primary key, and table B's description changes, table A's description updates accordingly. The propagation iterates until descriptions converge. The LLM doesn't understand the database in isolation — it understands it through the structure of relationships.
The results: 96.1% weighted scores across Gemini and Claude on benchmark databases. A 23-point F1 improvement over LLM-only foreign key detection, confirming that the statistical analysis contributes substantially beyond what the language model knows from pre-training. The LLM's prior knowledge of common schema patterns is useful but insufficient — the actual data contains constraints that schema names alone don't reveal.
The practical value is obvious: every organization has legacy databases that nobody fully understands. But the conceptual insight is about the direction of documentation. Traditional documentation is top-down: the designer writes the spec, and the database implements it. DBAutoDoc works bottom-up: the data reveals the structure, and the documentation describes what actually exists. The gap between these two — between intended design and actual implementation — is what makes undocumented databases hard. The system doesn't reconstruct the designer's intent; it infers the structure from the artifact.