Rel algebra set theory girija

Post on 14-Jun-2015

145 views 1 download

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

Relational Algebra Operations

Set theory Unary relational operation

Binary relational operation

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 ->

S2-S1

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

EXERCISE 1

EXERCISE 1 -RESULT

EXERCISE 1 -RESULT

EXERCISE 1 -RESULT

EXERCISE 1 -RESULT

Exercise 2

R ∪ S

Exercise 2 - PRODUCT

Exercise 3

Exercise 3 - SOLUTION

Exercise 4

Graduates – managers

Managers - graduates

Graduates U managers

Graduates ∩ managers

Exercise 4 - Solution

Exercise 4 - Solution

Exercise 4 - Solution

Exercise 5

Exercise 5 solution

Exercise 6

Exercise 7

Exercise 7 - solution