ITPEC FE Morning April 2020 Question 28
ITPEC FE Morning April 2020 — Question 28 of 80
Relational Division — find Y values in R that are associated with ALL X values in S.
Given expressions:
- T₁ ← πY(R) → project Y from R → {A, B}
- T ← T₁ − πY((S × T₁) − R)
Step-by-step:
- •
S × T₁= all combinations of S.X and T₁.Y: - •
{(1,A), (1,B), (2,A), (2,B)} - •
(S × T₁) − R= combinations NOT in R: - •R =
{(1,A), (2,A), (2,B)} - •Result:
{(1,B)} - •
πY(...)={B}— Y values that are MISSING some X - •
T = T₁ − {B}={A, B} − {B}= {A}
Answer: (b)
Why not others:
- (a) NULL — A satisfies the division; result is not empty
- (c) B — B is only paired with X=2, not with X=1
- (d) {A, B} — B fails the completeness check
Key rule: T₁ − πY((S × T₁) − R) is the standard relational division formula. It answers: "Which Y values in R are associated with every X value in S?"
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.