Sample question 1 — Connecting and Preparing Data
A data engineer models a relationship between a sales fact table with ten million rows and a date dimension with 3,650 rows covering ten years. Each sales row matches exactly one date row, the dimension holds every date the fact table uses, and no sales row is missing a date. Queries are slower than expected and the engineer is reviewing the relationship settings. Which configuration should the engineer apply?
- A. Set the cardinality to many-to-one and referential integrity to all records, matching the actual data.
- B. Set the cardinality to many-to-many and leave referential integrity at its default setting for both tables.
- C. Set the cardinality to one-to-one and declare that every date row has exactly one matching sales row.
- D. Leave both settings at their defaults because they describe the data and never affect query speed.
Answer: A. Option A is correct: Set the cardinality to many-to-one and referential integrity to all records. Declaring the true many-to-one shape and stating that every fact row has a matching dimension row lets the logical model generate simpler queries instead of handling unmatched or duplicated keys. Option B claims a many-to-many shape the data does not have, which forces extra join work; option C reverses the real relationship; and option D is false, because these settings are exactly what the optimizer reads.
