Graphical Conjunctive Queries
Filippo Bonchi, Jens Seeber, Pawel Sobocinski

TL;DR
This paper introduces Graphical Conjunctive Queries (GCQ), a diagrammatic language equivalent to CCQ, providing a sound and complete algebraic framework for query inclusion with decidability results.
Contribution
It develops GCQ as a string diagram language with an algebraic structure, establishing a complete axiomatisation for query inclusion based on cartesian bicategories.
Findings
GCQ has the same expressivity as CCQ
The axiomatisation is sound and complete
Decidability of query inclusion follows from the framework
Abstract
The Calculus of Conjunctive Queries (CCQ) has foundational status in database theory. A celebrated theorem of Chandra and Merlin states that CCQ query inclusion is decidable. Its proof transforms logical formulas to graphs: each query has a natural model - a kind of graph - and query inclusion reduces to the existence of a graph homomorphism between natural models. We introduce the diagrammatic language Graphical Conjunctive Queries (GCQ) and show that it has the same expressivity as CCQ. GCQ terms are string diagrams, and their algebraic structure allows us to derive a sound and complete axiomatisation of query inclusion, which turns out to be exactly Carboni and Walters' notion of cartesian bicategory of relations. Our completeness proof exploits the combinatorial nature of string diagrams as (certain cospans of) hypergraphs: Chandra and Merlin's insights inspire a theorem that…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, Reasoning, and Knowledge · Logic, programming, and type systems · semigroups and automata theory
