GATE CS 2017 (Forenoon) — Question 41

Database Management Systems (DBMS)Relational Models, Relational Algebra, Tuple CalculusMCQ2 marks · −2/3 if wrongHard

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. \(\{t \mid \exists u \in \text{EMP} (t[\text{EmpName}] = u[\text{EmpName}] \wedge \forall v \in \text{DEPT} (t[\text{DeptId}] \neq v[\text{DeptId}]))\}\) II. \(\{t \mid \exists u \in \text{EMP} (t[\text{EmpName}] = u[\text{EmpName}] \wedge \exists v \in \text{DEPT} (t[\text{DeptId}] \neq v[\text{DeptId}]))\}\) III. \(\{t \mid \exists u \in \text{EMP} (t[\text{EmpName}] = u[\text{EmpName}] \wedge \exists v \in \text{DEPT} (t[\text{DeptId}] = v[\text{DeptId}]))\}\) Which of the above queries are safe?
  1. A
    I and II only
  2. B
    I and III only
  3. C
    II and III only
  4. D
    I, II and III
Practise the full 2017-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkDatabase System Concepts (Korth)Normalisation, SQL, transactions and indexing — the DBMS syllabus in one book.
Practise more on Relational Models, Relational Algebra, Tuple CalculusTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group