Reproduce “Functorial Data Migration” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

David I. Spivak

This paper presents a category-theoretic model for databases, defining schemas as small categories and instances as functors, and rigorously proves an equivalence between the category of database schemas and the category of small categories. It introduces three canonical data migration functors (pullback, left pushforward, and right pushforward) derived from adjoint relationships, offering formally sound methods for schema evolution, data transformation, and resolving the impedance mismatch between data and program.

Key insights

  • A database schema can be rigorously defined as a small category, where tables are objects and foreign keys (and other columns) are morphisms, with path equivalences forming commutative diagrams.
  • Database instances on a schema can be faithfully represented as Set-valued functors from that schema category, allowing instance transformations to be modeled as natural transformations.
  • Canonical data migration operations between database schemas arise naturally as adjoint functors (pullback, left pushforward, and right pushforward) to schema translations, providing provable properties for data transformation.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.