Model Campaigns, Targeting, and Edit History for a Demand-Side Ad Platform
Quick Overview
Model a demand-side ad platform with advertisers, campaigns, ad groups, ads, and creatives, including audience rules, edit history, and versioned publishing.
Model Campaigns, Targeting, and Edit History for a Demand-Side Ad Platform
Company: ByteDance
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design the data model for a demand-side advertising platform where advertisers create and edit advertising campaigns.
The model must represent Advertiser, Campaign, Ad Group, Ad, and Creative. Explain their relationships, how audience-targeting rules attach to the campaign structure, and how to preserve the history of edits. Show enough schema detail to make ownership, references, and historical reconstruction unambiguous.
State assumptions about creative reuse, the level at which targeting is configured, and whether edits become effective immediately or through an explicit publication step. These behaviors are design choices for this exercise; no existing platform-specific behavior is prescribed.
### What a Strong Answer Covers
- Entity identities and cardinalities, including the distinction between an ad placement/configuration and its creative asset.
- Advertiser ownership enforced consistently across campaigns, ad groups, ads, creative references, and audience definitions.
- A targeting representation that preserves inclusion, exclusion, and AND/OR semantics without depending on an opaque string.
- An edit-history design that records previous values and supports reconstruction of one coherent campaign configuration.
- Atomic edits and a concurrency policy so two editors cannot silently overwrite each other's changes.
```hint Reconstruct one campaign
Saving the old campaign row is insufficient if an ad or shared creative can change independently. Identify which versions a historical campaign should resolve to.
```
### Follow-up Questions
- If several ads reuse a creative, should updating the creative change all live ads immediately? How would your schema enforce the chosen policy?
- How would you restore a previous campaign configuration without erasing the intervening edit history?
Overview: Model a demand-side ad platform with advertisers, campaigns, ad groups, ads, and creatives, including audience rules, edit history, and versioned publishing.
Model Campaigns, Targeting, and Edit History for a Demand-Side Ad Platform
ByteDance
Apr 23, 2026
mediumSoftware EngineerOnsiteSystem Design
0
0
Design the data model for a demand-side advertising platform where advertisers create and edit advertising campaigns.
The model must represent Advertiser, Campaign, Ad Group, Ad, and Creative. Explain their relationships, how audience-targeting rules attach to the campaign structure, and how to preserve the history of edits. Show enough schema detail to make ownership, references, and historical reconstruction unambiguous.
State assumptions about creative reuse, the level at which targeting is configured, and whether edits become effective immediately or through an explicit publication step. These behaviors are design choices for this exercise; no existing platform-specific behavior is prescribed.
What a Strong Answer Covers Guidance
Entity identities and cardinalities, including the distinction between an ad placement/configuration and its creative asset.
Advertiser ownership enforced consistently across campaigns, ad groups, ads, creative references, and audience definitions.
A targeting representation that preserves inclusion, exclusion, and AND/OR semantics without depending on an opaque string.
An edit-history design that records previous values and supports reconstruction of one coherent campaign configuration.
Atomic edits and a concurrency policy so two editors cannot silently overwrite each other's changes.
Follow-up Questions Guidance
If several ads reuse a creative, should updating the creative change all live ads immediately? How would your schema enforce the chosen policy?
How would you restore a previous campaign configuration without erasing the intervening edit history?