pl-300 Practice Question 1929
Exam: pl-300
Domain: Model the data
Topic: Design and develop a data model
Difficulty: medium
In designing a star schema for a retail analytics system, you need to model the relationship between customers and their purchases. Each customer can make multiple purchases, but each purchase is made by only one customer. Which cardinality relationship should you use in your data model, and how would you represent this in the star schema?
Answer Options
A
Many-to-many relationship between Customers and Purchases
B
One-to-many relationship from Customers to Purchases
C
One-to-one relationship from Customers to Purchases
D
No relationship between Customers and Purchases
Correct Answer
B: One-to-many relationship from Customers to Purchases
Explanation
The correct answer is B. In a star schema, the fact table (e.g., `Purchases`) will have a foreign key to the dimension table (e.g., `Customers`). This represents a 1-to-many relationship where each customer can have multiple purchases, but each purchase is linked to only one customer. Option A is incorrect because it suggests a many-to-many relationship, which is not appropriate here as each purchase is uniquely linked to a single customer. Option C is incorrect because it suggests a one-to-one relationship, which does not fit the scenario where a customer can make multiple purchases. Option D is incorrect because it suggests no relationship, which contradicts the given scenario.