in Databases
164 views
0 votes
0 votes

Source Made Easy Test Serires

Can anyone please tell me the answer for this, with explaination. According to me it will give the customer who buy from atleast one store, but the answer given is customer who buy from all stores.

in Databases
by
164 views

2 Answers

0 votes
0 votes

@print

You forget to add projection operator after (C*S)-B table .

That means ∏Cname (C*S-B ) = B,C ….

now C - ∏Cname (C*S-B ) = A , as C= (A,B,C )  ….

 

A means customer who buy from all shops. As

A   S1

A   S2

 

so A is related to shop 1 and shop 2 both ....

And shop table has only 2 entries s1 and s2 ....

Hence customer who buy from all shops ...

 

 

1. https://gateoverflow.in/19246/Tifr2010-b-33 

 

2. https://gateoverflow.in/25872/Tifr2013-b-19

 

 

by
0 votes
0 votes

For these kind of questions it is better to take examples to avoid confusion 

1 comment

Right, solving by illustration is always a better choice.
0
0

Related questions