Filter by year

Tuple Calculus questions

Q39

GATE CS 2025 CS-1Relational QueriesMCQ2 marks−2/3 if wrong
Consider two relations describing teamsteams and playersplayers in a sports league:
- teams(tid,tname)teams(tid, tname): tid,tnametid, tname are team-id and team-name, respectively
- players(pid,pname,tid)players(pid, pname, tid): pid,pnamepid, pname, and tidtid denote player-id, player-name and the team-id of the player, respectively
Which ONE of the following tuple relational calculus queries returns the name of the players who play for the team having tnametname as ′MI′'MI'?
Show answer without attempting

Answer: A

Q41

GATE CS 2017 CS-1Relational QueriesMCQ2 marks−2/3 if wrong
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∣∃u∈EMP(t[EmpName]=u[EmpName]∧∀v∈DEPT(t[DeptId]≠v[DeptId]))}\lbrace t \mid \exists u \in \text{EMP}(t[\text{EmpName}] = u[\text{EmpName}] \land \forall v \in \text{DEPT}(t[\text{DeptId}] \neq v[\text{DeptId}])) \rbrace
(II) {t∣∃u∈EMP(t[EmpName]=u[EmpName]∧∃v∈DEPT(t[DeptId]≠v[DeptId]))}\lbrace t \mid \exists u \in \text{EMP}(t[\text{EmpName}] = u[\text{EmpName}] \land \exists v \in \text{DEPT}(t[\text{DeptId}] \neq v[\text{DeptId}])) \rbrace
(III) {t∣∃u∈EMP(t[EmpName]=u[EmpName]∧∃v∈DEPT(t[DeptId]=v[DeptId]))}\lbrace t \mid \exists u \in \text{EMP}(t[\text{EmpName}] = u[\text{EmpName}] \land \exists v \in \text{DEPT}(t[\text{DeptId}] = v[\text{DeptId}])) \rbrace

Which of the above queries are safe?
Show answer without attempting

Answer: D

0/20 correct0 marks

Related topics in Relational Queries