English

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

Databases 2026-01-09 v1 Logic in Computer Science

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 DD is an auxiliary database DcolD_{col}. Our main result states that for any fc-ACQ QQ over DD, we can count the number of answers of QQ or enumerate them with constant delay after a preprocessing phase that takes time linear in the size of DcolD_{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 DcolD_{col} is related to the number of colors assigned to DD 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 DcolD_{col} is logarithmic in the case of binary trees and constant for regular graphs. Even in the worst-case that DD has no structural symmetries among tuples at all, the size of DcolD_{col} is still linear in the size of DD. Given that the size of DcolD_{col} is bounded by the size of DD 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.

Keywords

Cite

@article{arxiv.2601.04757,
  title  = {Structural Indexing of Relational Databases for the Evaluation of Free-Connex Acyclic Conjunctive Queries},
  author = {Cristian Riveros and Benjamin Scheidt and Nicole Schweikardt},
  journal= {arXiv preprint arXiv:2601.04757},
  year   = {2026}
}

Comments

This paper supersedes the preprint arXiv:2405.12358 by the same authors that only considered the special case of binary schemas