Table of Contents
Fetching ...

Structural Indexing of Relational Databases for the Evaluation of Free-Connex Acyclic Conjunctive Queries

Cristian Riveros, Benjamin Scheidt, Nicole Schweikardt

TL;DR

The paper introduces a novel index DS for evaluating fc-ACQs by capturing internal structural symmetries of a database through an auxiliary ${D_{ ext{col}}}$. It proves that one can construct ${D_{ ext{col}}}$ in time linear in the contained structure and then answer Boolean, enumeration, and counting tasks with preprocessing proportional to ${|D_{ ext{col}}|}$ and favorable per-query performance. The approach hinges on reducing arbitrary schemas to node-labeled graphs, enabling color refinement to produce a compact color-based representation that drives constant-delay enumeration and counting. This foundational result shows that indexing internal symmetries can yield potentially sublinear preprocessing relative to the original database size, with broad implications for worst-case optimal query evaluation. The work also connects color refinement with homomorphism counts for fc-ACQs, and discusses future directions, including extensions to generalized hypertree decompositions and dynamic settings.

Abstract

We present an index structure to boost the evaluation of free-connex acyclic conjunctive queries (fc-ACQs) over relational databases. The main ingredient of the index associated with a given database $D$ is an auxiliary database $D_{col}$. Our main result states that for any fc-ACQ $Q$ over $D$, we can count the number of answers of $Q$ or enumerate them with constant delay after a preprocessing phase that takes time linear in the size of $D_{col}$. Unlike previous indexing methods based on values or order (e.g., B+ trees), our index is based on structural symmetries among tuples in a database, and the size of $D_{col}$ is related to the number of colors assigned to $D$ by Scheidt and Schweikardt's "relational color refinement" (2025). In the particular case of graphs, this coincides with the minimal size of an equitable partition of the graph. For example, the size of $D_{col}$ is logarithmic in the case of binary trees and constant for regular graphs. Even in the worst-case that $D$ has no structural symmetries among tuples at all, the size of $D_{col}$ is still linear in the size of $D$. Given that the size of $D_{col}$ is bounded by the size of $D$ and can be much smaller (even constant for some families of databases), our index is the first foundational result on indexing internal structural symmetries of a database to evaluate all fc-ACQs with performance potentially strictly smaller than the database size.

Structural Indexing of Relational Databases for the Evaluation of Free-Connex Acyclic Conjunctive Queries

TL;DR

The paper introduces a novel index DS for evaluating fc-ACQs by capturing internal structural symmetries of a database through an auxiliary . It proves that one can construct in time linear in the contained structure and then answer Boolean, enumeration, and counting tasks with preprocessing proportional to and favorable per-query performance. The approach hinges on reducing arbitrary schemas to node-labeled graphs, enabling color refinement to produce a compact color-based representation that drives constant-delay enumeration and counting. This foundational result shows that indexing internal symmetries can yield potentially sublinear preprocessing relative to the original database size, with broad implications for worst-case optimal query evaluation. The work also connects color refinement with homomorphism counts for fc-ACQs, and discusses future directions, including extensions to generalized hypertree decompositions and dynamic settings.

Abstract

We present an index structure to boost the evaluation of free-connex acyclic conjunctive queries (fc-ACQs) over relational databases. The main ingredient of the index associated with a given database is an auxiliary database . Our main result states that for any fc-ACQ over , we can count the number of answers of or enumerate them with constant delay after a preprocessing phase that takes time linear in the size of . Unlike previous indexing methods based on values or order (e.g., B+ trees), our index is based on structural symmetries among tuples in a database, and the size of is related to the number of colors assigned to by Scheidt and Schweikardt's "relational color refinement" (2025). In the particular case of graphs, this coincides with the minimal size of an equitable partition of the graph. For example, the size of is logarithmic in the case of binary trees and constant for regular graphs. Even in the worst-case that has no structural symmetries among tuples at all, the size of is still linear in the size of . Given that the size of is bounded by the size of and can be much smaller (even constant for some families of databases), our index is the first foundational result on indexing internal structural symmetries of a database to evaluate all fc-ACQs with performance potentially strictly smaller than the database size.
Paper Structure (38 sections, 34 theorems, 39 equations, 2 figures)

This paper contains 38 sections, 34 theorems, 39 equations, 2 figures.

Key Result

Proposition 3.0

A CQ $Q$ of a binary schema $\sigma$ is acyclic iff its Gaifman graph $G(Q)$ is acyclic. The CQ $Q$ is free-connex acyclic if, and only if, $G(Q)$ is acyclic and the following statement is true: for every connected component $C$ of $G(Q)$, either $\textrm{\upshape free}(Q) \cap V(C)=\emptyset$ or th

Figures (2)

  • Figure 1: Circled nodes are in $V^{{\widehat{D}}}$, boxed nodes in $W^{{\widehat{D}}}$. A self-loop represents the edge $(w_{aa},w_{aa})$ in $E^{{\widehat{D}}}$; an undirected edge between two nodes $x$ and $y$ represents edges in both directions, i.e., $(x,y)$ and $(y,x)$ in $E^{{\widehat{D}}}$.
  • Figure 2: Representation of $\widehat{D}$ from Example \ref{['example:running1']}.

Theorems & Definitions (99)

  • Proposition 3.0: Folklore
  • Theorem 3.0
  • Theorem 3.1
  • Theorem 4.1
  • Claim 4.1
  • proof : Proof sketch
  • Proposition 4.1
  • proof : Proof sketch
  • Claim 4.1
  • proof : Proof sketch
  • ...and 89 more