A Task-Regime Perspective on Zero-Knowledge Database Migration

Read the full article See related articles

Discuss this preprint

Start a discussion What are Sciety discussions?

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Relational schemas are naturally graph-structured, motivating the widespread use of Graph Neural Networks (GNNs) for database migration tasks such as foreign key discovery, integrity validation, and impact analysis. However, we show that treating all schema learning problems as monolithic graph tasks conflates fundamentally different computational regimes. We introduce a principled taxonomy that decomposes migration tasks into local tasks, solvable from pairwise column features, and relational tasks, requiring multi-hop structural reasoning. Across three datasets - Spider (166 academic databases), SchemaPile (real-world GitHub schemas), and Stack Overflow (enterprise-scale schema) - we conduct 11 controlled experiments comparing MLPs, multiple GNN architectures, DeepSets, SQL baselines, and classical heuristics. We find that: (1) For local tasks such as foreign key discovery, a simple MLP on pairwise column features outperforms GNNs by up to +129% in F1 (p < 0.001), as message passing injects structural noise from non-FK neighbors. (2) For relational tasks such as propagation count and blast-radius estimation, GNNs are indispensable, achieving R² > 0.99, while MLPs plateau at R² ≈ 0.73. (3) Under partial-access enterprise workflows (40 - 60% schema hidden), GNNs degrade gracefully (MAE ≈ 1.1), whereas SQL traversal fails catastrophically. We further formalize structural noise injection, proving that message passing reduces signal-to-noise ratio in sparse-FK schemas, explaining observed over-smoothing effects. Based on these findings, we propose a regime-aware hybrid pipeline that assigns inductive bias per task type and strictly dominates monolithic approaches. All experiments are fully reproducible, with code and results publicly released.

Article activity feed