Parcial 2 Flashcards
Fundamental, Additional, Union Compatibility
Relational Algebra Operators
Selection, Projection, Union, Set, Cartessian
Fundamental
Intersection, 0-join, Natural join, semijoin, division
Additional
Same degree, corresponding attributes
Union compatibility
Produces a horizontal subset of the operand relation
Selection
Produces vertical slice if a relation
Projection
Result contains tuples that are in R or in S, but not both (duplicates removed)
R, S should be union-compatible
Union
Result contains all tuples that are in R, but not in S
Set Difference
The result of R × S is a relation of degree (k1+ k2) and consists
of all (n1* n2)-tuples where each tuple is a concatenation of one
tuple of R with one tuple of S.
Cartesian
Typical set intersection, R, S union-compatible
Intersection
There are various forms of join. The
primary classification is between inner join and outer join.
0-Join
defined over the set of attributes A, by relation
S, defined over the set of attributes B, is the subset of tuples of R that
participate in the join of R with S.
Semijoin
T = R ÷ S gives T of degree k1-k2 [i.e., T(Y) where Y = A-B] such that for a
tuple t to appear in T, the values in t must appear in R in combination with every
tuple in S
Division
*Specify the properties that the result should hold
*Tuple relational calculus
*Domain relational calculus
Relational Calculus
Query of the form {t|F{t}} where
t is a tuple variable
F is a well-formed formula
Tuple Relational Calculus