A database query on a set of records works in two steps. Step 1 builds , the records in that are not in . Step 2 keeps only those records of Step 1 that are also in . So the query outputs . Which shorter expression gives the same output for every choice of the sets and ?
Competency-Based Questions (CBQ) · Question 14 of 80
A database query on a set U of records works in two steps.
Question 141 markMCQMedium
Select your answer
(A)
- Correct answer
(B)
(C)
(D)
Option (B) is correct.
Explanation:
Follow one record through the query.
If , then and . But means and . So would be both in and not in , which is impossible.
No record can come out of the query, so for every and
In other words, and are always disjoint sets.
To reject the other options, one example is enough. Take , and . Then and .
Why the other options are wrong
- (A) in the example, not . Step 1 has already removed , because .
- (C) in the example, not . This is only the output of Step 1; Step 2 then removes , because .
- (D) in the example, not . Step 1 removes the records of that are in , and Step 2 removes all the others.
