StreakPeaked· Practice

ExamsGATETechnical

The following relation records the age of 500 employees of a company, where empNo (indicating the employee number) is the key: empAge(empNo, age) Consider the following relational algebra expression: π_empNo, age (σ_age > age1 (ρ_empNo1, age1 (empAge))) What does it generate?

  1. employees whose age is the maximum.
  2. employees whose age is more than the age of some other employee.
  3. employees whose age is not the minimum.
  4. employees whose age is the minimum.

Correct answer: employees whose age is more than the age of some other employee.

Solution

The expression filters the employees based on their age being greater than a specified age (age1), which represents the age of at least one other employee, thus selecting those who are older than some employee in the dataset.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →