My Cart
Your Cart 0

    Your cart is empty.

  • Total (Amount) ₹0.00
Previous year question hub

Relational Models, Algebra and SQL - Databases - Computer Science & Information Technology Previous Year Questions

Practice Relational Models, Algebra and SQL - Databases - Computer Science & Information Technology previous year questions organised from real papers, with year-wise coverage and clear topic navigation.

27Papers
18Years
48Questions
1Topics

Relational Models, Algebra and SQL question pattern

Every graph below is calculated only from this selection.

Questions by year

Compare question counts across years.

Difficulty distribution

How the classified questions are distributed by difficulty.

Medium 29 60.4%
Easy 17 35.4%
Hard 2 4.2%

Question type distribution

MCQ, numerical, multiple-select and other formats found in these papers.

MCQ 36 75%
Numerical Answer Type (NAT) 9 18.8%
MSQ 3 6.3%

Subject weightage

Top subjects by unique question coverage.

Computer Science & Information Technology
48 Qs

Most asked topics

Top topics across the included previous year papers.

Databases
48 Qs

Subtopic coverage

Top subtopics inside this exact selection.

Relational Models, Algebra and SQL
48 Qs

Paper coverage

Question coverage for the most populated papers. Every active PYP paper remains listed below.

Computer Science and Information Technology (CS) 2026
1 Qs
Computer Science and Information Technology (CS) 2026
1 Qs
Computer Science & Information Technology (CS) 2025 [Session 1]
2 Qs
Computer Science & Information Technology (CS) 2025 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2024 [Session 1]
2 Qs
Computer Science & Information Technology (CS) 2024 [Session 2]
2 Qs
Computer Science & Information Technology (CS) 2023 [Session 2]
2 Qs
Computer Science & Information Technology (CS) 2022 [Session 2]
2 Qs
Computer Science & Information Technology (CS) 2021 [Session 1]
1 Qs
Computer Science & Information Technology (CS) 2021 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2020 [Session 2]
2 Qs
Computer Science & Information Technology (CS) 2019 [Session 2]
2 Qs
Computer Science & Information Technology (CS) 2018 [Session 2]
3 Qs
Computer Science & Information Technology (CS) 2017 [Session 2]
2 Qs
Computer Science & Information Technology (CS) 2016 [Session 1]
1 Qs
Computer Science & Information Technology (CS) 2016 [Session 2]
1 Qs
Computer Science & Information Technology (CS) 2014 [Session 3]
3 Qs
Computer Science & Information Technology (CS) 2014 [Session 2]
2 Qs
Computer Science & Information Technology (CS) 2014 [Session 1]
1 Qs
Computer Science & Information Technology (CS) 2013 [Session 4]
2 Qs
Computer Science & Information Technology (CS) 2013 [Session 1]
1 Qs
Computer Science & Information Technology (CS) 2013 [Session 3]
1 Qs
Computer Science & Information Technology (CS) 2011
2 Qs
Computer Science & Information Technology (CS) 2010
2 Qs
Computer Science & Information Technology (CS) 2009
2 Qs
Computer Science & Information Technology (CS) 2008
3 Qs
Computer Science & Information Technology (CS) 2007
3 Qs

Included previous year papers

Newest papers appear first. Search these papers or sort by year and name.

