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 26–30 of 31

Q26GATE 20041 markMCQ−0.33 if wrong
Consider the relation Student (name‾\underline{name}, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least one boy and one girl. What does the following relational algebra expression produce? (Note: ρ\rho is the rename operator).
πname{σsex=female(Student)}−πname(Student⋈(sex=female∧x=male∧marks≤m) ρn,x,m(Student))\pi_{name}\{\sigma_{sex=female}(\text{Student})\} - \pi_{name}(\text{Student} \bowtie_{(sex=female \wedge x=male \wedge marks \leq m)}\ \rho_{n,x,m}(\text{Student}))

Q27GATE 20041 markMCQ−0.33 if wrong
Let R1(A‾\underline{A},B,(C)) and R2(D‾\underline{D},E) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R1 referring to R2 . Suppose there is no violation of the above referential integrity constraint in the corresponding relation instances r1 and r2 . Which one of the following relational algebra expressions would necessarily produce an empty relation?

Q28GATE 20021 markMCQ−0.33 if wrong
With regard to the expressive power of the formal relational query languages, which of the following statements is true ?

Q29GATE 20011 markMCQ−0.33 if wrong
Let r and s be two relations over the relation schemes R and S respectively, and let A be an attribute in R. Then the relational algebra expression σA=a(r⋈s)\sigma _{A=a}(r\Join s) is always equal to :

Q30GATE 20011 markMCQ−0.33 if wrong
Suppose the adjacency relation of vertices in a graph is represented in a table Adj(X,Y). Which of the following queries cannot be expressed by a relational algebra expression of constant length ?

Keep practising

Topics in Databases

All CS topics ›