GATE CS 2021 Set 1 | Question 37

Databases › Relational Algebra & TRC · MCQ · 2 marks · Answer: C

  1. Question 37Databasesmcq2 marks
    The following relation records the age of 500 employees of a company, where empNo (indicating the employee number) is the key:
    Consider the following relational algebra expression:
    What does the above expression generate?
    • A.
      Employee numbers of only those employees whose age is the maximum.
    • B.
      Employee numbers of only those employees whose age is more than the age of exactly one other employee.
    • C.
      Employee numbers of all employees whose age is not the minimum.
      ✓
    • D.
      Employee numbers of all employees whose age is the minimum.

    Answer: C

    Solution

    The join pairs an employee with any other employee of smaller age. An employee appears in the result iff there exists someone younger, i.e. the employee's age is not the minimum.

More GATE PYQ on Relational Algebra & TRC

All GATE CS Databases PYQ →

Attempt GATE CS 2021 Set 1 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →