


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Author: Eduard Seibel
Covered Topics
Examples: Relation: r Relation: s A B α 1 β 2
α 10 a β 10 a β 20 b γ 10 B
α 1 α 10 a β 2 β 10 a
α 1 β 20 b
A B C D E α 1 α 10 a β 2 β 10 a β 2 β 20 b
Example: Relation: r Relation: s A B C D α 1 α a β 2 γ a γ 4 β b α 1 γ a δ 2 β b
2. Complete Set of R. A. Operations
The set of operations including π (Projection), σ (Selection), – (Difference), ρ (Rename),
(Union) and x (Cartesian Product) is called a complete set, because any other R. A. expression can be expressed by combination of these five operations. (Slide 6 ‐44)
Example: Do we need Intersection? No, we can derive it from these five operations.
r s = ( r s ) ‐ ( r ‐ s ) ‐ ( s ‐ r )
3. DIVISION Operation
The devision operation is applied tot wo relations. R(Z) : S(X), where X is a subset of Z. Let Y
= Z ‐ Y (and hence Z = X Y); that is, let Y be the set of attributes of R that are not attributes of S.
The Result result of DIVISION is a relation T(Y) that includes a tuple t if tuples t R appear in R
with t R [Y] = t, and with t R [X] = t S for every tuple t s in S. (slide 6 ‐45)
1 a α 3 a β 1 a γ 2 b δ 3 b ξ
α 1 α a α α 1 β a γ α 1 γ a α α 1 γ a γ δ 2 β b δ
Theta JOIN
EQUI JOIN NATURAL JOIN
It is also possible to group the tuples by certain attributes first and then apply aggregate
operations.
Examples: we use the same realtion r (see above)
5. Query examples
Query 1: Find all the names and addresses oft all the employees who work for the
‚Research‘ department.
Query 2: Find all the names oft all employees who have no dependents.
α α 7 α β 7 β β 3 β β 10
α 14 β 13
α α 7 α β 7 β β 13