Table of Contents
Fetching ...

A Categorical Unification for Multi-Model Data: Part II Categorical Algebra and Calculus

Jiaheng Lu

TL;DR

The paper develops a category-theoretic foundation for querying heterogeneous data by introducing two formal languages, $categorical\ calculus$ (declarative) and $categorical\ algebra$ (procedural), and proves their expressive equivalence.It defines a rich operator suite—including Map, Project, Select, getReach, and Lim—covering set, tree, and graph data, and shows how trees (via Dewey codes) and graphs can be integrated into a single framework.A central equivalence theorem demonstrates that every calculus query can be expressed algebraically and vice versa, with a comprehensive set of algebraic transformation rules to optimize queries, plus complexity bounds $O(q\cdot n^p)$ in data terms and $NSPACE[\log n]$ for space.The work enables holistic, multi-model query planning and suggests extensions to shortest-path and aggregation queries, aiming toward practical, optimized query engines for unified categorical databases.

Abstract

Multi-model databases are designed to store, manage, and query data in various models, such as relational, hierarchical, and graph data, simultaneously. In this paper, we provide a theoretical basis for querying categorical databases. We propose two formal query languages: categorical calculus and categorical algebra, by extending relational calculus and relational algebra respectively. We demonstrate the equivalence between these two languages of queries. We propose a series of transformation rules of categorical algebra to facilitate query optimization. Finally, we analyze the expressive power and computation complexity for the proposed query languages.

A Categorical Unification for Multi-Model Data: Part II Categorical Algebra and Calculus

TL;DR

The paper develops a category-theoretic foundation for querying heterogeneous data by introducing two formal languages, $categorical\ calculus$ (declarative) and $categorical\ algebra$ (procedural), and proves their expressive equivalence.It defines a rich operator suite—including Map, Project, Select, getReach, and Lim—covering set, tree, and graph data, and shows how trees (via Dewey codes) and graphs can be integrated into a single framework.A central equivalence theorem demonstrates that every calculus query can be expressed algebraically and vice versa, with a comprehensive set of algebraic transformation rules to optimize queries, plus complexity bounds $O(q\cdot n^p)$ in data terms and $NSPACE[\log n]$ for space.The work enables holistic, multi-model query planning and suggests extensions to shortest-path and aggregation queries, aiming toward practical, optimized query engines for unified categorical databases.

Abstract

Multi-model databases are designed to store, manage, and query data in various models, such as relational, hierarchical, and graph data, simultaneously. In this paper, we provide a theoretical basis for querying categorical databases. We propose two formal query languages: categorical calculus and categorical algebra, by extending relational calculus and relational algebra respectively. We demonstrate the equivalence between these two languages of queries. We propose a series of transformation rules of categorical algebra to facilitate query optimization. Finally, we analyze the expressive power and computation complexity for the proposed query languages.

Paper Structure

This paper contains 17 sections, 6 theorems, 62 equations, 4 figures, 2 tables, 1 algorithm.

Key Result

Theorem 8

The categorical calculus and categorical algebra are equivalent.

Figures (4)

  • Figure 1: This toy example shows three types of data including relation, XML and graph. They have a unified categorical representation.
  • Figure 2: An illustrative example for student course category
  • Figure 3: Categorical schemata for trees and graphs
  • Figure 4: Two holistic query plans involving three types of data

Theorems & Definitions (17)

  • Definition 1
  • Example 2
  • Example 3
  • Example 4
  • Example 5
  • Example 6
  • Example 7
  • Theorem 8
  • Lemma 9
  • proof
  • ...and 7 more