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 21–25 of 31

Q21GATE 20061 markMCQ−0.33 if wrong
Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1r_{1} contains 2000 tuples and r2r_{2} contains 2500 tuples. The maximum size of the join r1⋈r2r_{1} \Join r_{2} is :

Q22GATE 20061 markMCQ−0.33 if wrong
Consider the relation enrolled (student, course) in which (student, course) is the primary key, and the relation paid (student, amount) where student is the primary key. Assume no null values and no foreign keys or integrity constraints. Assume that amounts 6000, 7000,8000,9000 and 10000 were each paid by 20% of the students. Consider these query plans (Plan 1 on left, Plan 2 on right) to "list all courses taken by students who have paid more than x."
Enrolled Paid Probe index on student Sequential scan, select amount >x Indexed nested loop join Project on course Enrolled Paid Probe index on student Sequential scan Indexed nested loop join Select on amount >x Project on course
A disk seek takes 4 ms, disk data transfer bandwidth is 300 MB/s and checking a tuple to see if amount is greater than x takes 10μ\mus . Which of the following statements is correct?

Q23GATE 20051 markMCQ−0.33 if wrong
Let r be a relation instance with schema R = (A, B, C, D). We define r1=ΠA,B,C(R)r_{1}=\Pi _{A,B,C}(R) and r2=ΠA,D(R)r_{2}=\Pi _{A,D}(R). Let s=r1∗r2s=r_1*r_2 where * denotes natural join. Given that the decomposition of r into r1r_1 and r2r_2 is lossy, which one of the following is TRUE?

Q24GATE 20051 markMCQ−0.33 if wrong
A database table T1T_1 has 2000 records and occupies 80 disk blocks. Another table T2T_2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1T_1 and one block of records for T2T_2 simultaneously at any point in time. No index is available on either table.
If, instead of Nested-loop join, Block nested-loop join is used, again with the most appropriate choice of table in the outer loop, the reduction in number of block accesses required for reading the data will be

Q25GATE 20051 markMCQ−0.33 if wrong
A database table T1T_1 has 2000 records and occupies 80 disk blocks. Another table T2T_2 has 400 records and occupies 20 disk blocks. These two tables have to be joined as per a specified join condition that needs to be evaluated for every pair of records from these two tables. The memory buffer space available can hold exactly one block of records for T1T_1 and one block of records for T2T_2 simultaneously at any point in time. No index is available on either table.
If Nested-loop join algorithm is employed to perform the join, with the most appropriate choice of table to be used in outer loop, the number of block accesses required for reading the data are

Keep practising

Topics in Databases

All CS topics ›