Appearance
Topic Drill 5.1.5: Dataset Constraint Testing (K3)
About this drill
LO AI-5.1.5 (K3): Apply dataset constraint testing.
Lesson: Ch 5, section 5.1.5, including the worked example and decision guide
This drill covers every point in section 5.1.5:
- Purpose (integrity and consistency) and the database-schema analogy
- Single-value: missing, range, type · Multi-value: sum, count, duplicate, useful, outlier · Comparison: greater than, correlate
- Manual vs. automated in the pipeline; reporting to data scientists and operations staff
How to work this drill
Every question uses the same dataset, as in the real K3 question. For each business rule ask: one attribute in one row? → single-value. One attribute across rows? → multi-value. Two attributes? → comparison.
Topic Drill: 5.1.5 (K3)
Q1. Dataset: [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] Which constraint type is MOST appropriate to validate that user_age is between 16 and 99?
AMulti-value count constraint
BComparison greater-than constraint
CSingle-value range constraint
DMulti-value outlier constraint
Q2. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] Which constraint type is MOST appropriate to validate that price_eur = 1.00 + 0.25 × duration_min?
AComparison correlate constraint
BSingle-value range constraint
CMulti-value sum constraint
DMulti-value duplicate constraint
Q3. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] Which constraint type is MOST appropriate to validate that battery_start_pct is greater than or equal to battery_end_pct for every rental?
ASingle-value type constraint
BMulti-value useful constraint
CSingle-value missing constraint
DComparison greater-than constraint
Q4. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] Which constraint type is MOST appropriate to make sure no rental_id appears more than once?
AMulti-value useful constraint
BMulti-value duplicate constraint
CSingle-value range constraint
DComparison correlate constraint
Q5. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] Some rows contain duration_min values such as "12.5 min". Which constraint type detects this?
AMulti-value sum constraint
BComparison greater-than constraint
CSingle-value type constraint
DMulti-value count constraint
Q6. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] A scooter's battery allows at most 120 km per day. Which constraint type is MOST appropriate to validate that the distance_km values of one scooter on one day add up to no more than 120?
AMulti-value sum constraint
BSingle-value range constraint
CComparison correlate constraint
DMulti-value duplicate constraint
Q7. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] The data owner requires that at least 98% of rentals have a non-null end_time. Which constraint type checks this?
ASingle-value missing constraint
BComparison greater-than constraint
CMulti-value outlier constraint
DMulti-value count constraint
Q8. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] The start_time value (to the millisecond) is different in every row. Which constraint would flag start_time as unlikely to provide learnable patterns in its raw form?
ADuplicate constraint
BUseful constraint
CRange constraint
DType constraint
Q9. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] The team wants to find rides whose distance_km is statistically unusual compared with all other rides, without setting a fixed limit in advance. Which constraint type fits BEST?
ASingle-value range constraint
BMulti-value outlier constraint
CMulti-value count constraint
DComparison correlate constraint
Q10. Same dataset. [E-scooter rentals dataset: rental_id (integer, unique per rental), user_age (integer, 16–99), start_time and end_time (timestamps), duration_min (integer, = end_time − start_time in minutes), distance_km (decimal), price_eur (decimal, = 1.00 + 0.25 × duration_min), battery_start_pct and battery_end_pct (integer, 0–100), city (text)] Some rows have no city value at all. Which constraint type detects this in each affected row?
ASingle-value missing constraint
BMulti-value useful constraint
CComparison greater-than constraint
DMulti-value sum constraint
Q11. Which TWO statements about dataset constraint categories are CORRECT?
Select 2 options.
AA range constraint can verify the relationship between two attributes
BComparison constraints are a special form of multi-value constraint that compare different values
CDataset constraint testing cannot be automated
DA single-value constraint applies to a single value of an attribute found in a single instance
EThe useful constraint requires every value of an attribute to be unique
0 / 11 answered
← 5.1.4 Data Representativeness · Next drill: 5.1.6 Label Correctness →