Gate CS-2017-1 Question Paper With Solutions

Q. 36 Consider a database that has the relation schemas EMP (EmpId, EmpName, DepId), and DEPT(DeptName, DeptId). Note that the DepId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus.

I. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∀ v ∈ DEPT (t[DeptId] ≠ DeptId]))}

II. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∃ v ∈ DEPT (t[DeptId] ≠ DeptId]))}

III. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∃ v ∈ DEPT (t[DeptId] = DeptId]))}

(A) I and II only

(B) I and III only

(C) II and III only

(D) I, II, and III

Answer: (D)

Explanation:

Gate CS-2017-1 Question Paper With Solutions

Learn More:   Gate EE-2017-1 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here