City Guilds Model Questions Vol1 2020 Information Technology Question 34

Practice objective / multiple choice question 34 from the 2020 City Guilds Model Questions Vol1 Information Technology examination.

City Guilds Model Questions Vol1 2020 Information Technology Objective / Multiple Choice Medium Difficulty
Question 34 CITY_GUILDS_MODEL_QUESTIONS_VOL1 • 2020 • INFORMATION_TECHNOLOGY • objective

Given two relations: \(Employees(EmpID, DeptID, Salary)\) and \(Departments(DeptID, ManagerID)\). Write a relational algebra expression that returns the \(EmpID\) of each employee whose salary is greater than the average salary of their department.

Answer Options

A. π_{EmpID}( σ_{Salary > AvgSal}( Employees ⨝_{Employees.DeptID = Departments.DeptID} γ_{DeptID; AVG(Salary)→AvgSal}(Employees) ) )
B. π_{EmpID}( σ_{Salary > AvgSal}( Employees ⨝_{Employees.DeptID = AvgSal.DeptID} γ_{DeptID; SUM(Salary)→AvgSal}(Employees) ) )
C. π_{EmpID, DeptID}( σ_{Salary > AvgSal}( Employees ⨝_{Employees.DeptID = AvgSal.DeptID} γ_{DeptID; AVG(Salary)→AvgSal}(Employees) ) )
Correct Answer D. π_{EmpID}( σ_{Salary > AvgSal}( Employees ⨝_{Employees.DeptID = AvgSal.DeptID} γ_{DeptID; AVG(Salary)→AvgSal}(Employees) ) )
Correct Answer
D
Correct Option:
π_{EmpID}( σ_{Salary > AvgSal}( Employees ⨝_{Employees.DeptID = AvgSal.DeptID} γ_{DeptID; AVG(Salary)→AvgSal}(Employees) ) )

About This Question

This is City Guilds Model Questions Vol1 2020 Information Technology Question 34. It is one of the objective questions from the 2020 City Guilds Model Questions Vol1 Information Technology examination.

Difficulty level: Medium .

Master the Exam!

You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.

Unlock Full Access Available for Android & Windows
Chat with Support