Multiple choice

Which of the following queries finds the clients of banker Agassi and the city they live in?

  1. $\pi_{client, customer\ name, customer\ city} (\sigma_{Banker name} = “Agassi” (client × customers))$
  2. $\pi_{client, customer\ name, customer\ city} (\sigma_{Banker name} = “Agassi” (client × customers)$
  3. $\pi_{client, customer\ name, customer\ city} \\\\ (\sigma_{Banker name} = “Agassi” (\sigma_{client} × customer name) = \\\\ customer, customer\ name (client × customers)$
  4. $\pi_{customer\ name, customer\ city }(\sigma_{Banker name} = “Agassi” (client × customers)$
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The SQL statement is select client customer name, client customer city from client customer where (client customer name = customer. Customer name and banker name = “Agassi” $\therefore$Relational algebra query is$\pi_{client, customer\ name, customer\ city} (\sigma_{Client, customer\ name})= customer. customer name \\ (\sigma_{Banker name} = “Agassi” (client × customers)$