The GATE Grind

GATE Databases: Relational Model: Relational Algebra, Tuple Calculus, SQL – Previous Year Questions

23 GATE previous year questions on Relational Model: Relational Algebra, Tuple Calculus, SQL (Databases, Computer Science) with answers and explanations, from every paper.

  1. GATE 2017 CS Q33 (1 mark, Numerical answer) – 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…
  2. GATE 2017 CS Q51 (2 marks, Multiple choice) – 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…
  3. GATE 2017 CS Q56 (2 marks, Numerical answer) – Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below. StudentName CourseName…
  4. GATE 2015 CS Q31 (1 mark, Multiple choice) – SELECT operation in SQL is equivalent to
  5. GATE 2015 CS Q61 (2 marks, Numerical answer) – Consider the following relations: Student Roll No Student Name --- --- 1 Raj 2 Rohit 3 Raj Performance Roll No Course Marks --- --- --- 1 Math 80 1…
  6. GATE 2018 CS Q22 (1 mark, Multiple choice) – 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…
  7. GATE 2018 CS Q51 (2 marks, Multiple choice) – Consider the relations r(A,B) and s(B,C), where s.B is a primary key and r.B is a foreign key referencing s.B. Consider the query Q:\ r( B<5(s)) Let…
  8. GATE 2019 CS Q61 (2 marks, Numerical answer) – A relational database contains two tables Student and Performance as shown below: Roll no. Student name --- --- 1 Amit 2 Priya 3 Vinit 4 Rohan 5 Smita…
  9. GATE 2019 CS Q65 (2 marks, Numerical answer) – Consider the following relations P(X,Y,Z), Q(X,Y,T) and R(Y,V). X Y Z --- --- --- X1 Y1 Z1 X1 Y1 Z2 X2 Y2 Z2 X2 Y4 Z4 (relation P) X Y T --- --- ---…
  10. GATE 2026 CS (CS1) Q30 (1 mark, Multiple select) – Let P, Q, R and S be the attributes of a relation in a relational schema. Let X Y indicate functional dependency in the context of a relational…
  11. GATE 2026 CS (CS1) Q43 (2 marks, Multiple choice) – Consider a relational database schema with two relations R(P, Q) and S(X, Y). Let E = \ u v w \, u, v R v, w S\ be a tuple relational calculus…
  12. GATE 2025 CS (CS2) Q54 (2 marks, Multiple select) – Consider the following relational schema: Students (rollno: integer, name: string, age: integer, cgpa: real) Courses (courseno: integer, cname:…
  13. GATE 2025 CS (CS1) Q39 (2 marks, Multiple choice) – Consider two relations describing teams and players in a sports league: - teams(tid, tname): tid, tname are team-id and team-name, respectively -…
  14. GATE 2025 CS (CS1) Q55 (2 marks, Numerical answer) – Consider the following database tables of a sports league. player(pid,pname,age) coach(cid,cname) team(tid,tname,city,cid) members(pid,tid) An…
  15. GATE 2024 CS (CS2) Q45 (2 marks, Multiple choice) – The relation schema, Person(pid, city), describes the city of residence for every person uniquely identified by pid. The following relational algebra…
  16. GATE 2024 CS (CS1) Q35 (1 mark, Numerical answer) – Consider two relations R(A,B) with tuples (10,20),(20,30),(30,40),(30,50),(50,95) and S(A,C) with tuples (10,90),(30,45),(40,80). The total number of…
  17. GATE 2023 CS Q16 (1 mark, Multiple choice) – Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?
  18. GATE 2023 CS Q61 (2 marks, Numerical answer) – Consider the following table named Student in a relational database. The primary key of this table is rollNum. Student(rollNum, name, gender, marks):…
  19. GATE 2022 CS Q25 (1 mark, Multiple select) – Consider the following three relations in a relational database. Employee(eId, Name), Brand(bId, bName), Own(eId, bId) Which of the following…
  20. GATE 2022 CS Q56 (2 marks, Numerical answer) – Consider the relational database with the following four schemas and their respective instances. Student(sNo, sName, dNo): (S01, James, D01), (S02,…
  21. GATE 2021 CS Q33 (1 mark, Numerical answer) – A relation r(A, B) in a relational database has 1200 tuples. The attribute A has integer values ranging from 6 to 20, and the attribute B has integer…
  22. GATE 2021 CS Q37 (2 marks, Multiple choice) – The following relation records the age of 500 employees of a company, where empNo (indicating the employee number) is the key: empAge(empNo, age).…
  23. GATE 2020 CS Q23 (1 mark, Multiple choice) – Consider a relational database containing the following schemas. Catalogue(sno, pno, cost): (S1,P1,150), (S1,P2,50), (S1,P3,100), (S2,P4,200),…