Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Relational Algebra-JoinUnion

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

CS220: DATABASE SYSTEMS

BESE-12
LECTURE OUTLINE

 Relational Algebra Operators-Revisit


 Relational Algebra Join
 Relational Algebra Union
 Relational Algebra Operators Division
 Relational Algebra Query-Examples

2
CARTESIAN PRODUCT

3
RELATIONAL ALGEBRA JOINS
JOIN

5
NATURAL JOIN

6
NATURAL JOIN

7
PROPERTIES OF NATURAL JOIN

8
N-ARY JOIN OPERATION

9
THETA JOIN

10
THETA JOIN- EXAMPLE

11
EQUIJOIN

12
EQUIJOIN EXAMPLE

13
COMPARISON OF JOIN & CARTESIAN PRODUCT

14
OPERATOR SUMMARY

15
OUTER JOIN

16
OUTER JOIN

17
LEFT OUTER JOIN

18
LEFT OUTER JOIN

19
RIGHT OUTER JOIN

20
RIGHT OUTER JOIN

21
FULL OUTER JOIN

22
FULL OUTER JOIN

23
UNION

24
UNION- ISSUE

25
UNION SOLUTION

26
UNION –MULTIPLE ATTRIBUTES

27
DIVISON

28
DIVISION - EXAMPLE
Courses Taken

Necessary Courses

Query: Find all the students who can graduate. (i.e. who have
taken all the subjects required for one to graduate.)

29
DIVISION -EXAMPLE

1: Cartesian Product of student


and necessary

30
DIVISION -EXAMPLE
2:The students Who has not taken the required Course
(Student and Course)

3:The students 4:The students


Who cannot Who can
graduated: graduated:
31
DIVISION IN RA

32
DIVISION IN RA

33
DIVISION IN RA

34
INTEGRITY CONSTRAINTS
INTEGRITY CONSTRAINTS

36
INTEGRITY CONSTRAINTS

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
THANK YOU

You might also like