Computer-Organization
December 1, 2023Question 14141 – NIC-NIELIT STA 2020
December 1, 2023Database-Management-System
|
Question 251
|
R (P, Q, R1, R2, R3)
S (P, Q, S1, S2)
Where (P, Q) is the key for both schemas. Which of the following queries are equivalent?

|
Only (I) and (II)
|
|
|
Only (I) and (III)
|
|
|
Only (I), (II) and (III)
|
|
|
Only (I), (III) and (IV)
|
We have two common columns in ‘R’ and ‘S’ which are ‘P’ and ‘Q’.
(I) Both P and Q are used while doing the join, i.e., both P and Q are used to filter.
(II) Q is not used here for filtering. Natural join is done on all P’s from R and all P’s from S. So different from option (I).
(III) Through venn diagram it can be proved that A∩B = A – (A-B).
So through the above formula we can say that (III) and (IV) are equivalent.
So, finally (I), (III) and (IV) are equivalent.
We have two common columns in ‘R’ and ‘S’ which are ‘P’ and ‘Q’.
(I) Both P and Q are used while doing the join, i.e., both P and Q are used to filter.
(II) Q is not used here for filtering. Natural join is done on all P’s from R and all P’s from S. So different from option (I).
(III) Through venn diagram it can be proved that A∩B = A – (A-B).
So through the above formula we can say that (III) and (IV) are equivalent.
So, finally (I), (III) and (IV) are equivalent.
