in Databases edited by
1,010 views
3 votes
3 votes

Please explain me the division operation.

Considering the two relations as below,

 $R$

A B C
a1 b1 c1
a2 b1 c2
a1 b2 c2
a2 b2 c2
a1 b3 c3

$S$

A
a1
a2

What will be the result of $R\div S$

in Databases edited by
1.0k views

2 Comments

In table R find those value of B and C which contain both a1 and a2.

i.e. b1 and b2
1
1

R/S : retrieve records from R , for which there exists a data which matches every record of S.

example : ΠSid Cid(R)/ ΠCid(S) : Now let suppose there are 3 entries in Cid C1,C2,C3

so output of our RA query is those Sid, that contains every Cid (C1,C2,C3).

0
0

2 Answers

1 vote
1 vote

We define the division operation A/B as the set of all x values  such that for every y value in (a tuple of) B, there is a tuple
<x,y> in A. 

So the relation R/S will contain only <b2,c2>

1 comment

can you please specifically tell me what exactly the output will be a tuple or a column and arrangement of output in tuple and column
0
0
0 votes
0 votes

plz, refer it. R/S search all the tuples in table R for the table S which contain a1,a2.

Related questions

2 votes
2 votes
1 answer
2