Question 1
Which relational algebra operation would return only students who play both Badminton and Cricket from STUDENT_SPORTS?
σ(SPORTS='Badminton' ∧ SPORTS='Cricket')(STUDENT_SPORTS)
∏ROLL_NO(σ(SPORTS='Badminton')(STUDENT_SPORTS)) ∩ ∏ROLL_NO(σ(SPORTS='Cricket')(STUDENT_SPORTS))
ρ(TEMP, σ(SPORTS='Badminton')(STUDENT_SPORTS)) ⋈ σ(SPORTS='Cricket')(STUDENT_SPORTS)
STUDENT_SPORTS ÷ SPORTS
Question 2
What is the result of ∏ADDRESS(STUDENT) where STUDENT has duplicate 'DELHI' addresses?
Returns all addresses including duplicates
Returns only unique addresses
Returns an error due to duplicate elimination
Returns NULL values for duplicates
Question 3
For relations R(A,B) and S(B,C), which operation requires attribute renaming to avoid ambiguity?
R ∪ S
R ⋈ S
R × S
R - S
Question 4
Which operator would find employees who share exact addresses with students?
EMPLOYEE ⋈(ADDRESS=ADDRESS) STUDENT
∏ADDRESS(EMPLOYEE) ∩ ∏ADDRESS(STUDENT)
σ(EMPLOYEE.ADDRESS=STUDENT.ADDRESS)(EMPLOYEE × STUDENT)
EMPLOYEE ÷ STUDENT
Question 5
In the division operation R ÷ S, what condition must hold?
Attributes(S) ⊆ Attributes(R)
Degree(R) = Degree(S)
R and S must be union-compatible
|Attributes(R)| > |Attributes(S)|
Question 6
What does R ⟗ S return if R has (1,x) and S has (x,10), (y,20)?
(1,x,10)
(1,x,10), (NULL,y,20)
(1,x,10), (NULL,NULL,NULL)
(1,x,NULL), (NULL,y,20)
Question 7
Which operation implements "students who don't play any sports"?
STUDENT - STUDENT_SPORTS
∏ROLL_NO(STUDENT) - ∏ROLL_NO(STUDENT_SPORTS)
σ(ROLL_NO=NULL)(STUDENT ⋈ STUDENT_SPORTS)
STUDENT ÷ STUDENT_SPORTS
Question 8
For R(A,B) with (1,x), (2,y) and S(B) with (x), what is R ÷ S?
(1)
(1), (2)
(x)
Empty relation
Question 9
Which relational algebra expression is equivalent to SQL's LEFT JOIN?
R ⋈ S
R ⟕ S
(R × S) ∪ (R × (∏(NULL,...,NULL)(S)))
(R ⋈ S) ∪ (R - ∏R.*(R ⋈ S))
Question 10
What distinguishes θ-join from equijoin?
θ-join uses only = operator
Equijoin eliminates duplicate columns
θ-join supports inequality conditions
Equijoin requires natural join
There are 10 questions to complete.