Recall & Review
beginner
What is the UNION operation in set theory or databases?
UNION combines all unique elements from two sets or tables, removing duplicates to form a single set.
Click to reveal answer
beginner
Define INTERSECTION in the context of databases.
INTERSECTION returns only the elements that appear in both sets or tables.
Click to reveal answer
beginner
What does the DIFFERENCE operation do?
DIFFERENCE returns elements that are in the first set but not in the second set.
Click to reveal answer
intermediate
How does UNION handle duplicate records in database tables?
UNION removes duplicate records, so each record appears only once in the result.
Click to reveal answer
intermediate
Can INTERSECTION be used to find common customers in two sales tables?
Yes, INTERSECTION returns customers present in both sales tables, showing common entries.
Click to reveal answer
Which operation returns all unique records from two tables combined?
✗ Incorrect
UNION combines all unique records from both tables, removing duplicates.
What does INTERSECTION return when applied to two sets?
✗ Incorrect
INTERSECTION returns only the elements that appear in both sets.
If you want to find records in Table A but not in Table B, which operation do you use?
✗ Incorrect
DIFFERENCE returns records in the first set (Table A) that are not in the second (Table B).
Does UNION include duplicate records in the result?
✗ Incorrect
UNION removes duplicates so each record appears only once.
Which operation would you use to find customers who bought products from both Store A and Store B?
✗ Incorrect
INTERSECTION finds common customers present in both Store A and Store B.
Explain the difference between UNION, INTERSECTION, and DIFFERENCE operations with examples.
Think about combining lists, finding common friends, or removing items.
You got /4 concepts.
How can UNION, INTERSECTION, and DIFFERENCE be useful in managing data in databases?
Consider scenarios like combining customer lists or comparing inventories.
You got /4 concepts.