Consider the following instance of a relation District – Which of the District…
2024
Consider the following instance of a relation District –

Which of the District name will be returned by the following relational algebra expression?
πₙₐₘₑ (σₙₐₘₑ≠"AJ" (District)) − [πₙₐₘₑ (σₚₒₚᵤₗₐₜᵢₒₙ>5 (District)) ∩ πₙₐₘₑ (σₙₐₘₑ="AJ" (District))]
- A.
JA,MM
- B.
JA
- C.
JA,AJ
- D.
AJ
- E.
Question not attempted
Attempted by 187 students.
Show answer & explanation
Correct answer: A
Step 1: Apply the selection σₙₐₘₑ≠"AJ" to the relation District. This filters out the row where the name is "AJ", leaving the rows for JA and MM. Step 2: Apply the projection πₙₐₘₑ to get the names of the remaining districts. This gives {JA, MM}. Step 3: Apply σₚₒₚᵤₗₐₜᵢₒₙ>5 to find districts with population greater than 5. Only AJ has population 50, so this gives {AJ}. Step 4: Apply πₙₐₘₑ to get the names of districts with population > 5. This gives {AJ}. Step 5: Apply σₙₐₘₑ="AJ" to get the district with name AJ. This gives {AJ}. Step 6: Apply πₙₐₘₑ to get the name AJ. This gives {AJ}. Step 7: Find the intersection of {AJ} and {AJ}, which is {AJ}. Step 8: Perform the set difference {JA, MM} − {AJ}, which removes AJ from the set, leaving {JA, MM}. Final result: {JA, MM}.