645 views

1 Answer

Best answer
2 2 votes

Let

X
P Q R S T
1 2 3 4 5
2 3 4 5 6
Y
P Q U V
1 2 3 4
2 4 5 6
3 4 5 6
X ⋈ Y
P Q R S T U V
1 2 3 4 5 3 4

So,

(i) will give {1}

(ii) will give {1, 2}

(iii) P{{<1, 2>, <2, 3> } - { {<1, 2>, <2, 3> } - {<1, 2>, <2, 4>, <3, 4> }}}

= P{1,2} = {1}

(iv) {1, 2} - {1, 2, 3} = {}

So, (i) and (iii) are the only possibility to be same. They are actually same because both are selecting tuples from the relation with same values for (P, Q) and then projecting the value for P.

(Note: Projection avoids duplicates unlike select in SQL) 

• selected by
Position:
Show:

Related questions

0 0 votes
1 1 answer
612
612 views
pcla asked Jan 27, 2024
612 views
1 1 vote
2 2 answers
477
477 views
thor asked Jan 22, 2017
477 views
2 2 votes
1 answers 1 answer
1.3k
1.3k views
0 0 votes
1 1 answer
229
229 views
Vardhan_Kadali asked Jan 14
229 views
Sita can complete a work in 20 days and Gita can complete the same work in 25 days. They start the work together. After a few days, Sita leaves the work, and Gita alone f...