Paper nameYearPDFAttempt
Computer Science and Information Technology (CS) 20262026
1 questions in this view
2026
Computer Science and Information Technology (CS) 20262026
1 questions in this view
2026
Computer Science & Information Technology (CS) 2025 [Session 1]2025
2 questions in this view
2025
Computer Science & Information Technology (CS) 2025 [Session 2]2025
1 questions in this view
2025
Computer Science & Information Technology (CS) 2024 [Session 1]2024
2 questions in this view
2024
Computer Science & Information Technology (CS) 2024 [Session 2]2024
2 questions in this view
2024
Computer Science & Information Technology (CS) 2023 [Session 2]2023
2 questions in this view
2023
Computer Science & Information Technology (CS) 2022 [Session 2]2022
2 questions in this view
2022
Computer Science & Information Technology (CS) 2021 [Session 1]2021
1 questions in this view
2021
Computer Science & Information Technology (CS) 2021 [Session 2]2021
1 questions in this view
2021
Computer Science & Information Technology (CS) 2020 [Session 2]2020
2 questions in this view
2020
Computer Science & Information Technology (CS) 2019 [Session 2]2019
2 questions in this view
2019
Computer Science & Information Technology (CS) 2018 [Session 2]2018
3 questions in this view
2018
Computer Science & Information Technology (CS) 2017 [Session 2]2017
2 questions in this view
2017
Computer Science & Information Technology (CS) 2016 [Session 1]2016
1 questions in this view
2016
Computer Science & Information Technology (CS) 2016 [Session 2]2016
1 questions in this view
2016
Computer Science & Information Technology (CS) 2014 [Session 1]2014
1 questions in this view
2014
Computer Science & Information Technology (CS) 2014 [Session 2]2014
2 questions in this view
2014
Computer Science & Information Technology (CS) 2014 [Session 3]2014
3 questions in this view
2014
Computer Science & Information Technology (CS) 2013 [Session 1]2013
1 questions in this view
2013
Computer Science & Information Technology (CS) 2013 [Session 3]2013
1 questions in this view
2013
Computer Science & Information Technology (CS) 2013 [Session 4]2013
2 questions in this view
2013
Computer Science & Information Technology (CS) 20112011
2 questions in this view
2011
Computer Science & Information Technology (CS) 20102010
2 questions in this view
2010
Computer Science & Information Technology (CS) 20092009
2 questions in this view
2009
Computer Science & Information Technology (CS) 20082008
3 questions in this view
2008
Computer Science & Information Technology (CS) 20072007
3 questions in this view
2007

All Relational Models, Algebra and SQL previous year questions

Practice every matching question in batches of 20, with every available option.

1
2007 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2007
Information about a collection of students is given by the relation studInfo(studId, name, sex). The relation enroll(studId, courseId) gives which student has enrolled for (or taken) what course(s). Assume that every course is taken by at least one male and at least one female student. What does the following relational algebra expression represent?
ΠCourseId((ΠstudIdsex=‘female’(studInfo)) × ΠcourseId(enroll)) − enroll)
Open complete paper
2
2007 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2007
Consider the relation employee(name, sex, supervisorName) with name as the key. supervisorName gives the name of the supervisor of the employee under consideration. What does the following Tuple Relational Calculus query produce?
{e.name | employee(e) ∧
(∀x) [¬employee(x) ∨ x.supervisorName ≠ e.name ∨ x.sex = “male”]}
Open complete paper
3
2007 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2007
Consider the table employee(empId, name, department, salary) and the two queries Q1, Q2 below. Assuming that department 5 has more than one employee, and we want to find the employees who get higher salary than anyone in the department 5, which one of the statements is TRUE for any arbitrary employee table?
Q1: Select e.empId
From employee e
Where not exists
(Select * From employee s Where s.department = “5” and s.salary >= e.salary)
Q2: Select e.empId
From employee e
Where e.salary > Any
(Select distinct salary From employee s Where s.department = “5”)
Open complete paper
4
2008 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2008
Which of the following tuple relational calculus expression(s) is/are equivalent to \(\forall t \in r (P(t))\)?
I. \(\neg \exists t \in r (P(t))\)
II. \(\exists t \in r (P(t))\)
III. \(\neg \exists t \in r (\neg P(t))\)
IV. \(\exists t \in r (\neg P(t))\)
Open complete paper
5
2008 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2008
Let R and S be two relations with the following schema
R(P, Q, R1, R2, R3)
S(P, Q, S1, S2)
where {P,Q} is the key for both schemas. Which of the following queries are equivalent?
I. \(\Pi_P (R \bowtie S)\)
II. \(\Pi_P (R) \bowtie \Pi_P(S)\)
III. \(\Pi_P (\Pi_{P,Q} (R) \cap \Pi_{P,Q} (S))\)
IV. \(\Pi_P (\Pi_{P,Q} (R) - (\Pi_{P,Q} (R) - \Pi_{P,Q} (S)))\)
Open complete paper
6
2008 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2008
Statement for Linked Answer Questions 82 and 83:
Consider the following ER diagram
The minimum number of tables needed to represent M,N,P,R1,R2 is

