Given the relations employee (name, salary, dept-no), and department (dept-no,…
2016
Given the relations
employee (name, salary, dept-no), and department (dept-no, dept-name,address).
Which of the following queries cannot be expressed using the basic relational algebra operations (σ, π, x, -, ∪, p)
- A.
Department address of every employee
- B.
Employees whose name is the same as their department name
- C.
The sum of all employees' salaries
- D.
All employees of a given department
Attempted by 265 students.
Show answer & explanation
Correct answer: C
Basic relational algebra includes selection (σ), projection (π), Cartesian product (×), set difference (-), and union (∪). It does not support aggregate functions like SUM. Therefore, a query calculating the sum of salaries cannot be expressed using only basic operations. Queries involving joins, selections, or projections are expressible.