Relational Algebra: GATE CS Previous Year Questions

Relational Algebra · Databases

31 questions · asked in 19 of 27 years (2000–2026)

MCQ 27 · MSQ 1 · NAT 31-mark 17 · 2-mark 14

2000Questions per year2026

Questions 6–10 of 31

Q6GATE 20182 marksMCQ−0.67 if wrong
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))Q:r \Join (\sigma _{B\lt 5}(s))
Let LOJ denote the natural left outer-join operation. Assume that r and s contain no null values.
Which one of the following queries is NOT equivalent to Q?

Q7GATE 2017 (Session 1)2 marksNAT
Consider a database that has the relation schema CR (StudentName, CourseName). An instance of the schema CR is as given below.
CRStudentNameCourseName SACA SACB SACC SBCB SBCC SCCA SCCB SCCC SDCA SDCB SDCC SDCD SECD SECA SECB SFCA SFCB SFCC
The following query is made on the database

T1←πCourseName(σStudentName=′SA′(CR))T1\leftarrow \pi _{CourseName}(\sigma _{StudentName='SA'}(CR))
T2←CR÷T1T2\leftarrow CR\div T1

The number of rows in T2 is ____________.

Q8GATE 2015 (Session 2)2 marksMCQ−0.67 if wrong
Consider two relations R1(A,B) with the tuples (1,5), (3,7) and R2(A,C) = (1,7), (4,9). Assume that R(A,B,C) is the full natural outer join of R1 and R2. Consider the following tuples of the form (A,B,C): a = (1,5,null), b = (1,null,7), c = (3, null, 9), d = (4,7,null), e = (1,5,7), f = (3,7,null), g = (4,null,9). Which one of the following statements is correct?

Q9GATE 2014 (Session 2)2 marksMCQ−0.67 if wrong
Consider a join (relation algebra) between relations r(R)and s(S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R))<\ltsize(s(S)), the join will have fewer number of disk block accesses if

Q10GATE 2014 (Session 3)1 markMCQ−0.33 if wrong
What is the optimized version of the relation algebra expression πA1(πA2(σF1(σF2(r))))\pi _{A1}(\pi _{A2}(\sigma _{F1}(\sigma_{F2}(r)))) , where A1, A2 are sets of attributes in r with A1⊂A2A_{1}\subset A_{2} and F1, F2 are Boolean expressions based on the attributes in r?

Keep practising

Topics in Databases

All CS topics ›