Computer-Organization
December 1, 2023
Question 14141 – NIC-NIELIT STA 2020
December 1, 2023
Computer-Organization
December 1, 2023
Question 14141 – NIC-NIELIT STA 2020
December 1, 2023

Database-Management-System

Question 251
Let R and S be two relations with the following schema
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?
A
Only (I) and (II)
B
Only (I) and (III)
C
Only (I), (II) and (III)
D
Only (I), (III) and (IV)
Question 251 Explanation: 
Natural join is based on the common columns of the two tables.

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.

Correct Answer: D
Question 251 Explanation: 
Natural join is based on the common columns of the two tables.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *