National University of Modern Languages - NUML: (Department of Computer Science)
National University of Modern Languages - NUML: (Department of Computer Science)
National University of Modern Languages - NUML: (Department of Computer Science)
Languages - NUML
(Department of Computer Science)
Mr. Muhammad Noman Farooq
BSC-H (Computer Science)
MS (Telecomm. and Networks)
DWH & BI – Certified
Honors:
Gold Medalist!
Magna Cumm Laude
7 + years of Experience in Lectureship & Professional Trainings
Teradata + MySQL (Advanced) + Power BI + Tableau
Official E-Mail: [email protected]
Personal Email: [email protected]
Introduction to Database Systems
Relational Algebra
Lecture# 10
Lecture 10: Relational Algebra
Relational Algebra
3
Relational Algebra
4
Relational Algebra
It is a language in which we can ask questions (query) to a database.
5
Continued…
In addition, there are also the Join, Intersection, and Division Operations,
which can be expressed in terms of the five basic operations. The function
of each operation is illustrated in Figure 4.1 on next slide.
The Selection and Projection operations are Unary Operations, since they
operate on one relation.
The other operations work on pairs of relations and are therefore called
Binary Operations.
6
Continued…
1.Unary Operations:
1) Selection Operation
2) Projection Operation
2.Set Operations:
1) Union Operation
2) Set Difference Operation
3) Intersection Operation
4) Cartesian Product Operation
7
Continued…
3. Join Operations:
4. Division Operations:
1) Division Operation
1. Aggregate Operation
2. Grouping Operation
8
9
1. Unary Operations:
10
2) Projection Operation: -
13
15
2. Set Operations:
1) Union Operation: -
16
18
2) Set Difference Operation: -
19
21
3) Intersection Operation: -
22
23
24
25
26
4) Cartesian Product Operation: -
27
29
30
31
3. Join Operations:
1) Theta/Equi Join Operation: -
32
33
2) Natural Join Operation: -
34
35
36
3) Left Outer Join Operation: -
37
38
39
4) Semi Join Operation: -
40
41
42
4. Division Operations:
1) Division Operation: -
43
44
45
5. Aggregate & Grouping Operations:
1) Aggregate Operation: -
46
47
48
2) Grouping Operation: -
49
50
51
52
Recommended Readings
Chapter 4 from: -
53
Summary of Lecture
➦ Lecture 10
Relational Algebra
1.Unary Operations:
1) Selection Operation
2) Projection Operation
2.Set Operations:
1) Union Operation
2) Set Difference Operation
3) Intersection Operation
4) Cartesian Product Operation 54
Summary of Lecture
➦ Lecture 10
3.Join Operations:
4.Division Operations:
1) Division Operation
56