Documentation

Provenance.QueryAnnotatedDatabase

Query semantics over annotated databases #

This file defines the evaluation of relational algebra queries over annotated databases. Query operators are lifted to annotated relations using the m-semiring operations of the annotation domain K: addition corresponds to union, multiplication to join, and monus to difference. This is the algebra of Section IV-B of Sen, Maniu & Senellart, ProvSQL: A General System for Keeping Track of the Provenance and Probability of Data, itself an adaptation of Green, Karvounarakis & Tannen, Provenance Semirings to multiset semantics with explicit duplicate elimination and multiset difference.

Main definitions #

References #

@[reducible]
def Filter.evalDecidableAnnotated {T : Type} [ValueType T] {K : Type} {n : } (φ : Filter T n) :
DecidablePred fun (ta : AnnotatedTuple T K n) => φ.eval ta.1
Equations
Instances For
    def Query.evaluateAnnotated {T : Type} [ValueType T] {K : Type} [SemiringWithMonus K] [DecidableEq K] {n : } (q : Query T n) (hq : q.noAgg) (d : AnnotatedDatabase T K) :
    Equations
    Instances For