Welcome back. So, now we're going to talk

about Query Language which is Relational Algebra.

So, Relational Algebra again is a procedural or an operational language,

where you have to specify a sequence of operation

to instruct the system how to retrieve the data needed from the database.

So, we have several operators that in Relational Algebra, and each operator

does a different operation. So, for example, we have the Union operation.

Union basically takes two relations, two tables, r and s,

and find the set union between these two relations.

The difference takes r and s. If you say r minus s, it finds the set difference r minus s.

The cartesian product it basically merges or puts all the rows in r and s together.

It does the cartesian product of both of them. And the selection is this operation,

it's basically select few rows in

the relation based on the specific predicates, the predicate B.

So the symbol for select is Sigma and then the relation,

this is the relation we're selecting from and then this P is a predicate.

Predicate is basically a condition that the selection needs to satisfy,

each row need to satisfy to be returned as an answer.

Projection, on the other hand,

it's applies to a relation r and it projects a set of a set of attributes,

sorry, in the relation.

So, if you have 10 attributes you specify in this A set,

the attributes that you want to be returned and

projection will filter out all the other attributes

that will only return the attributes in this A set and the symbol for this,

symbol of the projection is Pi.

Let's take a look at an example of database,

schema for database that we're going to be using,

to show examples of these different operations.

So, again we have,

this is the student the Cse majors students So you have student id,

you have the name and you have the class that the students take, or took.

And then you have another table has a seat like the professors.

So you have Professor one and then the office.

The office of this professor office one, professor two in office two.

You have also the other majors,

so other student from other majors like electrical measure.

So, you have also student ID, name,

and then the class they've taken.

And you have the course itself,

the course catalog table.

So, you have the course ID and then the title of the course.

This is also another table that we have.

So, we are going to be using this example to show

how different operations in Relation Algebra work. Thank you.