GATE / CS ARCHIVE

GATE CSE 2000 / QUESTION 1.23

Aggregation outside basic relational algebra

Database Management Systems · Relational Algebra & Calculus · Full GATE CSE 2000 paper

GATE 2000, Q1.23 1 mark · MCQ
Report issue

Relational Algebra & Calculus

Question 1.23, GATE 2000: Given employee(name,salary,deptno) and department(deptno,deptname,address), which cannot be expressed with basic selection,projection,product,join,union,intersection,difference: department addresses, matching employee/department names, total salaries, or employees of a department?
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step 1: Joining on deptno and projecting yields each employee’s department address. Selection can compare name with deptname or filter a particular department.

Step 2: Summing salaries across arbitrarily many tuples requires aggregation and produces a new arithmetic value. The listed basic relational-algebra operators select/combine existing tuple values but contain no aggregate-sum operation.

Therefore total salaries, C, needs an extended algebra or SQL aggregation.

Original paper, page 3