Welcome back. Now we're going to talk about the join operator, and more specifically, the theta join. So join between two different relation in the database, R and S, is similar to the Cartesian products except that the Cartesian product you perform a selection on all the combined tuples of the Cartesian product, and the selection predicates is theta. That's the selection predicate. So what does it mean? Cartesian product just find all combinations of tuples in R and S and combine them together. Theta-join, it does not just find all combinations. Yes. If you think of it as if it applies a Cartesian product find all combinations, and for all the found combinations it applies a predicate or a condition on these tuples and filter out the combined tuples that do not satisfy this condition. An example query is if you have two tables, you have the cse professors, these are computer science professors, and you have another table that has all the courses that each professor is currently teaching. The join operator you want to apply you want to find all the courses that each professor is currently teaching, and you want to find the information of the professor and information of the course. This is a join between the cse_prof table and teachers, currently teacher is a table or relation. The schema of the output of the join is also similar to the schema of the output of the Cartesian product that combines both the schema of cse_prof and the schema of the teaches. This is teaches instead of cse_teaching, and this is cse_prof. If you want to have the join between both of them, again like we said in last slide, cse_profs, and then you do the join, and the theta condition here is you want the name, is in the cse_ prof table, is equal to the t name in the teaches table. What you do here is the same way you did in Cartesian product. You go through cse_prof, you say professor one. So in professor one all the combination would be you merge all of these together, but the condition needs to be name equal t name. You say, okay, name or professor one, it matches here, professor one. So this tuple is out. Then professor one matches this t name here also in the teaches. So this tuple is also part of the results, but professor one and professor two, they do not match. So this theta condition, in the theta-join, name equal to name does not satisfy. So this is why I'm not going to combine this tuple here with this tuple, the last tuple in the teaches. You do the same for professor two. So you go to professor two you'll figure out that it does not match professor one here, but the name here is equal to t name in the other relation. So this is also be the output. If you look at what we did we basically found the information of each professor from cse_profs table, and then we combined it with the current courses that this person is teaching now. So we have teacher, professor one teaches database management and rules of database systems. This is why it's combined with a tuple in cse_profs here. Professor two is only teaching object oriented databases. This is why it's combined. So Theta-join as an operator allowed us to do that, and this operation is really popular in database systems in general. Thank you.