686 views

1- 2

2- 12 ??

@Joshi, can we do thetha join like this?YOu told https://gateoverflow.in/137637/dbms-relational-algebra?show=138067#c138067 that there must be no common attribute for thetha join?

A relation is a set, so how can we have duplicates in relation R?

Actually, Both question 1 and 2 are same thing!

1. it's a Theeta join which will be considered as:
Where R.A =< T.B((RUS)  X T)  and following will be output:

there will be 12 records.

2.
(RUS) Cross Product (T), Suppose RUS is renamed as R
there will be 12 records as follows:

Now apply condition as R.A =<T.B, In all the cases R.A is less than or equal to T.B.
But this second is technically wrong, Because there two relations involved in it, one is RUS and other is T, i don't think that
R.A =< T.B is correct because there is no relation as R in this query, until RUS is renamed as R.

PS:Cross Product and Natural Join both are Binary operators.

edited

+rahul sharma

You're right. it's not natural join but it's theeta join(extention of Natural Join). thanks for raising this doubt! yes answer will be same in both cases. I am updating my answer.
by the way, what is the given answer?

Dont know.I just got this question from somewhere:)
yes, answer will be same in both cases...12 it is.