SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
The Chase Algorithm in Database Theory
Jan Hidders
1 / 31
Outline
1 Introduction
2 A Recap of First-order Logic for Database Theory
3 Dependencies
4 The Chase Algorithm
5 Correctness
6 Termination
2 / 31
Introduction
Outline
1 Introduction
2 A Recap of First-order Logic for Database Theory
3 Dependencies
4 The Chase Algorithm
5 Correctness
6 Termination
3 / 31
Introduction
Motivation
The Chase is an algorithm developed for determining if a dependency
D follows from a certain given set of dependencies S.
The term dependency is used here as a particular type of implication
that is a generalisation of functional dependencies, multi-valued
dependencies, join dependencies and inclusion dependences.
Basic idea:
1 We start with D.
2 Using the dependencies in S we rewrite D as much as possible to a
strictly weaker dependency D that is equivalent to D on instances that
satisfy all dependencies in S.
We do this by looking in S for rules with a premise implied by the
premise of D but whose conclusion is not implied by the premise of D.
For such rules we add the conclusion of the rule to the premise of D.
Repeat this until we find no more such rules in S.
3 We check if D is a tautology. If so, then D indeed follows from S,
otherwise it does not.
4 / 31
A Recap of First-order Logic for Database Theory
Outline
1 Introduction
2 A Recap of First-order Logic for Database Theory
3 Dependencies
4 The Chase Algorithm
5 Correctness
6 Termination
5 / 31
A Recap of First-order Logic for Database Theory
First-order Logic Formulas
We postulate two disjoint countably infinite sets: the set of variable
names V and the set of constants C.
In the examples we assume C to contain the natural numbers.
We will consider formulas in first-order logic with equality and
constants, but without function symbols.
Formulas: ∃x : ϕ, (ϕ ∧ ψ), ¬ϕ, P(s1, . . . , sn), (s1 = s2)
ϕ and ψ are formulas, x a variable in V, all si symbols from V ∪ C.
Short-hands:
∀x : ϕ ≡ ¬(∃x : ¬ϕ)
(ϕ ∨ ψ) ≡ ¬(¬ϕ ∧ ¬ψ)
(ϕ → ψ) ≡ ¬(ϕ ∧ ¬ψ)
Example (Formulas)
∀y : ∀z : ((P(1, y) ∧ P(y, z)) → P(1, z))
∀x : (x = 1 ∧ ∃y : ¬(x = y))
6 / 31
A Recap of First-order Logic for Database Theory
Models and Database Instances
We assume the domain, i.e., the set over which the quantifiers
quantify, to be equal to C.
The constants in formulas represent themselves, so the constant 5
represents the number 5.
Therefore the Unique Name Assumption holds, i.e., two distinct
constants always represent two distinct domain elements.
Given these assumptions we can define a model (or instance as we
will call them, since they correspond to database instances) simply as
a finite set of atoms, where an atom is defined as P(c1, . . . , cn) with
P a predicate name and c1, . . . , cn all constants.
Example (Models / Instances)
I1 = {P(1, 2), P(2, 3), Q(4)}
I2 = {P(), Q(1, 1)}
7 / 31
A Recap of First-order Logic for Database Theory
Domain Value Substitution
Applying a substitution f : V → C ∪ V, i.e., a partial function from
variables to constants and variables, to a formula ϕ, denoted as ϕf , is
defined by:
1 (∃y : ψ)f
= (∃y : ψg
) where g = {(x, c) ∈ f | x = y}
2 (ϕ ∧ ψ)f
= ϕf
∧ ψf
3 (¬ϕ)f
= ¬(ϕf
)
4 P(s1, . . . , sn)f
= P(sf
1 , . . . , sf
n )
5 (s1 = s2)f
= (sf
1 = sf
2 )
where for symbols s ∈ V ∪ C we let sf =
f (s) if s ∈ dom(f )
s if s ∈ dom(f )
.
Example
(∃x : ∃y : P(x, y, z)){z→5} = (∃x : ∃y : P(x, y, 5))
(∃x : (∃y : P(x, y, z)) ∧ (Q(y, z))){y→5} = ∃x : (∃y : P(x, y, z)) ∧ (Q(5, z)))
8 / 31
A Recap of First-order Logic for Database Theory
Formula Semantics
The proposition that an instance I satisfies a formula ϕ, denoted as
I |= ϕ, is defined by the following rules:
1 I |= ∃y : ϕ iff there is a constant c ∈ C such that I |= ϕ{y→c}
2 I |= (ϕ ∧ ψ) iff I |= ϕ and I |= ψ
3 I |= ¬ϕ iff I |= ϕ (i.e. if not I |= ϕ)
4 I |= P(s1, . . . , sn) iff P(s1, . . . , sn) ∈ I
5 I |= (s1 = s2) iff s1 = s2
Example
Assume the instance I = {P(1, 2), P(1, 1), Q(1), Q(2)}, then it holds that
I |= ¬∃x : (P(1, x) ∧ ¬Q(x))
I |= ¬∃x : (Q(x) ∧ ¬∃y : P(y, x))
I |= ¬∃x : ¬(x = x)
but also that
I |= ¬∃x : (Q(x) ∧ ¬P(x, 1))
I |= ¬∃x : ¬Q(x)
9 / 31
A Recap of First-order Logic for Database Theory
Free Variables and Closed Formulas
The free variables of a formula ϕ, denoted as FV (ϕ), is defined by:
1 FV (∃x : ϕ) = FV (ϕ)  {x}
2 FV ((ϕ ∧ ψ)) = FV (ϕ) ∪ FV (ψ)
3 FV (¬ϕ) = FV (ϕ)
4 FV (P(s1, . . . , sn)) = {s1, . . . , sn} ∩ V
5 FV ((s1 = s2)) = {s1, s2} ∩ V
A formula ϕ is said to be closed if FV (ϕ) = ∅
Example (Free variables)
FV (∃x : P(x, y)) = {y}
FV (∃x : ∃y : P(x, y)) = ∅
Proposition
Formula ϕ is closed iff ϕ{x→c} = ϕ for any x ∈ V and c ∈ C.
10 / 31
A Recap of First-order Logic for Database Theory
Satisfiability and Tautologies
Let ϕ be a closed formula:
We say that ϕ is satisfiable if there is an instance I such that I |= ϕ.
We say that ϕ is a tautology if for every instance I holds that I |= ϕ.
Example
∀x : (x = x) is a tautology.
∀x : ∀y : (P(x, y) → P(x, y) is a tautology.
∃x : ∃y : (P(x, y) ∧ ¬P(x, y) is unsatisfiable.
∀x : ∀y : (P(x, y) ∨ ¬P(x, y) is a tautology.
∀x : (P(x) → ∃y : Q(x, y)) is satisfiable, but not a tautology.
Proposition
A closed formula ϕ is unsatisfiable iff ¬ϕ is a tautology.
11 / 31
A Recap of First-order Logic for Database Theory
Notation
We will omit brackets if there is no semantic ambiguity:
((ϕ1 ∧ ϕ2) ∧ ϕ2) and (ϕ1 ∧ (ϕ2 ∧ ϕ2)) are written as (ϕ1 ∧ ϕ2 ∧ ϕ2)
((ϕ1 ∨ ϕ2) ∨ ϕ2) and (ϕ1 ∨ (ϕ2 ∨ ϕ2)) are written as (ϕ1 ∨ ϕ2 ∨ ϕ2)
The binary operators have precedence rules: ∧ ∨ →
The scope of a quantifier extends as far as possible
Example
∀x : ∃y : P(y) ∧ Q(x) denotes ∀x : ∃y : (P(y) ∧ Q(x))
P(y) ∧ Q(x) → R(y) ∨ R(x) denotes (P(y) ∧ Q(x)) → (R(y) ∨ R(x))
Chains of similar quantifiers can be merged:
∀x1 : ∀x2 : . . . ∀xn : ϕ can be written as ∀x1, x2, . . . , xn : ϕ
∃x1 : ∃x2 : . . . ∃xn : ϕ can be written as ∃x1, x2, . . . , xn : ϕ
12 / 31
Dependencies
Outline
1 Introduction
2 A Recap of First-order Logic for Database Theory
3 Dependencies
4 The Chase Algorithm
5 Correctness
6 Termination
13 / 31
Dependencies
What is a Dependency?
A simple conjunction is a formula of the form ϕ1 ∧ . . . ∧ ϕn where
each ϕi is either of the form P(s1, . . . , sm) or (s1 = s2).
Example (Simple conjunction)
P(1, x, x, y) ∧ Q(z, v, 1) ∧ x = z
A dependency is a closed formula of the form ∀¯x : ϕ → ∃¯y : ψ with
¯x = x1, . . . , xn and ¯y = y1, . . . , nm and where (1) ϕ and ψ are simple
conjunctions, (2) no variable is in both ¯x and ¯y, (3) each variable in ¯x
appears in at least one atom in ϕ and (4) each variable in ¯y appears
in at least one atom in ψ.
Example (Dependencies)
∀x, y : P(x, 1, y) ∧ Q(x, x) → ∃z : R(x, y, z) ∧ x = y
∀x, y, z : P(x, y) ∧ P(x, z) → y = z
∀x, y, z, u, v, w : P(x, y, z) ∧ P(u, v, w) ∧ v = y → P(x, y, w) ∧ P(u, y, z)
∀x, y : P(x, y) → ∃z : Q(y, z)
14 / 31
Dependencies
Abbreviated Notation for Dependencies
We will write dependencies ∀¯x : ϕ → ∃¯y : ψ usually simply as ϕ ⇒ ψ.
Example (Dependencies of the previous example in abbreviated notation)
P(x, 1, y) ∧ Q(x, x) ⇒ R(x, y, z) ∧ x = y
P(x, y) ∧ P(x, z) ⇒ y = z
P(x, y, z) ∧ P(u, v, w) ∧ v = y ⇒ P(x, y, w) ∧ P(u, y, z)
P(x, y) ⇒ Q(y, z)
This notation is unambiguous, since for every dependency
∀¯x : ϕ → ∃¯y : ψ it holds that ¯x contains exactly all variables in
FV (ϕ) and ¯y contains exactly all variables in FV (ψ)  FV (ϕ).
15 / 31
Dependencies
Connection with Database Normalisation Dependencies
These dependencies generalise classical dependencies.
Assume relations R(A, B, C, D) and S(E, F, G)
Functional dependencies: AB → C for R:
R(x, y, z, u) ∧ R(x, y, z , u ) ⇒ z = z
Multivalued dependencies: AB C for R:
R(x, y, z, u) ∧ R(x, y, z , u ) ⇒ R(x, y, z, u)
Join dependencies: ∗(AB, BC, CD) for R:
R(x, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ⇒ R(x, y, z, u)
Inclusion dependencies / foreign keys: R[C, D] ⊆ S[E, F]
R(x, y, z, u) ⇒ S(z, u, v, w)
New types of dependencies, e.g., R[A] ∩ R[B] = ∅
R(x, x, z, u) ⇒ 1 = 2
16 / 31
Dependencies
Condensing Conjunctions and Dependencies
A simple conjunction ϕ / dependency ϕ ⇒ ψ can be condensed to an
equivalent formula by applying exhaustively the following rules:
1 if ϕ contains a = a with a a constant, remove it
2 If ϕ contains x = a or a = x with x a variable and a a constant,
remove it and replace all occurrences of x with a
3 If ϕ contains x = y with x and y variables, remove it and replace all
occurrences of x with y
Example (condensing)
P(x, 1, y) ∧ x = y ⇒ Q(y, z) condenses to P(y, 1, y) ⇒ Q(y, z).
P(x, y) ∧ y = 1 ⇒ Q(y) condenses to P(x, 1) ⇒ Q(1)
P(x, y) ∧ x = y ⇒ y = 1 condenses to P(y, y) ⇒ y = 1
Proposition
If a simple conjunction ϕ / dependency ϕ ⇒ ψ is condensed then ϕ
contains only equations of the form a = b with a and b distinct constants.
17 / 31
The Chase Algorithm
Outline
1 Introduction
2 A Recap of First-order Logic for Database Theory
3 Dependencies
4 The Chase Algorithm
5 Correctness
6 Termination
18 / 31
The Chase Algorithm
Satisfiability of Simple Conjunctions
A non-closed formula ϕ is said to be satisfiable if ∃x1, . . . , xn : ϕ is
satisfiable, where {x1, . . . , xn} = FV (ϕ).
Proposition
A condensed simple conjunction is satisfiable iff it does not contain an
equation.
Proof.
If: Take the atoms of the conjunction as the instance where each variable
is replaced with a distinct constant not in the formula. Since the
conjunction has no equations, this instance will satisfy it.
Only-if: Assume it does contain an equation. This equation will be of the
form a = b with a and b distinct constants. The formula will therefore not
be satisfied by any instance.
19 / 31
The Chase Algorithm
Embeddings into Instances
An embedding of a simple conjunction ϕ into an instance I is a
function f : FV (ϕ) → C such that
1 for every P(s1, . . . , sn) in ϕ there is a P(s1, . . . , sn)f
in I, and
2 for every (s1 = s2) in ϕ it holds that sf
1 = sf
2 .
Proposition
For every dependency ϕ ⇒ ψ it holds that I |= ϕ ⇒ ψ iff for every
embedding f of ϕ into I there is an extension of f that embeds ψ into I.
20 / 31
The Chase Algorithm
Tautological Dependencies
An embedding of a simple conjunction ϕ into a simple conjunction ψ
is a function f : FV (ϕ) → (FV (ψ) ∪ C) such that
1 for every P(s1, . . . , sn) in ϕ there is a P(s1, . . . , sn)f
in ψ, and
2 for every (s1 = s2) in ϕ it holds that sf
1 = sf
2 .
Proposition
A condensed dependency ϕ ⇒ ψ is a tautology iff (1) ϕ is not satisfiable
or (2) there is an embedding of ψ into ϕ that maps the variables in ϕ to
themselves.
Proof.
If: If ϕ is not satisfiable then the implication holds a tautologyly. If there is an embedding h of
ϕ into an instance, and f is the embedding of ψ into ϕ, then h ◦ f is an embedding of ψ in the
instance.
Only-if: Let ϕ be satisfiable, so without equations, and assume there is no embedding of ψ into
ϕ that is the identity on the variables in ϕ. Then on a corresponding instance of ϕ the
dependency does not hold.
21 / 31
The Chase Algorithm
Corresponding Instances
For a simple conjunction ϕ, a corresponding instance consists of all
atoms in ϕ where distinct variables are replaced with distinct
constants not already used in ϕ.
Example
P(x, x, 1) ∧ P(x, y, 2) has corresponding instance {P(3, 3, 1), P(3, 4, 2)}
A simple conjunction ϕ is said to satisfy a dependency ϕ ⇒ ψ if
every embedding of ϕ into ϕ can be extended to an embedding of ψ
into ϕ.
Proposition
Let ϕ be a simple conjunction containing only atoms and I a
corresponding instance of ϕ. Then, for every dependency ϕ ⇒ ψ it holds
that ϕ satisfies ϕ ⇒ ψ iff I satisfies ϕ ⇒ ψ .
22 / 31
The Chase Algorithm
The Inference Problem
The problem we are aiming to solve:
A set of dependencies S is said to logically imply a dependency
ϕ ⇒ ψ if for every instance that satisfies all dependencies in S it
holds that it also satisfies ϕ ⇒ ψ .
Example
The question “for the relation R(A, B, C) does the join dependency
∗(AB, BC) follow from the functional dependency B → C?” can be
formulated as “is R(x, y, z1) ∧ R(x2, y, z) ⇒ R(x, y, z) logically implied by
R(x1, y, z1) ∧ R(x2, y, z2) ⇒ z1 = z2?”
23 / 31
The Chase Algorithm
The Core Intuition of the Chase Algorithm
Suppose we want to show that the (join) dependency
D1 = R(x, y, z ) ∧ R(x , y, z) ⇒ R(x, y, z) follows from the (functional)
dependency D = R(x, y, z) ∧ R(x , y, z ) ⇒ z = z .
Note that we can embed the premise of D into the premise of D1 via
the embedding f = {x → x, x → x , y → y, z → z , z → z}.
So if D1 applies to an instance, then so will D .
So we can construct a D2 by strengthening the premise of D1 with
the conclusion of D with f applied, i.e., (z = z )f , which leads to
D2 = R(x, y, z ) ∧ R(x , y, z) ∧ z = z ⇒ R(x, y, z).
On instances that satisfy D the dependencies D1 and D2 are
equivalent, i.e., are either both satisfied or both not satisified.
If we condense D2 we get D2 = R(x, y, z) ∧ R(x , y, z) ⇒ R(x, y, z).
Since D2 is a tautology (the conclusion is part of the premise) it
follows that D1 holds on all instances that satisfy D , and so logically
follows.
24 / 31
The Chase Algorithm
The Chase Algorithm
Input: a set S of dependencies and a dependency ϕ ⇒ ψ
Output: true if ϕ ⇒ ψ is logically implied by S, and false otherwise.
Procedure:
1 Condense ϕ ⇒ ψ
2 While (1) ϕ ⇒ ψ is not a tautology and (2) there is a dependency
ϕ ⇒ ψ in S that is not satisfied by ϕ, do:
1 let f be an embedding of ϕ into ϕ that cannot be extended to an
embedding of ψ into ϕ
2 let g be an extension of f that maps each variable in ψ that does not
occur in ϕ to a distinct variable not in ϕ or ψ
3 let ϕ become ϕ ∧ (ψ )g
4 condense ϕ ⇒ ψ
3 If ϕ ⇒ ψ is a tautology, return true, else false.
25 / 31
The Chase Algorithm
Chase Example
Example
Assume for relation R(A, B, C, D) we have a dependency set S = {D , D } with D the
functional dependency B → A and D the multivalued dependency C D, and a join
dependency D = ∗(AB, BC, CD).
In our notation:
D = R(x1, y, z1, u1) ∧ R(x2, y, z2, u2) ⇒ x1 = x2
D = R(x1, y1, z, u1) ∧ R(x2, y2, z, u2) ⇒ R(x1, y1, z, u2)
D = R(x, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ⇒ R(x, y, z, u)
We now will chase D with D and D :
1 Initialise: R(x, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ⇒ R(x, y, z, u)
2 Apply D : R(x, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ∧ x = x2 ⇒ R(x, y, z, u)
Condense: R(x2, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ⇒ R(x2, y, z, u)
3 Apply D : R(x2, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ∧ R(x2, y, z, u) ⇒ R(x2, y, z, u)
Condense: nothing changes
4 The dependency has become a tautology, so we stop and conclude that D logically follows
from S.
26 / 31
Correctness
Outline
1 Introduction
2 A Recap of First-order Logic for Database Theory
3 Dependencies
4 The Chase Algorithm
5 Correctness
6 Termination
27 / 31
Correctness
Correctness of the Chase
Theorem
If the Chase ends for S and ϕ ⇒ ψ, it returns true iff S implies ϕ ⇒ ψ.
Proof Sketch.
If: It can be shown that after every iteration the Chase computes a dependency that is
equivalent to the previous dependency on instances that satisfy the dependencies in S, i.e., it is
satisfied by such an instances iff the previous dependency is. Therefore, if the result is a
tautology, i.e., satisfied by all instances, then the input dependency ϕ ⇒ ψ holds for all
instances that satisfy the dependencies in S.
Only-if: Assume that the final ϕ ⇒ ψ is not a tautology. Then ϕ is satisfiable, and therefore
contains no equations. It follows that a corresponding instance of ϕ (1) satisfies all
dependencies in S (or the chase would not have terminated) but (2) does not satisfy ϕ ⇒ ψ
(otherwise ϕ would satisfy ϕ ⇒ ψ, and so the embedding of ϕ into itself can be extended to an
embedding of ψ into ϕ that maps all variable in ϕ to themselves, and so there would be such an
embedding of ψ into ϕ, but that would make ϕ ⇒ ψ a tautology). Since the final ϕ ⇒ ψ is
equivalent to the input ϕ ⇒ ψ on instances that satisfy all dependencies in S, it follows that
this instance does not satisfy the input ϕ ⇒ ψ.
28 / 31
Termination
Outline
1 Introduction
2 A Recap of First-order Logic for Database Theory
3 Dependencies
4 The Chase Algorithm
5 Correctness
6 Termination
29 / 31
Termination
When does the Chase terminate?
In general, the Chase does not always terminate
Example (Non-termination of the Chase)
If we use S = {R(x, y) ⇒ R(x, z) ∧ R(z, y)} to chase R(x, y) ⇒ x = y, the
chase will not terminate.
There are, however, interesting sufficient conditions for termination.
We call a dependency ϕ ⇒ ψ full if all variables in ψ appear in ϕ.
Proposition
If S is a set of full dependencies then the Chase with S terminates on any
dependency.
This covers all classical dependencies from normalisation theory such
as functional dependencies, multivalued dependencies and join
dependencies, but not inclusion dependencies.
30 / 31
Termination
Acyclic Sets of Dependencies
Another way of guaranteeing terminating is to consider how they can
trigger the creation of new variables during the chase.
Given a set S of dependencies we define the variable creation graph of
S as the graph (V , E) where V contains all the predicate names and
E contains an edge (P, Q) iff there is in S a non-full dependency
ϕ ⇒ ψ where ϕ mentions P and ψ mentions Q.
Proposition
If the variable creation graph of S is acyclic then the Chase with S
terminates on any dependency.
This covers data integration approaches where the relationships
between the original datasets and the integrated datasets are specified
by non-full dependencies that go only in one direction.
31 / 31

Weitere ähnliche Inhalte

Was ist angesagt?

COMPARISON OF SISO & MIMO TECHNIQUES IN WIRELESS COMMUNICATION
COMPARISON OF SISO & MIMO TECHNIQUES IN WIRELESS COMMUNICATIONCOMPARISON OF SISO & MIMO TECHNIQUES IN WIRELESS COMMUNICATION
COMPARISON OF SISO & MIMO TECHNIQUES IN WIRELESS COMMUNICATIONJournal For Research
 
SOLUTION MANUAL OF WIRELESS COMMUNICATIONS BY THEODORE S RAPPAPORT
SOLUTION MANUAL OF WIRELESS COMMUNICATIONS BY THEODORE S RAPPAPORTSOLUTION MANUAL OF WIRELESS COMMUNICATIONS BY THEODORE S RAPPAPORT
SOLUTION MANUAL OF WIRELESS COMMUNICATIONS BY THEODORE S RAPPAPORTvtunotesbysree
 
KAREL DS200 & EXCHANGES
KAREL DS200 & EXCHANGESKAREL DS200 & EXCHANGES
KAREL DS200 & EXCHANGESRaaman Pillay
 
Linear block coding
Linear block codingLinear block coding
Linear block codingjknm
 
Coherent and Non-coherent detection of ASK, FSK AND QASK
Coherent and Non-coherent detection of ASK, FSK AND QASKCoherent and Non-coherent detection of ASK, FSK AND QASK
Coherent and Non-coherent detection of ASK, FSK AND QASKnaimish12
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMMANISH KUMAR
 
FIDOセキュリティ認定の概要と最新状況
FIDOセキュリティ認定の概要と最新状況FIDOセキュリティ認定の概要と最新状況
FIDOセキュリティ認定の概要と最新状況FIDO Alliance
 
Information and data security public key cryptography and rsa
Information and data security public key cryptography and rsaInformation and data security public key cryptography and rsa
Information and data security public key cryptography and rsaMazin Alwaaly
 
Homomorphic speech processing
Homomorphic speech processingHomomorphic speech processing
Homomorphic speech processingsivakumar m
 
Computer System Security (UNIT IV) For AKTU Lucknow
Computer System Security (UNIT IV) For AKTU LucknowComputer System Security (UNIT IV) For AKTU Lucknow
Computer System Security (UNIT IV) For AKTU LucknowBrijesh Vishwakarma
 
Frequency synthesizer
Frequency synthesizerFrequency synthesizer
Frequency synthesizerSagarKumar153
 

Was ist angesagt? (20)

COMPARISON OF SISO & MIMO TECHNIQUES IN WIRELESS COMMUNICATION
COMPARISON OF SISO & MIMO TECHNIQUES IN WIRELESS COMMUNICATIONCOMPARISON OF SISO & MIMO TECHNIQUES IN WIRELESS COMMUNICATION
COMPARISON OF SISO & MIMO TECHNIQUES IN WIRELESS COMMUNICATION
 
SOLUTION MANUAL OF WIRELESS COMMUNICATIONS BY THEODORE S RAPPAPORT
SOLUTION MANUAL OF WIRELESS COMMUNICATIONS BY THEODORE S RAPPAPORTSOLUTION MANUAL OF WIRELESS COMMUNICATIONS BY THEODORE S RAPPAPORT
SOLUTION MANUAL OF WIRELESS COMMUNICATIONS BY THEODORE S RAPPAPORT
 
KAREL DS200 & EXCHANGES
KAREL DS200 & EXCHANGESKAREL DS200 & EXCHANGES
KAREL DS200 & EXCHANGES
 
Linear block coding
Linear block codingLinear block coding
Linear block coding
 
Turbo code
Turbo codeTurbo code
Turbo code
 
Coherent and Non-coherent detection of ASK, FSK AND QASK
Coherent and Non-coherent detection of ASK, FSK AND QASKCoherent and Non-coherent detection of ASK, FSK AND QASK
Coherent and Non-coherent detection of ASK, FSK AND QASK
 
Secure electronic transaction (set)
Secure electronic transaction (set)Secure electronic transaction (set)
Secure electronic transaction (set)
 
error control coding
error control coding error control coding
error control coding
 
Signal & system
Signal & systemSignal & system
Signal & system
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEM
 
Digital signature
Digital signatureDigital signature
Digital signature
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
Lzw compression
Lzw compressionLzw compression
Lzw compression
 
Secure hashing algorithm
Secure hashing algorithmSecure hashing algorithm
Secure hashing algorithm
 
FIDOセキュリティ認定の概要と最新状況
FIDOセキュリティ認定の概要と最新状況FIDOセキュリティ認定の概要と最新状況
FIDOセキュリティ認定の概要と最新状況
 
Information and data security public key cryptography and rsa
Information and data security public key cryptography and rsaInformation and data security public key cryptography and rsa
Information and data security public key cryptography and rsa
 
Digital Signature ppt
Digital Signature pptDigital Signature ppt
Digital Signature ppt
 
Homomorphic speech processing
Homomorphic speech processingHomomorphic speech processing
Homomorphic speech processing
 
Computer System Security (UNIT IV) For AKTU Lucknow
Computer System Security (UNIT IV) For AKTU LucknowComputer System Security (UNIT IV) For AKTU Lucknow
Computer System Security (UNIT IV) For AKTU Lucknow
 
Frequency synthesizer
Frequency synthesizerFrequency synthesizer
Frequency synthesizer
 

Ähnlich wie The Chase in Database Theory

590-Article Text.pdf
590-Article Text.pdf590-Article Text.pdf
590-Article Text.pdfBenoitValea
 
590-Article Text.pdf
590-Article Text.pdf590-Article Text.pdf
590-Article Text.pdfBenoitValea
 
Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System - Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System - Michael Soltys
 
Applications of partial differentiation
Applications of partial differentiationApplications of partial differentiation
Applications of partial differentiationVaibhav Tandel
 
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...Cristiano Longo
 
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Marco Benini
 
Cs229 notes8
Cs229 notes8Cs229 notes8
Cs229 notes8VuTran231
 
A factorization theorem for generalized exponential polynomials with infinite...
A factorization theorem for generalized exponential polynomials with infinite...A factorization theorem for generalized exponential polynomials with infinite...
A factorization theorem for generalized exponential polynomials with infinite...Pim Piepers
 
Fuzzy random variables and Kolomogrov’s important results
Fuzzy random variables and Kolomogrov’s important resultsFuzzy random variables and Kolomogrov’s important results
Fuzzy random variables and Kolomogrov’s important resultsinventionjournals
 
HypergroupsAssociationSchemes_leejuntaek
HypergroupsAssociationSchemes_leejuntaekHypergroupsAssociationSchemes_leejuntaek
HypergroupsAssociationSchemes_leejuntaekJun Taek Lee
 
Reciprocity Law For Flat Conformal Metrics With Conical Singularities
Reciprocity Law For Flat Conformal Metrics With Conical SingularitiesReciprocity Law For Flat Conformal Metrics With Conical Singularities
Reciprocity Law For Flat Conformal Metrics With Conical SingularitiesLukasz Obara
 
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)IJERA Editor
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionCharles Deledalle
 
Machine learning (9)
Machine learning (9)Machine learning (9)
Machine learning (9)NYversity
 
Probability cheatsheet
Probability cheatsheetProbability cheatsheet
Probability cheatsheetSuvrat Mishra
 

Ähnlich wie The Chase in Database Theory (20)

Predicates
PredicatesPredicates
Predicates
 
590-Article Text.pdf
590-Article Text.pdf590-Article Text.pdf
590-Article Text.pdf
 
590-Article Text.pdf
590-Article Text.pdf590-Article Text.pdf
590-Article Text.pdf
 
Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System - Boolean Programs and Quantified Propositional Proof System -
Boolean Programs and Quantified Propositional Proof System -
 
Applications of partial differentiation
Applications of partial differentiationApplications of partial differentiation
Applications of partial differentiation
 
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
Herbrand-satisfiability of a Quantified Set-theoretical Fragment (Cantone, Lo...
 
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
Intuitionistic First-Order Logic: Categorical semantics via the Curry-Howard ...
 
E42012426
E42012426E42012426
E42012426
 
Cs229 notes8
Cs229 notes8Cs229 notes8
Cs229 notes8
 
A factorization theorem for generalized exponential polynomials with infinite...
A factorization theorem for generalized exponential polynomials with infinite...A factorization theorem for generalized exponential polynomials with infinite...
A factorization theorem for generalized exponential polynomials with infinite...
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Fuzzy random variables and Kolomogrov’s important results
Fuzzy random variables and Kolomogrov’s important resultsFuzzy random variables and Kolomogrov’s important results
Fuzzy random variables and Kolomogrov’s important results
 
Probability Cheatsheet.pdf
Probability Cheatsheet.pdfProbability Cheatsheet.pdf
Probability Cheatsheet.pdf
 
HypergroupsAssociationSchemes_leejuntaek
HypergroupsAssociationSchemes_leejuntaekHypergroupsAssociationSchemes_leejuntaek
HypergroupsAssociationSchemes_leejuntaek
 
Reciprocity Law For Flat Conformal Metrics With Conical Singularities
Reciprocity Law For Flat Conformal Metrics With Conical SingularitiesReciprocity Law For Flat Conformal Metrics With Conical Singularities
Reciprocity Law For Flat Conformal Metrics With Conical Singularities
 
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
Fixed Point Results In Fuzzy Menger Space With Common Property (E.A.)
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - Introduction
 
Machine learning (9)
Machine learning (9)Machine learning (9)
Machine learning (9)
 
Slides mc gill-v4
Slides mc gill-v4Slides mc gill-v4
Slides mc gill-v4
 
Probability cheatsheet
Probability cheatsheetProbability cheatsheet
Probability cheatsheet
 

Kürzlich hochgeladen

Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...GQ Research
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxMike Bennett
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Thomas Poetter
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhYasamin16
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.natarajan8993
 

Kürzlich hochgeladen (20)

Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptx
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.
 

The Chase in Database Theory

  • 1. The Chase Algorithm in Database Theory Jan Hidders 1 / 31
  • 2. Outline 1 Introduction 2 A Recap of First-order Logic for Database Theory 3 Dependencies 4 The Chase Algorithm 5 Correctness 6 Termination 2 / 31
  • 3. Introduction Outline 1 Introduction 2 A Recap of First-order Logic for Database Theory 3 Dependencies 4 The Chase Algorithm 5 Correctness 6 Termination 3 / 31
  • 4. Introduction Motivation The Chase is an algorithm developed for determining if a dependency D follows from a certain given set of dependencies S. The term dependency is used here as a particular type of implication that is a generalisation of functional dependencies, multi-valued dependencies, join dependencies and inclusion dependences. Basic idea: 1 We start with D. 2 Using the dependencies in S we rewrite D as much as possible to a strictly weaker dependency D that is equivalent to D on instances that satisfy all dependencies in S. We do this by looking in S for rules with a premise implied by the premise of D but whose conclusion is not implied by the premise of D. For such rules we add the conclusion of the rule to the premise of D. Repeat this until we find no more such rules in S. 3 We check if D is a tautology. If so, then D indeed follows from S, otherwise it does not. 4 / 31
  • 5. A Recap of First-order Logic for Database Theory Outline 1 Introduction 2 A Recap of First-order Logic for Database Theory 3 Dependencies 4 The Chase Algorithm 5 Correctness 6 Termination 5 / 31
  • 6. A Recap of First-order Logic for Database Theory First-order Logic Formulas We postulate two disjoint countably infinite sets: the set of variable names V and the set of constants C. In the examples we assume C to contain the natural numbers. We will consider formulas in first-order logic with equality and constants, but without function symbols. Formulas: ∃x : ϕ, (ϕ ∧ ψ), ¬ϕ, P(s1, . . . , sn), (s1 = s2) ϕ and ψ are formulas, x a variable in V, all si symbols from V ∪ C. Short-hands: ∀x : ϕ ≡ ¬(∃x : ¬ϕ) (ϕ ∨ ψ) ≡ ¬(¬ϕ ∧ ¬ψ) (ϕ → ψ) ≡ ¬(ϕ ∧ ¬ψ) Example (Formulas) ∀y : ∀z : ((P(1, y) ∧ P(y, z)) → P(1, z)) ∀x : (x = 1 ∧ ∃y : ¬(x = y)) 6 / 31
  • 7. A Recap of First-order Logic for Database Theory Models and Database Instances We assume the domain, i.e., the set over which the quantifiers quantify, to be equal to C. The constants in formulas represent themselves, so the constant 5 represents the number 5. Therefore the Unique Name Assumption holds, i.e., two distinct constants always represent two distinct domain elements. Given these assumptions we can define a model (or instance as we will call them, since they correspond to database instances) simply as a finite set of atoms, where an atom is defined as P(c1, . . . , cn) with P a predicate name and c1, . . . , cn all constants. Example (Models / Instances) I1 = {P(1, 2), P(2, 3), Q(4)} I2 = {P(), Q(1, 1)} 7 / 31
  • 8. A Recap of First-order Logic for Database Theory Domain Value Substitution Applying a substitution f : V → C ∪ V, i.e., a partial function from variables to constants and variables, to a formula ϕ, denoted as ϕf , is defined by: 1 (∃y : ψ)f = (∃y : ψg ) where g = {(x, c) ∈ f | x = y} 2 (ϕ ∧ ψ)f = ϕf ∧ ψf 3 (¬ϕ)f = ¬(ϕf ) 4 P(s1, . . . , sn)f = P(sf 1 , . . . , sf n ) 5 (s1 = s2)f = (sf 1 = sf 2 ) where for symbols s ∈ V ∪ C we let sf = f (s) if s ∈ dom(f ) s if s ∈ dom(f ) . Example (∃x : ∃y : P(x, y, z)){z→5} = (∃x : ∃y : P(x, y, 5)) (∃x : (∃y : P(x, y, z)) ∧ (Q(y, z))){y→5} = ∃x : (∃y : P(x, y, z)) ∧ (Q(5, z))) 8 / 31
  • 9. A Recap of First-order Logic for Database Theory Formula Semantics The proposition that an instance I satisfies a formula ϕ, denoted as I |= ϕ, is defined by the following rules: 1 I |= ∃y : ϕ iff there is a constant c ∈ C such that I |= ϕ{y→c} 2 I |= (ϕ ∧ ψ) iff I |= ϕ and I |= ψ 3 I |= ¬ϕ iff I |= ϕ (i.e. if not I |= ϕ) 4 I |= P(s1, . . . , sn) iff P(s1, . . . , sn) ∈ I 5 I |= (s1 = s2) iff s1 = s2 Example Assume the instance I = {P(1, 2), P(1, 1), Q(1), Q(2)}, then it holds that I |= ¬∃x : (P(1, x) ∧ ¬Q(x)) I |= ¬∃x : (Q(x) ∧ ¬∃y : P(y, x)) I |= ¬∃x : ¬(x = x) but also that I |= ¬∃x : (Q(x) ∧ ¬P(x, 1)) I |= ¬∃x : ¬Q(x) 9 / 31
  • 10. A Recap of First-order Logic for Database Theory Free Variables and Closed Formulas The free variables of a formula ϕ, denoted as FV (ϕ), is defined by: 1 FV (∃x : ϕ) = FV (ϕ) {x} 2 FV ((ϕ ∧ ψ)) = FV (ϕ) ∪ FV (ψ) 3 FV (¬ϕ) = FV (ϕ) 4 FV (P(s1, . . . , sn)) = {s1, . . . , sn} ∩ V 5 FV ((s1 = s2)) = {s1, s2} ∩ V A formula ϕ is said to be closed if FV (ϕ) = ∅ Example (Free variables) FV (∃x : P(x, y)) = {y} FV (∃x : ∃y : P(x, y)) = ∅ Proposition Formula ϕ is closed iff ϕ{x→c} = ϕ for any x ∈ V and c ∈ C. 10 / 31
  • 11. A Recap of First-order Logic for Database Theory Satisfiability and Tautologies Let ϕ be a closed formula: We say that ϕ is satisfiable if there is an instance I such that I |= ϕ. We say that ϕ is a tautology if for every instance I holds that I |= ϕ. Example ∀x : (x = x) is a tautology. ∀x : ∀y : (P(x, y) → P(x, y) is a tautology. ∃x : ∃y : (P(x, y) ∧ ¬P(x, y) is unsatisfiable. ∀x : ∀y : (P(x, y) ∨ ¬P(x, y) is a tautology. ∀x : (P(x) → ∃y : Q(x, y)) is satisfiable, but not a tautology. Proposition A closed formula ϕ is unsatisfiable iff ¬ϕ is a tautology. 11 / 31
  • 12. A Recap of First-order Logic for Database Theory Notation We will omit brackets if there is no semantic ambiguity: ((ϕ1 ∧ ϕ2) ∧ ϕ2) and (ϕ1 ∧ (ϕ2 ∧ ϕ2)) are written as (ϕ1 ∧ ϕ2 ∧ ϕ2) ((ϕ1 ∨ ϕ2) ∨ ϕ2) and (ϕ1 ∨ (ϕ2 ∨ ϕ2)) are written as (ϕ1 ∨ ϕ2 ∨ ϕ2) The binary operators have precedence rules: ∧ ∨ → The scope of a quantifier extends as far as possible Example ∀x : ∃y : P(y) ∧ Q(x) denotes ∀x : ∃y : (P(y) ∧ Q(x)) P(y) ∧ Q(x) → R(y) ∨ R(x) denotes (P(y) ∧ Q(x)) → (R(y) ∨ R(x)) Chains of similar quantifiers can be merged: ∀x1 : ∀x2 : . . . ∀xn : ϕ can be written as ∀x1, x2, . . . , xn : ϕ ∃x1 : ∃x2 : . . . ∃xn : ϕ can be written as ∃x1, x2, . . . , xn : ϕ 12 / 31
  • 13. Dependencies Outline 1 Introduction 2 A Recap of First-order Logic for Database Theory 3 Dependencies 4 The Chase Algorithm 5 Correctness 6 Termination 13 / 31
  • 14. Dependencies What is a Dependency? A simple conjunction is a formula of the form ϕ1 ∧ . . . ∧ ϕn where each ϕi is either of the form P(s1, . . . , sm) or (s1 = s2). Example (Simple conjunction) P(1, x, x, y) ∧ Q(z, v, 1) ∧ x = z A dependency is a closed formula of the form ∀¯x : ϕ → ∃¯y : ψ with ¯x = x1, . . . , xn and ¯y = y1, . . . , nm and where (1) ϕ and ψ are simple conjunctions, (2) no variable is in both ¯x and ¯y, (3) each variable in ¯x appears in at least one atom in ϕ and (4) each variable in ¯y appears in at least one atom in ψ. Example (Dependencies) ∀x, y : P(x, 1, y) ∧ Q(x, x) → ∃z : R(x, y, z) ∧ x = y ∀x, y, z : P(x, y) ∧ P(x, z) → y = z ∀x, y, z, u, v, w : P(x, y, z) ∧ P(u, v, w) ∧ v = y → P(x, y, w) ∧ P(u, y, z) ∀x, y : P(x, y) → ∃z : Q(y, z) 14 / 31
  • 15. Dependencies Abbreviated Notation for Dependencies We will write dependencies ∀¯x : ϕ → ∃¯y : ψ usually simply as ϕ ⇒ ψ. Example (Dependencies of the previous example in abbreviated notation) P(x, 1, y) ∧ Q(x, x) ⇒ R(x, y, z) ∧ x = y P(x, y) ∧ P(x, z) ⇒ y = z P(x, y, z) ∧ P(u, v, w) ∧ v = y ⇒ P(x, y, w) ∧ P(u, y, z) P(x, y) ⇒ Q(y, z) This notation is unambiguous, since for every dependency ∀¯x : ϕ → ∃¯y : ψ it holds that ¯x contains exactly all variables in FV (ϕ) and ¯y contains exactly all variables in FV (ψ) FV (ϕ). 15 / 31
  • 16. Dependencies Connection with Database Normalisation Dependencies These dependencies generalise classical dependencies. Assume relations R(A, B, C, D) and S(E, F, G) Functional dependencies: AB → C for R: R(x, y, z, u) ∧ R(x, y, z , u ) ⇒ z = z Multivalued dependencies: AB C for R: R(x, y, z, u) ∧ R(x, y, z , u ) ⇒ R(x, y, z, u) Join dependencies: ∗(AB, BC, CD) for R: R(x, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ⇒ R(x, y, z, u) Inclusion dependencies / foreign keys: R[C, D] ⊆ S[E, F] R(x, y, z, u) ⇒ S(z, u, v, w) New types of dependencies, e.g., R[A] ∩ R[B] = ∅ R(x, x, z, u) ⇒ 1 = 2 16 / 31
  • 17. Dependencies Condensing Conjunctions and Dependencies A simple conjunction ϕ / dependency ϕ ⇒ ψ can be condensed to an equivalent formula by applying exhaustively the following rules: 1 if ϕ contains a = a with a a constant, remove it 2 If ϕ contains x = a or a = x with x a variable and a a constant, remove it and replace all occurrences of x with a 3 If ϕ contains x = y with x and y variables, remove it and replace all occurrences of x with y Example (condensing) P(x, 1, y) ∧ x = y ⇒ Q(y, z) condenses to P(y, 1, y) ⇒ Q(y, z). P(x, y) ∧ y = 1 ⇒ Q(y) condenses to P(x, 1) ⇒ Q(1) P(x, y) ∧ x = y ⇒ y = 1 condenses to P(y, y) ⇒ y = 1 Proposition If a simple conjunction ϕ / dependency ϕ ⇒ ψ is condensed then ϕ contains only equations of the form a = b with a and b distinct constants. 17 / 31
  • 18. The Chase Algorithm Outline 1 Introduction 2 A Recap of First-order Logic for Database Theory 3 Dependencies 4 The Chase Algorithm 5 Correctness 6 Termination 18 / 31
  • 19. The Chase Algorithm Satisfiability of Simple Conjunctions A non-closed formula ϕ is said to be satisfiable if ∃x1, . . . , xn : ϕ is satisfiable, where {x1, . . . , xn} = FV (ϕ). Proposition A condensed simple conjunction is satisfiable iff it does not contain an equation. Proof. If: Take the atoms of the conjunction as the instance where each variable is replaced with a distinct constant not in the formula. Since the conjunction has no equations, this instance will satisfy it. Only-if: Assume it does contain an equation. This equation will be of the form a = b with a and b distinct constants. The formula will therefore not be satisfied by any instance. 19 / 31
  • 20. The Chase Algorithm Embeddings into Instances An embedding of a simple conjunction ϕ into an instance I is a function f : FV (ϕ) → C such that 1 for every P(s1, . . . , sn) in ϕ there is a P(s1, . . . , sn)f in I, and 2 for every (s1 = s2) in ϕ it holds that sf 1 = sf 2 . Proposition For every dependency ϕ ⇒ ψ it holds that I |= ϕ ⇒ ψ iff for every embedding f of ϕ into I there is an extension of f that embeds ψ into I. 20 / 31
  • 21. The Chase Algorithm Tautological Dependencies An embedding of a simple conjunction ϕ into a simple conjunction ψ is a function f : FV (ϕ) → (FV (ψ) ∪ C) such that 1 for every P(s1, . . . , sn) in ϕ there is a P(s1, . . . , sn)f in ψ, and 2 for every (s1 = s2) in ϕ it holds that sf 1 = sf 2 . Proposition A condensed dependency ϕ ⇒ ψ is a tautology iff (1) ϕ is not satisfiable or (2) there is an embedding of ψ into ϕ that maps the variables in ϕ to themselves. Proof. If: If ϕ is not satisfiable then the implication holds a tautologyly. If there is an embedding h of ϕ into an instance, and f is the embedding of ψ into ϕ, then h ◦ f is an embedding of ψ in the instance. Only-if: Let ϕ be satisfiable, so without equations, and assume there is no embedding of ψ into ϕ that is the identity on the variables in ϕ. Then on a corresponding instance of ϕ the dependency does not hold. 21 / 31
  • 22. The Chase Algorithm Corresponding Instances For a simple conjunction ϕ, a corresponding instance consists of all atoms in ϕ where distinct variables are replaced with distinct constants not already used in ϕ. Example P(x, x, 1) ∧ P(x, y, 2) has corresponding instance {P(3, 3, 1), P(3, 4, 2)} A simple conjunction ϕ is said to satisfy a dependency ϕ ⇒ ψ if every embedding of ϕ into ϕ can be extended to an embedding of ψ into ϕ. Proposition Let ϕ be a simple conjunction containing only atoms and I a corresponding instance of ϕ. Then, for every dependency ϕ ⇒ ψ it holds that ϕ satisfies ϕ ⇒ ψ iff I satisfies ϕ ⇒ ψ . 22 / 31
  • 23. The Chase Algorithm The Inference Problem The problem we are aiming to solve: A set of dependencies S is said to logically imply a dependency ϕ ⇒ ψ if for every instance that satisfies all dependencies in S it holds that it also satisfies ϕ ⇒ ψ . Example The question “for the relation R(A, B, C) does the join dependency ∗(AB, BC) follow from the functional dependency B → C?” can be formulated as “is R(x, y, z1) ∧ R(x2, y, z) ⇒ R(x, y, z) logically implied by R(x1, y, z1) ∧ R(x2, y, z2) ⇒ z1 = z2?” 23 / 31
  • 24. The Chase Algorithm The Core Intuition of the Chase Algorithm Suppose we want to show that the (join) dependency D1 = R(x, y, z ) ∧ R(x , y, z) ⇒ R(x, y, z) follows from the (functional) dependency D = R(x, y, z) ∧ R(x , y, z ) ⇒ z = z . Note that we can embed the premise of D into the premise of D1 via the embedding f = {x → x, x → x , y → y, z → z , z → z}. So if D1 applies to an instance, then so will D . So we can construct a D2 by strengthening the premise of D1 with the conclusion of D with f applied, i.e., (z = z )f , which leads to D2 = R(x, y, z ) ∧ R(x , y, z) ∧ z = z ⇒ R(x, y, z). On instances that satisfy D the dependencies D1 and D2 are equivalent, i.e., are either both satisfied or both not satisified. If we condense D2 we get D2 = R(x, y, z) ∧ R(x , y, z) ⇒ R(x, y, z). Since D2 is a tautology (the conclusion is part of the premise) it follows that D1 holds on all instances that satisfy D , and so logically follows. 24 / 31
  • 25. The Chase Algorithm The Chase Algorithm Input: a set S of dependencies and a dependency ϕ ⇒ ψ Output: true if ϕ ⇒ ψ is logically implied by S, and false otherwise. Procedure: 1 Condense ϕ ⇒ ψ 2 While (1) ϕ ⇒ ψ is not a tautology and (2) there is a dependency ϕ ⇒ ψ in S that is not satisfied by ϕ, do: 1 let f be an embedding of ϕ into ϕ that cannot be extended to an embedding of ψ into ϕ 2 let g be an extension of f that maps each variable in ψ that does not occur in ϕ to a distinct variable not in ϕ or ψ 3 let ϕ become ϕ ∧ (ψ )g 4 condense ϕ ⇒ ψ 3 If ϕ ⇒ ψ is a tautology, return true, else false. 25 / 31
  • 26. The Chase Algorithm Chase Example Example Assume for relation R(A, B, C, D) we have a dependency set S = {D , D } with D the functional dependency B → A and D the multivalued dependency C D, and a join dependency D = ∗(AB, BC, CD). In our notation: D = R(x1, y, z1, u1) ∧ R(x2, y, z2, u2) ⇒ x1 = x2 D = R(x1, y1, z, u1) ∧ R(x2, y2, z, u2) ⇒ R(x1, y1, z, u2) D = R(x, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ⇒ R(x, y, z, u) We now will chase D with D and D : 1 Initialise: R(x, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ⇒ R(x, y, z, u) 2 Apply D : R(x, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ∧ x = x2 ⇒ R(x, y, z, u) Condense: R(x2, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ⇒ R(x2, y, z, u) 3 Apply D : R(x2, y, z1, u1) ∧ R(x2, y, z, u2) ∧ R(x3, y3, z, u) ∧ R(x2, y, z, u) ⇒ R(x2, y, z, u) Condense: nothing changes 4 The dependency has become a tautology, so we stop and conclude that D logically follows from S. 26 / 31
  • 27. Correctness Outline 1 Introduction 2 A Recap of First-order Logic for Database Theory 3 Dependencies 4 The Chase Algorithm 5 Correctness 6 Termination 27 / 31
  • 28. Correctness Correctness of the Chase Theorem If the Chase ends for S and ϕ ⇒ ψ, it returns true iff S implies ϕ ⇒ ψ. Proof Sketch. If: It can be shown that after every iteration the Chase computes a dependency that is equivalent to the previous dependency on instances that satisfy the dependencies in S, i.e., it is satisfied by such an instances iff the previous dependency is. Therefore, if the result is a tautology, i.e., satisfied by all instances, then the input dependency ϕ ⇒ ψ holds for all instances that satisfy the dependencies in S. Only-if: Assume that the final ϕ ⇒ ψ is not a tautology. Then ϕ is satisfiable, and therefore contains no equations. It follows that a corresponding instance of ϕ (1) satisfies all dependencies in S (or the chase would not have terminated) but (2) does not satisfy ϕ ⇒ ψ (otherwise ϕ would satisfy ϕ ⇒ ψ, and so the embedding of ϕ into itself can be extended to an embedding of ψ into ϕ that maps all variable in ϕ to themselves, and so there would be such an embedding of ψ into ϕ, but that would make ϕ ⇒ ψ a tautology). Since the final ϕ ⇒ ψ is equivalent to the input ϕ ⇒ ψ on instances that satisfy all dependencies in S, it follows that this instance does not satisfy the input ϕ ⇒ ψ. 28 / 31
  • 29. Termination Outline 1 Introduction 2 A Recap of First-order Logic for Database Theory 3 Dependencies 4 The Chase Algorithm 5 Correctness 6 Termination 29 / 31
  • 30. Termination When does the Chase terminate? In general, the Chase does not always terminate Example (Non-termination of the Chase) If we use S = {R(x, y) ⇒ R(x, z) ∧ R(z, y)} to chase R(x, y) ⇒ x = y, the chase will not terminate. There are, however, interesting sufficient conditions for termination. We call a dependency ϕ ⇒ ψ full if all variables in ψ appear in ϕ. Proposition If S is a set of full dependencies then the Chase with S terminates on any dependency. This covers all classical dependencies from normalisation theory such as functional dependencies, multivalued dependencies and join dependencies, but not inclusion dependencies. 30 / 31
  • 31. Termination Acyclic Sets of Dependencies Another way of guaranteeing terminating is to consider how they can trigger the creation of new variables during the chase. Given a set S of dependencies we define the variable creation graph of S as the graph (V , E) where V contains all the predicate names and E contains an edge (P, Q) iff there is in S a non-full dependency ϕ ⇒ ψ where ϕ mentions P and ψ mentions Q. Proposition If the variable creation graph of S is acyclic then the Chase with S terminates on any dependency. This covers data integration approaches where the relationships between the original datasets and the integrated datasets are specified by non-full dependencies that go only in one direction. 31 / 31