22 22 votes Consider a relation examinee (regno, name, score), where regno is the primary key to score is a real number. Write a relational algebra using $( \Pi, \sigma, \rho, \times)$ to find the list of names which appear more than once in examinee. Databases gatecse-2001 databases normal descriptive relational-algebra + – Kathleen 7.9k views answer comment Share Follow Print See all 6 Comments 6 6 Comments reply Show 3 previous comments Prashant_Dubey commented Nov 7, 2024 i edited by Shaik Masthan Nov 7, 2024 reply Follow flag SELECT E.name FROM examinee as E GROUP BY E.name HAVING count(*)>1 5 5 replyShare Rana-G commented Dec 21, 2024 reply Follow flag SELECT E1.name FROM examinee E1, examinee E2 WHERE E1.regno <> E2.regno AND E1.name = E2.name 6 6 replyShare simi2426 commented Dec 14, 2025 i edited by simi2426 Dec 14, 2025 reply Follow flag This Question should be tagged under Relational Algebra Topic. its part-b Databases: GATE CSE 2001 | Question: 21-b is for SQL query. 1 1 replyShare Please log in or register to add a comment.
Best answer 30 30 votes $\pi_{\text{exm1.name}}(σ_{(\text{exm1.regno} \neq \text{examinee.regno}) \wedge (\text{emp1.name} = \text{emp2.name}) })(ρ _{\text{exm1}}(\text{examinee}) \times \text{examinee}) $ Tauhin Gangwar answered Mar 29, 2016 • edited Jun 28, 2018 by Arjun Tauhin Gangwar comment Share Follow See all 13 Comments 13 13 Comments reply Show 10 previous comments devika_p commented Dec 9, 2025 reply Follow flag Instead of emp1.name=emp2.name , the query should have exm1.name=examinee.name then the answer is correct. (Note: emp1 and emp2 can't be used because they are not defined in the rename section or any part of the query) 3 3 replyShare Avani_Satam commented May 22 reply Follow flag i think this should be the correct answer 4 4 replyShare AmbitiousHeart commented Aug 17 reply Follow flag right 1 1 replyShare Please log in or register to add a comment.
1 1 vote 1) $\Pi_{name}\left ( \sigma _{count(cnt)>1}\left ( _{name}g_{count(regno)\ as \ cnt}\left ( examinee \right ) \right ) \right )$ 2) $SELECT_{regno}FROM\;examinee\; HAVING\;(score>avg(score))$ $\Pi _{regno}\left ( \sigma _{score>avg(score)}\left ( examinee \right ) \right )$ 3) $SELECT_{centr\_code}FROM\;examinee\;join\;appears WHERE\;(score>80)$ $\Pi _{center\_code}\left ( \sigma _{score>80}\left ( examinee\Join appears \right ) \right )$ Sheshang answered Aug 17, 2016 • edited Apr 16, 2017 by Sheshang Sheshang comment Share Follow See all 5 Comments 5 5 Comments reply Show 2 previous comments Manu Thakur commented Oct 25, 2017 reply Follow flag Having can't be used without group by, this way in the second query. 5 5 replyShare HeadShot commented Dec 20, 2018 reply Follow flag @Sheshang I dont think so standard relational algebra allows aggregate functions. 0 0 replyShare HeadShot commented Dec 20, 2018 reply Follow flag 2. 6 6 replyShare Please log in or register to add a comment.
1 1 vote This is right answer. Vivid_Vivek answered 2 days ago Vivid_Vivek comment Share Follow 0 reply Please log in or register to add a comment.