GATE CS 2024 Set 2 | Question 45

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

  1. Question 45Databasesmcq2 marks
    Person(pid, city). Using selection, projection, cross product, rename, the minimum number of cross-product operations to find cities where at least 3 persons reside is
    • A.
      1
    • B.
      2
      ✓
    • C.
      3
    • D.
      4

    Answer: B

    Solution

    Answer: (B) 2 To require three distinct persons in the same city, we need three copies of Person joined on equal city with distinct pids. Combining three renamed copies needs 2 cross-product (join) operations: , then select equal cities and pairwise-distinct pids, then project the city.

More GATE PYQ on Relational Algebra & TRC

All GATE CS Databases PYQ →

Attempt GATE CS 2024 Set 2 in real GATE exam mode

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

Create free account →