Design tables for event-driven metrics

Quick Overview

This question evaluates relational data modeling and data engineering competencies for high-volume event analytics, including schema design, partitioning and clustering strategies, duplicate and late-arriving event handling, and normalization versus denormalization trade-offs.

Design tables for event-driven metrics

Company: Meta

Role: Data Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design a relational schema to store user events for a consumer app so that the metrics above can be computed efficiently. Provide table definitions with columns and data types, primary/foreign keys, partitioning and indexing strategy, and sample rows. Explain normalization versus denormalization choices, how to handle late-arriving or duplicated events, and how to support backfills and incremental fact tables.

Quick Answer: This question evaluates relational data modeling and data engineering competencies for high-volume event analytics, including schema design, partitioning and clustering strategies, duplicate and late-arriving event handling, and normalization versus denormalization trade-offs.

|Home/System Design/Meta
Meta logo
Meta
Sep 6, 2025, 12:00 AM
hardData EngineerTechnical ScreenSystem Design
7
0

Design a Relational Schema for Consumer-App Event Analytics

Context and Assumptions

You are designing the event store for a high-volume consumer app. The schema must support common product analytics and growth metrics efficiently, including:

  • Activity: DAU/WAU/MAU, stickiness
  • Retention cohorts (N-day, week-over-week)
  • Sessions: counts and lengths
  • Funnels and conversions (e.g., view → add_to_cart → purchase)
  • Revenue (ARPU/ARPPU), feature usage, geo/device/app-version breakdowns

Assume at-least-once delivery from clients/services, possible late-arriving events, and high cardinality in event parameters. The store will be queried in a columnar data warehouse or relational engine that supports partitioning and clustering.

Task

Design a relational schema to store user events so that the metrics above can be computed efficiently. Provide:

  1. Table definitions with columns and data types
  2. Primary and foreign keys
  3. Partitioning and indexing strategy
  4. Sample rows
  5. Explanations for normalization versus denormalization choices
  6. How to handle late-arriving or duplicated events
  7. How to support backfills and incremental fact tables

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...