Log In
0 votes

Consider a relation R(A, B) that contains r tuples, and a relation S(B, C) that contains s tuples; assume r > 0 and s > 0. Make no assumptions about keys. For the following relational algebra expression, in terms of r and s the minimum and maximum number of tuples that could be in the result?

in Databases 229 views
$r$ max

$0$ min

1 Answer

0 votes
case 1: if in R(a,b) and S(b,c) we have the same values of b then the inner parenthesis evaluates to 0 and then r-0=r(no of tuples in relation r)

case 2: if in R(a,b) and S(b,c) we have no tuple common so the inner bracket gives us r no of tuples and r-r=0

So max=r and min=0

Related questions

1 vote
1 answer
Consider the following relation and instance of relation: Supply(sid,Sname) #sid is key Parts(pid,Pname,Pcolor) #pid is the key Catalog(sid,pid) #sid,pid is the key Number of tuples returned by the above Query is ……...
asked Dec 2, 2018 in Databases Na462 217 views
0 votes
1 answer
Suppliers(sid, sname, address) Parts(pid, pname, color) Catalog(sid, pid, cost) Find the pids of the most expensive parts supplied by suppliers named Yosemite Sham
asked May 8, 2019 in Databases aditi19 278 views
1 vote
3 answers
Given two relations R1 and R2, where R1 contains N1 tuples, R2 contains N2 tuples, and N2>N1> 0, give the minimum and maximum possible sizes (in tuples) for the result relation produced by each of the following relational algebra expressions. In each case, state any assumptions about ... difference) $R1 X R2$ (cartesian product) $σa=5(R1)$ (selection) $\pi a(R1)$ (projection) $R1/R2$ (division)
asked Apr 11, 2019 in Databases aditi19 2.2k views
0 votes
0 answers