Question diagram

Open complete paper
7
2009 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2009
Let R and S be relational schemes such that R = {a, b, c} and S = {c}. Now consider the following queries on the database :
I. πR−S(r) − πR−SR−S(r) × s − πR−S,S(r))
II. { t | t ∈ πR−S(r) ∧ ∀ u ∈ s (∃ v ∈ r (u = v[S] ∧ t = v[R−S])) }
III. { t | t ∈ πR−S(r) ∧ ∀ v ∈ r (∃ u ∈ s (u = v[S] ∧ t = v[R−S])) }
IV. Select R.a, R.b
from R, S
where R.c = S.c
Which of the above queries are equivalent ?
Open complete paper
8
2009 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2009
Consider the following relational query on the above database :
SELECT S.sname
FROM Suppliers S
WHERE S.sid NOT IN ( SELECT C.sid
FROM Catalog C
WHERE C.pid NOT IN ( SELECT P.pid
FROM Parts P
WHERE P.color <> 'blue'))
Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query ?
Open complete paper
9
2010 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2010
A relational schema for a train reservation database is given below.
Passenger(pid, pname, age)
Reservation(pid, class, tid)

Table: Passenger
pidpnameAge
0'Sachin'65
1'Rahul'66
2'Sourav'67
3'Anil'69

Table: Reservation
pidclasstid
0'AC'8200
1'AC'8201
2'SC'8201
3'AC'8203
1'SC'8204
3'AC'8202

What pids are returned by the following SQL query for the above instance of the tables?
SELECT pid FROM Reservation WHERE class = 'AC' AND EXISTS (SELECT * FROM Passenger WHERE age > 65 AND Passenger.pid = Reservation.pid)
Open complete paper
10
2010 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2010
The following functional dependencies hold for relations R(A, B, C) and S(B, D, E):
\(B \to A\),
\(A \to C\)
The relation R contains 200 tuples and the relation S contains 100 tuples. What is the maximum number of tuples possible in the natural join \(R \bowtie S\)?
Open complete paper
11
2013 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2013 [Session 1]
Consider the following relational schema. Students(rollno: integer, sname: string) Courses(courseno: integer, cname: string) Registration(rollno: integer, courseno: integer, percent: real) Which of the following queries are equivalent to this query in English? “Find the distinct names of all students who score more than 90% in the course numbered 107” (I) SELECT DISTINCT S.sname FROM Students as S, Registration as R WHERE R.rollno=S.rollno AND R.courseno=107 AND R.percent > 90 (II) Π_{sname}(σ_{courseno=107 ∧ percent>90}(Registration ⋈ Students)) (III) {T | ∃S∈Students, ∃R∈Registration ( S.rollno=R.rollno ∧ R.courseno=107 ∧ R.percent>90 ∧ T.sname=S.sname)} (IV) { | ∃S_N∃R_P ( ∈ Students ∧ ∈ Registration ∧ R_P>90)}
Open complete paper
12
2013 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2013 [Session 3]
Consider the following relational schema. Students(rollno: integer, sname: string) Courses(courseno: integer, cname: string) Registration(rollno: integer, courseno: integer, percent: real) Which of the following queries are equivalent to this query in English? “Find the distinct names of all students who score more than 90% in the course numbered 107” (I) SELECT DISTINCT S.sname FROM Students as S, Registration as R WHERE R.rollno=S.rollno AND R.courseno=107 AND R.percent>90 (II) Π_{sname}(σ_{courseno=107 ∧ percent>90}(Registration ⋈ Students)) (III) {T | ∃S ∈ Students, ∃R ∈ Registration ( S.rollno=R.rollno ∧ R.courseno=107 ∧ R.percent>90 ∧ T.sname=S.sname)} (IV) { | ∃S_R ∃S_N ( ∈ Students ∧ ∈ Registration ∧ R_P>90)}
Open complete paper
13
2013 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2013 [Session 4]
Consider the following relational schema.
Students(rollno: integer, sname: string)
Courses(courseno: integer, cname: string)
Registration(rollno: integer, courseno: integer, percent: real)
Which of the following queries are equivalent to this query in English?
“Find the distinct names of all students who score more than 90% in the course numbered 107”
(I) SELECT DISTINCT S.sname
FROM Students as S, Registration as R
WHERE R.rollno=S.rollno AND R.courseno=107 AND R.percent>90
(II) \(\Pi_{sname}(\sigma_{courseno=107 \wedge percent>90}(Registration \bowtie Students))\)
(III) \(\{T \mid \exists S \in Students, \exists R \in Registration (S.rollno=R.rollno \wedge R.courseno=107 \wedge R.percent>90 \wedge T.sname=S.sname)\}\)
(IV) \(\{ \mid \exists S_N \in Students \wedge \exists R_N, R_P (R_N=S_N \wedge R_P=107 \wedge R_P>90 \wedge S_N=S.sname)\}\)
Open complete paper
14
2013 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2013 [Session 4]
How many candidate keys does the relation R have?
Open complete paper
15
2014 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2014 [Session 1]
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. You issue the following query:

