Your retail analytics team is migrating an on-premises star schema to BigQuery. The Sales fact table currently has foreign keys to the Customer, Store, Product, and Date dimensions. Analysts now need to compare the order date with the refund date for the same transaction in a single query while preserving star-schema best practices. Which modeling change most directly satisfies the new reporting requirement?
Store the refund date as a TIMESTAMP column in the Sales fact table and stop joining to a Date dimension for that value.
Add an is_refund column to the Customer dimension to flag transactions that were returned.
Create a separate Refund fact table with its own customer and product keys and link both fact tables in queries.
Add refund_date_key as a second foreign key in the Sales fact table that points to the shared Date dimension (a role-playing dimension).
In a star schema each business context (who, what, when, where) is placed in its own dimension table, and the fact table holds foreign keys to those dimensions. When the same logical dimension (Date) is needed for multiple business events, you add another foreign key that points to the same Date dimension; this is known as a role-playing dimension. Storing the date as a raw timestamp bypasses shared hierarchies (year, fiscal week), putting comparison logic on every query. Marking a flag in the Customer dimension or creating a separate Refund fact table either mixes unrelated attributes or fragments the transaction, forcing additional joins to analyze sale versus refund side-by-side. Therefore, adding a second foreign key such as refund_date_key that references the existing Date dimension is the most appropriate change.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a role-playing dimension in a star schema?
Open an interactive chat with Bash
Why is storing dates as TIMESTAMP columns in the fact table not ideal for star schema design?
Open an interactive chat with Bash
What is the difference between a fact table and a dimension table in a star schema?
Open an interactive chat with Bash
What are role-playing dimensions in a star schema?
Open an interactive chat with Bash
Why is adding raw timestamps like refund_date not ideal for star-schema design?
Open an interactive chat with Bash
What are the downsides of creating a separate Refund fact table?
Open an interactive chat with Bash
GCP Professional Data Engineer
Storing the data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .