in Databases retagged by
200 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
in Databases retagged by
200 views

Please log in or register to answer this question.

Related questions