🤖 AI Summary
This paper addresses the conceptual fragmentation between functional and relational models in knowledge representation by proposing a unified semantic framework grounded in double category theory. Methodologically, it models database instances as double functors from a schema to the double category of sets and relations—thereby providing, for the first time, a coherent double-functorial semantics that simultaneously captures both functional and relational aspects. It constructs a “relational double category” as an abstract knowledge representation language, into which Codd’s relational algebra embeds naturally. The main contributions are: (1) a theoretically sound, composable, and logically tractable unified semantic model; (2) a categorical formalization of declarative query languages; and (3) a novel mathematical foundation bridging database theory and knowledge graph research.
📝 Abstract
Category theory offers a mathematical foundation for knowledge representation and database systems. Popular existing approaches model a database instance as a functor into the category of sets and functions, or as a 2-functor into the 2-category of sets, relations, and implications. The functional and relational models are unified by double functors into the double category of sets, functions, relations, and implications. In an accessible, example-driven style, we show that the abstract structure of a 'double category of relations' is a flexible and expressive language in which to represent knowledge, and we show how queries on data in the spirit of Codd's relational algebra are captured by double-functorial semantics.