Suppose that cardinalities of relations and are and respectively, then
Suppose that cardinalities of relations A and B are m and n respectively, then the maximum cardinality of the resultant relation A ÷ B is (A divides B)
- A.
m
- B.
m-n
- C.
⌈m/n⌉
- D.
⌊m/n⌋
Attempted by 52 students.
Show answer & explanation
Correct answer: D
Answer: ⌊m/n⌋
Explanation:
Interpretation: Let relation A have attributes X ∪ Y and relation B have attributes Y. The division A ÷ B returns the distinct X-values that are paired with every tuple of B.
Requirement for a result value: For a single X-value to appear in A ÷ B, there must be a tuple in A for that X-value combined with every one of the n tuples of B. In other words, each result value needs at least n tuples in A.
Maximum count: Given m total tuples in A, the maximum number of distinct X-values that can each have at least n associated tuples is the number of complete groups of size n that can be formed from m tuples, which is floor(m/n).
Why other expressions are wrong: m counts all tuples (not grouped by X-values), m - n is not meaningful for the grouping requirement and can be negative, and ceiling(m/n) can overcount when m is not divisible by n because partial groups do not produce valid result values.
Short example: If m = 7 and n = 3, at most floor(7/3) = 2 distinct X-values can be paired with all 3 tuples of B, so the result size is 2.