3 votes 3 votes $\sigma_{A=B \text{ and } B=C \text{ and } C=A} \bigg( \Pi_A (R) \times \Pi_B (R) \times \Pi_C (R) \bigg)$ The number of rows returned by the above relational algebraic expression is ________. Databases tbb-dbms-2 numerical-answers databases relational-algebra + – Bikram asked Aug 26, 2017 retagged Sep 17, 2020 by ajaysoni1924 Bikram 412 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 7 votes 7 votes As projection in RA operator eliminates duplicates automatically so only one tuple will be displayed which is 1 . Bikram answered Aug 26, 2017 selected Dec 15, 2017 by Rishabh Gupta 2 Bikram comment Share Follow See all 3 Comments See all 3 3 Comments reply Kiran Karwa commented Oct 1, 2017 reply Follow Share @ Bikram Sir Had this been SQL query it would have returned 12 rows? 2 votes 2 votes Rishabh Gupta 2 commented Dec 15, 2017 reply Follow Share @Kiran Yes I think so. 0 votes 0 votes palashbehra5 commented Jan 23, 2022 reply Follow Share @Kiran Karwa yep 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes ΠA(R) → {1,2} ΠB(R) → {1,2} ΠA(C) → {1} So, (ΠA(R)×ΠB(R)×ΠC(R)) → {1,2} * {1,2} * {1} → {(1,1,1),(1,2,1),(2,1,1),(2,2,1)} σA=B and B=C and C=A(ΠA(R)×ΠB(R)×ΠC(R)) → {(1,1,1)} Hence, 1 row will be returned. wander answered Dec 6, 2020 wander comment Share Follow See all 0 reply Please log in or register to add a comment.