Rel algebra set theory girija

25
Relational Algebra Operations Set theory Unary relational operation Binary relational operation

description

set theory, relational algebra, union, intersection, difference, sql, database, www.youtube.com- dr.girija narasimhan this powerpoint video is available.

Transcript of Rel algebra set theory girija

Page 1: Rel algebra set theory girija

Relational Algebra Operations

Set theory Unary relational operation

Binary relational operation

Page 2: Rel algebra set theory girija

Symbolic Notation use symbolic notation to represent the operators.

SELECT ->σ (sigma)

PROJECT -> π(pi)

PRODUCT -> ×(times)

JOIN -> |×| (bow-tie)

UNION -> ∪ (cup)

INTERSECTION -> ∩(cap)

DIFFERENCE -> - (minus)

RENAME ->ρ (rho)

(AND) -> ^

(OR) -> v

Not ->

Page 3: Rel algebra set theory girija
Page 4: Rel algebra set theory girija
Page 5: Rel algebra set theory girija
Page 6: Rel algebra set theory girija

S2-S1

Page 7: Rel algebra set theory girija
Page 8: Rel algebra set theory girija

R ∪ S R ∩ S R – S S - R

EXERCISE 1

Page 9: Rel algebra set theory girija

EXERCISE 1 -RESULT

Page 10: Rel algebra set theory girija

EXERCISE 1 -RESULT

Page 11: Rel algebra set theory girija

EXERCISE 1 -RESULT

Page 12: Rel algebra set theory girija

EXERCISE 1 -RESULT

Page 13: Rel algebra set theory girija

Exercise 2

R ∪ S

Page 14: Rel algebra set theory girija

Exercise 2 - PRODUCT

Page 15: Rel algebra set theory girija

Exercise 3

Page 16: Rel algebra set theory girija

Exercise 3 - SOLUTION

Page 17: Rel algebra set theory girija

Exercise 4

Graduates – managers

Managers - graduates

Graduates U managers

Graduates ∩ managers

Page 18: Rel algebra set theory girija

Exercise 4 - Solution

Page 19: Rel algebra set theory girija

Exercise 4 - Solution

Page 20: Rel algebra set theory girija

Exercise 4 - Solution

Page 21: Rel algebra set theory girija

Exercise 5

Page 22: Rel algebra set theory girija

Exercise 5 solution

Page 23: Rel algebra set theory girija

Exercise 6

Page 24: Rel algebra set theory girija

Exercise 7

Page 25: Rel algebra set theory girija

Exercise 7 - solution