445 views
0 votes
0 votes
When we do natural join say between R1(A,B,C) and R2(A,B,D) we get new Relation as --->  R(A,B,C,D)

Say if we do Theta join using a Predicate P then the result will be ---->  R(A,B,C,A,B,D)  Am i right?

2 Answers

1 votes
1 votes
Yes you are right when we take natural join ,then there will a condition of equality as your case R1(A,B,C)$\Join$R2(A,B,D)=R(ABCD) you can write like this only when AB of R1 =AB of R2 (keep in mind relation should be lossless and depencies should be preserve)

And second case you right because condition over can be anything so you have to keep all entities of both relation.
1 votes
1 votes

YOU ARE RIGHT

  • In natural join common column are ellimenated .

R1(ABC) join R2(ABD)= R12(ABCD)

  • In conditional join (theta) R1 have m column and R2 have n column .then total number of column is m+n.

R1(ABC) theta join R2(ABD)= R12(ABCABD)

Related questions

1 votes
1 votes
1 answer
3
raginibhayana asked Feb 15, 2022
770 views
why don't we use the projection operator in conditional join?
0 votes
0 votes
0 answers
4
aditi19 asked May 8, 2019
805 views
how to write the query for natural join on three relations in SQL using the NATURAL JOIN clause?