Skip to main content

Practice: Social Media Analytics

Premium

Scenario: You're designing a data model for Facebook to analyze user engagement, content performance, and advertising effectiveness.

Requirements:

  • Track daily and monthly active users (DAU/MAU)
  • Analyze post engagement (likes, comments, shares) by content type
  • Monitor user growth and churn rates
  • Measure ad performance (impressions, clicks, conversions)
  • Analyze user behavior across different devices

Task: Create a high-level dimensional model to support these requirements.

Identify core business processes. What are the main events that generate the data needed for these analyses? Consider user actions and ad interactions.

Think about different types of fact tables. Given the variety of metrics needed, would a single fact table suffice, or do you need different types of fact tables?

Consider the granularity of your fact tables. What level of detail do you need to store to support all required analyses? Think about the trade-offs between granularity and table size.

Identify dimensions. What contextual information is needed to analyze these events? Consider the "who, what, where, when" of each process.

Think about slowly changing dimensions. Which entities might have attributes that change over time, and how should these changes be tracked?