Transit reference data must keep each vehicle on at most one active depot assignment. What quality check fits?
Select an answer to reveal the explanation.
Short Explanation
One bus shouldn't claim two home depots at once, and that's exactly what a cardinality check on vehicle_id catches. You'll need one active assignment per vehicle, so capping history to a single entry won't work since you'll block legit past moves. You've still got gaps if you only check the active depot master or just limit active rows per pairing, since neither stops one vehicle staying active at two different depots.
Full Explanation
Transit reference data should assert that each vehicle_id maps to at most one active depot assignment. Cardinality rules catch split-brain assignments where a bus appears active at two depots, which breaks rostering, maintenance routing, and availability counts. Enforcing one-active-depot-per-vehicle is a classic referential/quality check on municipal fleet reference tables.
Asserting that each vehicle_id maps to at most one depot assignment history entry fails by concept: it limits total history to one row, so a vehicle with one active plus legitimate past assignments would fail even though it meets the one-active requirement. Asserting that each vehicle_id maps to at most one active depot master entry fails by concept: it checks the depot master table rather than depot assignments, so an active master flag means the depot is open, not that the assignment is active, and it cannot prevent a vehicle from holding multiple active assignments. Asserting that each vehicle_id depot_id pair maps to at most one active record fails by concept: it only prevents duplicate active rows for the same pairing, so one vehicle can still be active at several different depots.
Exam caveat: Cardinality expectations (1:1 active, 1:N historical, etc.) are explicit data-quality controls. Historical assignments may be many-ended; "active" flags must remain unique per vehicle. Do not mistake a unique active record per vehicle_id depot_id pair for a single-active-assignment rule—a vehicle could still hold several distinct active pairings with different depots unless cardinality is checked per vehicle, not per pair.
Operational check: Insert two active depot rows for one vehicle_id and confirm the quality rule fails the batch or quarantine. End-date one assignment so only a single active remains and confirm success. Report fleet counts by depot and reconcile to operations' roster.
Prefer to study offline? Printable PDF study book + test engine ($7.50, unofficial). These questions stay free here.