528 views
0 0 votes

what should be the answer?

1 Answer

Best answer
1 1 vote

If all rows are different then you get all options provided are correct.

Therefore assume there are duplicate values in P and Q

 

option A :-  P natural_join B(Q)

no.of rows in the result  =  |P|

 

option B :-  A (P) natural_join Q

no.of rows in the result  =  |Q| 

 

option C :-  P natural_join Q

Here A and B both attributes are common therefore The property of natural join is applied on both columns at a time

P.A = Q.A and P.B = Q.B ===> if you have duplicates this results should be less than  Option A and Option B

 

option D :-  P ∩ Q

Here A and B both attributes are common therefore The property of intersection is applied on both columns at a time

P.A = Q.A and P.B = Q.B ===>  Option C and Option D are equal.


let P have additionally one more attribute C, and Q have additionally one more attribute D

then 

Option C :-  P.A = Q.A and P.B = Q.B

Option D :-  P.A = Q.A and P.B = Q.B and P.C = Q.D

in this case Option D is right but not Option C

selected by
Position:
Show:

Related questions

0 0 votes
0 0 answers
411
411 views
Anil Ji asked Aug 4, 2018
411 views
What should be the answer?
0 0 votes
0 0 answers
531
531 views
Anil Ji asked Jul 29, 2018
531 views
0 0 votes
1 1 answer
1.4k
1.4k views
Anil Ji asked Jul 29, 2018
1,371 views
0 0 votes
1 1 answer
750
750 views
Anil Ji asked Oct 13, 2018
750 views
Consider the following production, along with the syntax directed definition.\[\begin{array}{l}A \rightarrow Q R \text {, } \\\text { Q.in }=f(\text { A.s }) \| 1^{\text ...