Skip to content

UGC NET CS 2022Database Management Systems › SQLVerified

UGC NET CS 2022 PYQ: Read the following and Answer the Questions: Consider the relational schema of sailors $\text{S}$. Reserves…

Read the following and Answer the Questions:
Consider the relational schema of sailors $\text{S}$. Reserves $\mathrm{R}$ and Boots $\text{B}$.

Table 1: Sailors $\text{S}$
$$\begin{array}{|l|l|l|l} \hline Sid & Sname & Ratting & Age \\ \hline 22 & Dustin & 7 & 45.0 \\ 29 & Brutus & 1 & 33.0 \\ 31 & Lubber & 8 & 55.5 \\ 32 & Andy & 8 & 25.5 \\ 58 & Rusty & 10 & 35.0 \\ 64 & Horatio & 7 & 35.0 \\ 71 & Zorba & 10 & 16.0 \\ 74 & Horatio & 9 & 35.0 \\ 85 & Art & 3 & 25.5 \\ 95 & Bob & 3 & 63.5 \\ \hline \end{array}$$


Table 2: Reserves $\text{R}$

$$\begin{array}{|l|l|l|} \hline sid & Bid & day \\ \hline 22 & 101 & 10 / 1098 \\ 22 & 108 & 101098 \\ 22 & 108 & 101898 \\ 22 & 104 & 10 / 798 \\ 31 & 108 & 11 / 1098 \\ 31 & 103 & 11 / 699 \\ 31 & 104 & 11 / 298 \\ 64 & 101 & 9558 \\ 64 & 102 & 28858 \\ 74 & 103 & 98958 \\ \hline \end{array}$$


Table 3: Boats $\text{B}$

$$\begin{array}{|l|l|l|} \hline Bid & Bname & Color \\ \hline 101 & Interlake & blue \\ 102 & Interlake & red \\ 103 & Clipper & green \\ 104 & Marine & red \\ \hline \end{array}$$

Which of the following relational algebra query/queries computes/compute the name of sailors who have reserved boat 103?

$\text{Q1}$ $\pi$ sname (( $\delta$$_{ bid}$ = $_{103}$ Boats) $\bowtie$ Sailors)

$\text{Q2}$ $\pi$ sname = ( $\delta$$_{ bid}$ = $_{103}$(Reserves $\bowtie$ Sailors))

$\text{Q3}$ $\pi$ sname = (( $\delta$$_{ bid}$ = $_{103}$ Reserves) $\bowtie$ Sailors)

  1. A
    Both $\text{Q1}$ and $\text{Q3}$
  2. B
    Both $\text{Q2}$ and $\text{Q3}$
    Correct answer
  3. C
    Only $\text{Q3}$
  4. D
    Only $\text{Q2}$

Answer

(B) Both $\text{Q2}$ and $\text{Q3}$

Approach

Check each query for correct linking of boat 103 to sailor names via Reserves.

Reviewed by UGC IQ Editorial Team.