recategorized by
46 views
1 votes
1 votes

Given the Sailors table
$${\textbf{Sailors}}$$

$${\begin{array}{|c|c|c|c|}
\hline
\textbf{Sid} & \textbf{Sname} & \textbf{Rating} & \textbf{Age}
\\\hline
1 & \text{Peter} & 10 & 23
\\\hline
2 & \text{Alex} & 9 & 24
\\\hline
3 & \text{Alex} & 9 & 25
\\\hline
4 & \text{Michael} & 9 & 24
\\\hline
\end{array}}$$
What does the $\Pi_{\text{Age}}\left[\sigma_{\text{Rating = 9}}[\text{Sailors}]\right]$ give?

  1. $\begin{array}{|c|c|}
    \hline
    \textbf{Age}
    \\\hline
    24
    \\\hline
    25
    \\\hline
    24
    \\\hline
    \end{array}$
  2. $\begin{array}{|c|c|}
    \hline
    \textbf{Age}
    \\\hline
    23
    \\\hline
    24
    \\\hline
    25
    \\\hline
    \end{array}$
  3. $\begin{array}{|c|c|}
    \hline
    \textbf{Age}
    \\\hline
    23
    \\\hline
    24
    \\\hline
    \end{array}$
  4. $\begin{array}{|c|c|}
    \hline
    \textbf{Age}
    \\\hline
    24
    \\\hline
    25
    \\\hline
    \end{array}$
recategorized by

1 Answer

1 votes
1 votes
The correct answer is D. Projection operation removes duplicates unlike select in SQL.
Answer:

Related questions

1 votes
1 votes
1 answer
1
gatecse asked Oct 15, 2020
63 views
Given that the relations $R(A,B)$ and $S(C,D)$.$$\overset{R}{\begin{array}{|c|c|c|c|}\hline\textbf{A} & \textbf{B}\\\hline1 & a\\\hline2 & c\\\hline\end{array}}\qquad \ov...
2 votes
2 votes
1 answer
2
gatecse asked Oct 15, 2020
107 views
Consider the following SQL query:SELECT * FROM Staff s, Branch b WHERE s.branchNo = b.branchNo AND (s.position = 'Manager' AND b.city = 'Bangalore');Which of the followin...