🤖 AI Summary
Database query and aggregation operations lack a unified categorical semantic model. Method: We propose a novel categorical framework based on polynomial comonoids and polynomial bicomodules. For the first time, we functorize aggregation operations, jointly modeling queries and aggregations within a single coherent structure; we introduce parameterized right adjoint functors to formalize data migration and construct a universal framework on framed bicategories, substantially extending the semantic expressivity of polynomial functors. Contribution/Results: This work provides the first rigorous categorical semantics for database theory that supports composability and formal verification. It establishes mathematically precise yet computationally realizable foundations for both data migration and aggregation, thereby advancing formal methods in data engineering.
📝 Abstract
We study polynomial comonads and polynomial bicomodules. Polynomial comonads amount to categories. Polynomial bicomodules between categories amount to parametric right adjoint functors between corresponding copresheaf categories. These may themselves be understood as generalized polynomial functors. They are also called data migration functors because of applications in categorical database theory. We investigate several universal constructions in the framed bicategory of categories, retrofunctors, and parametric right adjoints. We then use the theory we develop to model database aggregation alongside querying, all within this rich ecosystem.