GATE CSE 2018 Q51: Query not equivalent to r join selection on s using left outer join
- Databases
- 2 marks
- MCQ
- −2/3 if wrong
Syllabus topic: Relational model: relational algebra, tuple calculus and SQL
Question
Consider the relations and , where is a primary key and is a foreign key referencing . Consider the query
Let denote the natural left outer-join operation. Assume that and contain no null values.
Which one of the following queries is NOT equivalent to Q?
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: C (official GATE 2018 final answer key)
Concept used: Because of the foreign key every r tuple matches some s tuple, so a left outer join with all of s equals the inner join, but a left outer join with a filtered s keeps unmatched r tuples padded with nulls.
First step: Take an tuple with and check which of the four queries would still output it (with a null ).
Full step-by-step solution
Loading…
Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.
More questions on Relational model: relational algebra, tuple calculus and SQL
Every PYQ on this topic →Share this question
Source: official GATE 2018 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key
More Databases PYQs
- 2026 Session 1 · Q30Which functional dependency inferences always hold
- 2026 Session 1 · Q31Dependency-preserving decompositions for 1NF, 2NF, 3NF, BCNF
- 2026 Session 1 · Q43Relational algebra equivalent of a tuple calculus join query
- 2026 Session 1 · Q65Number of superkeys with candidate keys {A,B} and {A,C}
- 2026 Session 2 · Q15Match DBMS schema levels with what they describe
- 2026 Session 2 · Q20When two transactions do not conflict on a data item