Campaign enrollment bridge
Resolve a subscriber-to-campaign many-to-many relationship without losing enrollment detail.
Concept
many-to-many-modeling
The primary modeling idea this problem reinforces.
Requirements
3
Business needs the model must satisfy.
A growth team runs campaigns that many subscribers can join. Each subscriber can join many campaigns, and analysts need to study enrollment timing and status without duplicating subscriber or campaign attributes.
Many-to-many relationships are a classic interview trap. A direct edge looks simple, but it hides the row grain and leaves nowhere clean to store relationship-specific facts like enrollment date or status.
- Keep subscribers and campaigns as reusable dimensions.
- Add a campaign enrollment bridge between them.
- Declare explicit bridge foreign keys to both dimension surrogate keys.
Template
Campaign enrollment starter workspace
The model users start from in the full workspace.
Entities
2
Seeded tables visible in the public preview.
Dialect
postgresql
Generated SQL target for this starter model.
This preview is read-only. Open the workspace to edit and verify; saving needs a free account.
Open workspaceTry the question first.
The discussion has other people's approaches and solutions. Give it a real attempt before you read them.