retagged by
214 views
0 votes
0 votes
Given two relations R1 and R2 where R1 contains N1 tuples and R2 contains N2 tuples, give the minimum and maximum possible sizes (in tuples) for the relation produced by each of the following relational algebra expressions. Try to be as accurate as possible (i.e., formulate the smallest correct interval). For (8)–(10), assume that the schema of R1 is (A, B) and of R2 is (B, C).
(1) R1 ∪ R2
(2) R1 ∩ R2
(3) R1 − R2
(4) R1 × R2
(5) σa=5(R1)
(6) πa(R1)
(7) R1 ÷ R2,(8) πA,C(R1 ./ R2)
(9) πB(R1) − (πB(R1) − πB(R2))
(10) σA>B(R1) ∪ σA

pls check whether my solution is correct or not.

(1): max(N1, N2) ≤ |R1 ∪ R2| ≤ N1 + N2
(2): 0 ≤ |R1 ∩ R2| ≤ min(N1, N2)
(3): 0 ≤ |R1 - R2| ≤ N1
(4): N1 * N2 ≤ |R1 × R2| ≤ N1 * N2
(5): 0 ≤ |σa=5(R1)| ≤ N1
(6): 0 ≤ |πa(R1)| ≤ N1
(7): 0 ≤ |R1 ÷ R2| ≤ N1
(8): 0 ≤ |πA,C(R1 ⨝ R2)| ≤ N1
(9): 0 ≤ |πB(R1) - (πB(R1) - πB(R2))| ≤ N1
(10): 0 ≤ |σA>B(R1) ∪ σA<B(R1)| ≤ N1
retagged by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
iarnav asked Nov 27, 2017
1,008 views
let r1 be-Sidcid2c12c24c14c2let r2 be-sidcid1c12c23c24c1 then r1-r2 is?
1 votes
1 votes
2 answers
3
aditi19 asked May 8, 2019
1,263 views
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
0 votes
0 votes
1 answer
4
aditi19 asked May 7, 2019
943 views
Given relationcatalog(sid, pid, cost)Find pairs of sids such that the supplier with the first sid charges more for some part than the supplier with the second sidwhat is ...