- Year not given
RA: employees on project DBMS
Short answer
Natural join employee, work, project; select where p_name = 'DBMS'; project name: π name (σ p_name='DBMS' (employee ⋈ work ⋈ project)).
Consider the relational schema: employee (e_no, name, address) project (p_no, p_name) work (e_no, p_no) part (part_no, part_name, qty, size) use (e_no, p_no, part_no, number) Print names of employees working on project named "DBMS". (Write a relational algebra expression.)
Relational algebra symbols used: σ select, π project, ⋈ natural join, ∪ union, ∩ intersection, − difference, ρ rename, 𝒢 aggregate.
Relational algebra expression
π name ( σ p_name = "DBMS" ( employee ⋈ work ⋈ project ) )
Explanation
- employee ⋈ work joins on the common attribute e_no, so each employee is paired with the projects he or she works on.
- The result ⋈ project joins on p_no and brings in the project name.
- σ p_name = "DBMS" keeps only the tuples of the DBMS project.
- π name outputs only the employee names (duplicates are removed automatically in relational algebra).
Equivalent SQL (checked on sample data)
SELECT DISTINCT e.name
FROM employee e JOIN work w ON e.e_no = w.e_no
JOIN project p ON p.p_no = w.p_no
WHERE p.p_name = 'DBMS';
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- RA: employees on no project · Database Management System, chapter 3
- RA: employee-projects with no part used · Database Management System, chapter 3
- RA: employees in both DBMS and MIS · Database Management System, chapter 3
- RA: parts used in DBMS and MIS · Database Management System, chapter 3
- RA: projects where all used bolts size 6 · Database Management System, chapter 3
- RA: computer dept employees and supervisors · Database Management System, chapter 3
- RA: employees on Network over 15 hours · Database Management System, chapter 3