- Year not given
RA: employees on Network over 15 hours
Short answer
Select the Network project, join with work, keep hours greater than 15, join with emp, then project name. Expression: π name ( emp ⋈ σ hours > 15 ( work ⋈ σ title = "Network" (project) ) ).
Consider the relational schema: emp (eid, name, add, sup_eid) dep (dep_id, name) project (pid, title, dep_id) work (eid, pid, hours) Find name of all employees who work on "Network" project for more than 15 hours. (Write a relational algebra expression.)
Relational algebra symbols used: σ select, π project, ⋈ natural join, ∪ union, ∩ intersection, − difference, ρ rename, 𝒢 aggregate.
Relational algebra expression
π name ( emp ⋈ σ hours > 15 ( work ⋈ σ title = "Network" (project) ) )
Explanation
- σ title = "Network" (project) selects the Network project.
- Joining with work on pid gives all work tuples of that project.
- σ hours > 15 keeps only the tuples where the employee worked more than 15 hours.
- Joining with emp on eid brings in the employee, and π name prints the names.
The expression is correct because emp and work share only eid, and work and project share only pid, so each natural join matches on the intended attribute.
Equivalent SQL (tested)
SELECT DISTINCT e.name
FROM emp e JOIN work w ON e.eid = w.eid
JOIN project p ON p.pid = w.pid
WHERE p.title = 'Network' AND w.hours > 15;
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- RA: computer dept employees and supervisors · Database Management System, chapter 3
- RA: delete Electrical dept projects · Database Management System, chapter 3
- RA: projects count per department · Database Management System, chapter 3
- RA: employees on project DBMS · Database Management System, chapter 3
- RA: employees on no project · Database Management System, chapter 3
- RA: employees in both DBMS and MIS · Database Management System, chapter 3
- T/F: radial more reliable than network · Transmission and Distribution System Design, chapter 5 · asked 2×