Question

Consider two relations describing teams\textit{teams} and players\textit{players} in a sports league:

  • teams(tid,tname)\textit{teams}(\textit{tid}, \textit{tname}): tid,tname\textit{tid}, \textit{tname} are team-id and team-name, respectively
  • players(pid,pname,tid)\textit{players}(\textit{pid}, \textit{pname}, \textit{tid}): pid,pname,\textit{pid}, \textit{pname}, and tid\textit{tid} denote player-id, player-name and the team-id of the player, respectively

Which ONE of the following tuple relational calculus queries returns the name of the players who play for the team having tname\textit{tname} as ′MI′'MI'?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2025 answer key

Solution

Bind tuple variable pp to players, existentially quantify tt in teams, and join on p.tid=t.tidp.\textit{tid} = t.\textit{tid} with t.tname=′MI′t.\textit{tname} = 'MI'.

To retrieve p.pname, tuple variable pp must belong to the players relation (p∈playersp \in \textit{players}), and there must exist a tuple t∈teamst \in \textit{teams} that matches pp's team ID (p.tid=t.tidp.\textit{tid} = t.\textit{tid}) and has team name 'MI' (t.tname=′MI′t.\textit{tname} = 'MI'). Option (A) states this exact query; (B) and (D) bind pp to teams, while (C) omits the join condition p.tid=t.tidp.\textit{tid} = t.\textit{tid}.

Final answer

Option (A)

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
Question
39 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.