SQL>SELECT last-name, hire-date
FROM employees
WHERE (dept-id, hire-date) IN
(SELECT dept-id, MAX(hire-date)
FROM employees JOIN departments USING(dept-id)
WHERE location-id = 1700
GROUP BY dept-id);

What is the outcome?
Open complete paper
16
2014 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2014 [Session 2]
Given an instance of the STUDENTS relation as shown below:
StudentIDStudentNameStudentEmailStudentAgeCPI
2345Shankarshankar@mathX9.4
1287Swatiswati@ee199.5
7853Shankarshankar@cse199.4
9876Swatiswati@mech189.3
8765Ganeshganesh@civil198.7

For \((StudentName, StudentAge)\) to be a key for this instance, the value X should NOT be equal to ____________.

Question diagram

Open complete paper
17
2014 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2014 [Session 2]
SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in the result of joins. Which one of the following queries always gives the same answer as the nested query shown below: select * from R where a in (select S.a from S)
Open complete paper
18
2014 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2014 [Session 3]
What is the optimized version of the relation algebra expression π_{A1}(π_{A2}(σ_{F1}(σ_{F2}(r)))), where A1, A2 are sets of attributes in r with A1 ⊂ A2 and F1, F2 are Boolean expressions based on the attributes in r?
Open complete paper
19
2014 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2014 [Session 3]
Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation.

employee (empId, empName, empAge)
dependent (depId, eId, depName, depAge)

Consider the following relational algebra query:

ΠempId(employee) - ΠempId (employee⋈ (empAge ≤ depAge ∧ empId = eId) dependent)

The above query evaluates to the set of empIds of employees whose age is greater than that of
Open complete paper
20
2014 · Computer Science & Information Technology · Databases · Relational Models, Algebra and SQL
Computer Science & Information Technology (CS) 2014 [Session 3]
Consider the following relational schema:
employee (empId, empName, empDept)
customer (custId, custName, salesRepId, rating)
salesRepId is a foreign key referring to empId of the employee relation. Assume that each employee makes a sale to at least one customer. What does the following query return?
SELECT empName
FROM employee E
WHERE NOT EXISTS (SELECT custId
FROM customer C
WHERE C.salesRepId = E.empId
AND C.rating <> 'GOOD');
Open complete paper

Showing 20 of 47 questions