Consider the relations \(r(A, B)\) and \(s(B, C)\), where \(s.B\) is a primary…

GATE · 2018 · CS · Computer Science & IT

Consider the relations r(A,B)r(A, B) and s(B,C)s(B, C), where s.Bs.B is a primary key and r.Br.B is a foreign key referencing s.Bs.B. Consider the query

Q:𝑟⋈(𝜎𝐵<5(𝑠))Q: 𝑟 ⋈ (𝜎𝐵<5(𝑠))

Let LOJLOJ denote the natural left outer-join operation. Assume that rr and ss contain no null values.

Which one of the following queries is NOT equivalent to Q?

  1. A.

    𝜎𝐵<5(𝑟⋈𝑠)𝜎_{𝐵<5}(𝑟 ⋈ 𝑠)

  2. B.

    𝜎𝐵<5(𝑟 𝐿𝑂𝐽 𝑠)𝜎_{𝐵<5}(𝑟 \ 𝐿𝑂𝐽 \ 𝑠)

  3. C.

    𝑟 𝐿𝑂𝐽 (𝜎𝐵<5(𝑠))𝑟 \ 𝐿𝑂𝐽 \ (𝜎_{𝐵<5} (𝑠))

  4. D.

    𝜎𝐵<5 (𝑟) 𝐿𝑂𝐽 𝑠𝜎_{𝐵<5} \ (𝑟) \ 𝐿𝑂𝐽 \ 𝑠

Attempted by 161 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…