The question asks for employees who work on *every* project associated with the 'Research' department. This is a classic relational division problem (A ÷ B), where A is `WorksOn(EmpID, ProjID)` and B is `P_RES(ProjID)`.
Relational division (A ÷ B) can be expressed using fundamental relational algebra operators (projection, cross product, and set difference) as: `π_{attributes_of_A_not_in_B}(A) - π_{attributes_of_A_not_in_B}( (π_{attributes_of_A_not_in_B}(A) × B) - A )`
In this case:
- `A = WorksOn(EmpID, ProjID)`
- `B = P_RES(ProjID)`
- Attributes of A not in B = `EmpID`
Substituting these into the formula, we get:
`π_EmpID(WorksOn) - π_EmpID( (π_EmpID(WorksOn) × P_RES) - WorksOn )`
Let's analyze the components of this expression:
- `π_EmpID(WorksOn)`: This gives the set of all unique `EmpID`s of employees who work on at least one project. Let's call this `AllEmpIDs`.
- `(π_EmpID(WorksOn) × P_RES)`: This is the Cartesian product of `AllEmpIDs` and `P_RES`. It generates all possible `(EmpID, ProjID)` pairs where `EmpID` is from `AllEmpIDs` and `ProjID` is from `P_RES`. This represents all *expected* `WorksOn` tuples if every employee worked on every 'Research' project. Let's call this `ExpectedWorksOn`.
- `ExpectedWorksOn - WorksOn`: This set difference finds all `(EmpID, ProjID)` pairs that are in `ExpectedWorksOn` but *not* in `WorksOn`. In other words, these are the `(EmpID, ProjID)` pairs where an employee *should* work on a 'Research' project (according to `ExpectedWorksOn`) but *doesn't* (according to `WorksOn`). This effectively identifies the 'missing' projects for each employee relative to the 'Research' projects.
- `π_EmpID(ExpectedWorksOn - WorksOn)`: This projects the `EmpID`s from the previous result. This gives the set of `EmpID`s of employees who failed to work on *at least one* project from `P_RES`. Let's call this `EmpIDsWhoMissed`.
- `AllEmpIDs - EmpIDsWhoMissed`: Finally, we subtract the `EmpIDsWhoMissed` from `AllEmpIDs`. The remaining `EmpID`s are those who did *not* miss any 'Research' project, meaning they worked on *every* project in `P_RES`.
Therefore, Option A is the correct expression.
Let's analyze other options:
- Option B: `π_EmpID(WorksOn ⋈ P_RES)`
This expression finds the `EmpID` of employees who work on *at least one* project in `P_RES`. This is not the same as working on *every* project. - Option C: `π_EmpID(WorksOn) - π_EmpID(WorksOn ⋈ (π_ProjID(Project) - P_RES))`
- `π_ProjID(Project) - P_RES`: This gives the set of all `ProjID`s that are *not* associated with the 'Research' department (non-research projects). Let's call this `NonResearchProjects`.
- `WorksOn ⋈ NonResearchProjects`: This gives `(EmpID, ProjID)` pairs where the employee works on a `NonResearchProject`.
- `π_EmpID(WorksOn ⋈ NonResearchProjects)`: This gives `EmpID`s of employees who work on *at least one* non-research project. Let's call this `EmpIDsWithNonResearchWork`.
- `π_EmpID(WorksOn) - EmpIDsWithNonResearchWork`: This expression yields `EmpID`s who work *only* on research projects (if they work at all). An employee who works on all research projects AND some non-research projects would be excluded by this option, which is incorrect according to the question's requirement.
- Option D: `π_EmpID(WorksOn ⋈ P_RES) - π_EmpID(WorksOn ⋈ (π_ProjID(Project) - P_RES))`
- `π_EmpID(WorksOn ⋈ P_RES)`: EmpIDs who work on *at least one* research project.
- `π_EmpID(WorksOn ⋈ (π_ProjID(Project) - P_RES))`: EmpIDs who work on *at least one* non-research project.
- The entire expression then finds `EmpID`s who work on *at least one* research project AND *do not* work on any non-research project. Similar to Option C, this is too restrictive and excludes employees who satisfy the condition but also work on other non-research projects.
The final answer is $oxed{A}$