Skip to content

GATE CS Tuple Calculus and SQL questions

Practise Tuple Calculus and SQL questions for GATE CS. Explore official PYQs and original topic-wise quizzes, check answers and view available solutions. Free, no sign-in.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2026DatabasesTuple Calculus and SQLMCQ · 2 marks
Consider a relational database schema with two relations R(P,Q)R(P, Q) and S(X,Y)S(X, Y). Let E={⟨u⟩∣∃v∃w⟨u,v⟩∈R∧⟨v,w⟩∈S}E=\{\langle u\rangle \mid \exists v \exists w\langle u, v\rangle \in R \wedge\langle v, w\rangle \in S\} be a tuple relational calculus expression. Which one of the following relational algebraic expressions is equivalent to EE ?
Official PYQ2025DatabasesTuple Calculus and SQLMCQ · 2 marks
Consider two relations describing teams and players in a sports league: teams(tid, tname): tid, tname are team-id and team-name, respectively players(pid,pname,tid): pid, pname, and tid denote player-id, playername 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 …
Official PYQ2025DatabasesTuple Calculus and SQLNAT · 2 marks
Consider the following database tables of a sports league. player (pid, pname, age) team(tid, tname, city, cid) coach (cid, cname) members (pid,tid) An instance of the table and an SQL query are given. …
Official PYQ2025DatabasesTuple Calculus and SQLMSQ · 2 marks
Consider the following relational schema: Students (rollno: integer‾,\underline{\text{rollno: integer}}, name: string, age: integer, cgpa: real) Courses (courseno: integer‾,\underline{\text{courseno: integer}}, cname: string, credits: integer) Enrolled (rollno: integer‾,\underline{\text{rollno: integer}}, courseno: integer‾,\underline{\text{courseno: integer}}, grade: string) Which of the following options is/are …
Official PYQ2023DatabasesTuple Calculus and SQLNAT · 2 marks
Consider the following table named Student\text{Student} in a relational database. The primary key of this table is rollNum.\text{rollNum}. Student\text{Student} …
Official PYQ2022DatabasesTuple Calculus and SQLNAT · 2 marks
Consider the relational database with the following four schemas and their respective instances. Student(sNo, sName, dNo) Dept(dNo, dName) Course(cNo, cName, dNo) Register(sNo, cNo) …
Official PYQ2021DatabasesTuple Calculus and SQLNAT · 1 mark
A relation r(A,B)r(A, B) in a relational database has 12001200 tuples. The attribute AA has integer values ranging from 66 to 2020, and the attribute BB has integer values ranging from 11 to 2020. Assume that the attributes AA and BB are independently distributed. The estimated number of tuples in the output of …
Official PYQ2021DatabasesTuple Calculus and SQLMCQ · 2 marks
The relation scheme given below is used to store information about the employees of a company, where empId\textsf{empId} is the key and deptId\textsf{deptId} indicates the department to which the employee is assigned. Each employee is assigned to exactly one department. emp(empId‾, name, gender, salary, deptId)\textsf{emp($\underline{\textsf{empId}}$, name, gender, salary, deptId)} Consider the …
Official PYQ2020DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider a relational database containing the following schemas. …
Official PYQ2019DatabasesTuple Calculus and SQLNAT · 2 marks
A relational database contains two tables Student and Performance as shown below: …
Official PYQ2018DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider the following two tables and four queries in SQL. Book (isbn, bname), Stock(isbn, copies) Query 1: SELECT B.isbn, S.copies FROM Book B INNER JOIN Stock S ON B.isbn=S.isbn; Query 2: SELECT B.isbn, S.copies FROM Book B LEFT OUTER JOIN Stock S ON B.isbn=S.isbn; Query 3: SELECT B.isbn, S,copies FROM Book B RIGHT OUTER JOIN Stock S ON B.isbn=S.isbn Query …
Official PYQ2017DatabasesTuple Calculus and SQLMCQ · 1 mark
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. {tt | ∃\existsu ∈\in EMP(t[EmpName] = u[EmpName] ∧\wedge ∀\forallv ∈\in …
Official PYQ2017DatabasesTuple Calculus and SQLNAT · 1 mark
Consider a database that has the relation schema EMP (EmpId, EmpName, and DeptName). An instance of the schema EMP and a SQL query on it are given below: …
Official PYQ2017DatabasesTuple Calculus and SQLNAT · 1 mark
Consider the following database table named top_scorer\text{top\_scorer}. …
Official PYQ2016DatabasesTuple Calculus and SQLNAT · 1 mark
Consider the following database table named water_schemes: …
Official PYQ2015DatabasesTuple Calculus and SQLNAT · 1 mark
Consider the following relation: …
Official PYQ2015DatabasesTuple Calculus and SQLMCQ · 1 mark
SELECT operation in SQL is equivalent to
Official PYQ2015DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider the following relation Cinema(theater, address, capacity\textit{theater, address, capacity}) Which of the following options will be needed at the end of the SQL query SELECT P1.address FROM Cinema P1 such that it always finds the addresses of theaters with maximum capacity?
Official PYQ2014DatabasesTuple Calculus and SQLMCQ · 1 mark
Given the following schema: employees(emp-id, first-name, last-name, hire-date, dept-id, salary) departments(dept-id, dept-name, manager-id, location-id) You want to display the last names and hire dates of all latest hires in their respective departments in the location ID 1700.\text{ID 1700.} You issue the following query: SQL>SELECT last-name, hire-date …
Official PYQ2014DatabasesTuple Calculus and SQLMCQ · 1 mark
Given the following statements: S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL. S2: Given the table R(a,b,c)R(a,b,c) where aa and bb together form the primary key, the following is a valid table definition. CREATE TABLE S ( a INTEGER, d INTEGER, e INTEGER, PRIMARY KEY (d), FOREIGN KEY (a) references R) Which …