GATE CSE 2017 Session 1 Q51: Which tuple relational calculus queries on EMP and DEPT are safe
- Databases
- 2 marks
- MCQ
- −2/3 if wrong
Syllabus topic: Relational model: relational algebra, tuple calculus and SQL
Question
Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus.
(I)
(II)
(III)
Which of the above queries are safe?
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: D (official GATE 2017 final answer key)
Concept used: A tuple relational calculus query is safe if its result is finite and drawn from values in the database. The official key (D) evaluates each query only over the values present in EMP and DEPT, under which all three return finite results; under the strict textbook definition, (I) and (II) leave unbounded, so this question is disputed.
First step: Note that is always tied to EMP through , then see how evaluating over the values present in EMP and DEPT keeps finite in each query.
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 2017 Session 1 CS question paper and final answer key, organised by IIT Roorkee. 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