Relational Calculus Flashcards
First order logic is propositional logic with _________
quantifiers
A _____ variable is a variable not defined by a quantifier
free
________ queries are queries without free variables
boolean
______ defines whether a formula is true or false given a description of the database
semantics
What is Codd’s theorem?
Relational Algebra and Relational Calculus have essentially the same expressive power
For every _______ ______ E, there is an equivalent relational calculus expression
relational expression
When converting from RA to RC, the _________ v function maps each attribute A in the schema to a variable X_A
environment
If R is a base relation over A,B
ν={A |→ x_A, B |→ x_B, …}
then R is translated to …
R(x_A,x_B)
What are the three steps to convert renaming from RA to RC?
- Translate E to φ
- If there is no mapping for B in ν, add{B |→ x_B}
- Replace every occurrence of ν(A) in φ by ν(B)
From RA to RC, projection is translated as…
π_L (E) is translated to∃X φ, where X are attributes that are NOT projected
From RA to RC, Selection is translated as…
σθ(E) is translated to φ∧ν(θ), where ν(θ) is obtained from θ by replacing each attribute A by ν(A)
Convert σ_(A=B)(R) to RC
R(x_A,x_B)∧x_A=x_B
From RA to RC, Cartesian Product is translated as…
conjuction
From RA to RC, _____ is translated as disjunction
union
From RA to RC, difference is translated as…
A ^ -B