← All topics
Quiz: Relational Algebra: questions with answers
15 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Which relational algebra operator corresponds to the WHERE clause?
- Q2. A table has 10 rows. π dept (table) returns 4 rows. Why?
- Q3. R has 5 rows and S has 3 rows. How many rows does R × S have?
- Q4. What condition must two relations meet before you can take their union?
- Q5. "Find suppliers who supply every part." Which operator fits this query?
- Q6. Which of these is a derived operator (it can be written using the basic ones)?
- Q7. A = {1, 2, 3} and B = {2, 3, 4}. What is A − B?
- Q8. Why do query optimizers push selections below joins?
- Q9. When do you need the rename operator ρ?
- Q10. How can intersection be written with set difference only?
- Q11. Which SQL keyword matches the set difference operator (−)?
- Q12. With DB = {1, 2, 3} and OS = {1, 3, 4} (roll numbers), what is OS − DB?
- Q13. How is a theta join R ⋈θ S defined using the basic operators?
- Q14. Which SQL query matches π name, city (σ cgpa 8 (students))?
- Q15. What does the "closure" property of relational algebra mean?