Documentation

Provenance.AnnotatedDatabase

Annotated databases #

This file extends the relational model with provenance annotations drawn from an m-semiring K. Annotated relations are the data model of Section IV-A of Sen, Maniu & Senellart, ProvSQL: A General System for Keeping Track of the Provenance and Probability of Data (a multiset variant of the K-relations of Green, Karvounarakis & Tannen).

Main definitions #

References #

@[reducible, inline]
abbrev AnnotatedTuple (T : Type) (K : Type u_1) (n : ℕ) :
Type u_1
Equations
Instances For
    Dependency graph
    Dependency graph
    @[instance_reducible]
    Equations
    Dependency graph
    @[instance_reducible]
    instance instZeroAnnotatedTuple {T : Type} [ValueType T] {K : Type} [Zero K] {n : ℕ} :
    Equations
    Dependency graph
    def AnnotatedRelation (T : Type) (K : Type u_1) (arity : ℕ) :
    Type u_1
    Equations
    Instances For
      Dependency graph
      def AnnotatedRelation.cast {T K : Type} {n m : ℕ} (heq : n = m) (r : AnnotatedRelation T K n) :
      Equations
      Instances For
        Dependency graph
        Dependency graph
        def Relation.annotate {T K : Type} {n : ℕ} (f : Tuple T n → K) (r : Relation T n) :
        Equations
        Instances For
          Dependency graph
          @[instance_reducible]
          instance instAddAnnotatedRelation {T K : Type} {arity : ℕ} :
          Equations
          Dependency graph
          @[instance_reducible]
          instance instZeroAnnotatedRelation {T K : Type} {n : ℕ} :
          Equations
          Dependency graph
          @[instance_reducible]
          Equations
          Dependency graph
          def AnnotatedDatabase (T : Type) (K : Type u_1) :
          Type u_1
          Equations
          Instances For
            Dependency graph
            Dependency graph
            Equations
            Instances For
              Dependency graph

              Binding a relation name, the Î[R ↦ M̂] of a recursion's rounds: a cons, shadowing whatever the name had.

              Equations
              Instances For
                Dependency graph
                def AnnotatedTuple.toComposite {T K : Type} {n : ℕ} (p : AnnotatedTuple T K n) :
                Fin (n + Nat.succ 0) → T ⊕ K
                Equations
                Instances For
                  Dependency graph
                  def Tuple.fromComposite {T : Type} [ValueType T] {K : Type} [Zero K] {n : ℕ} (t : Tuple (T ⊕ K) (n + 1)) :
                  Equations
                  Instances For
                    Dependency graph
                    def AnnotatedRelation.toComposite {T K : Type} {n : ℕ} (ar : AnnotatedRelation T K n) :
                    Relation (T ⊕ K) (n + 1)
                    Equations
                    Instances For
                      Dependency graph
                      Equations
                      Instances For
                        Dependency graph