← Meta Interview Insights

Meta·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

Meta data engineer interview, system design round focused entirely on dimensional modeling. Five sub-questions stacked into one long prompt, which felt like a lot to juggle in real time.

Questions Asked (5)

Q1

Design a dimensional model for a transactional analytics use case. Define the core fact table including its grain, keys, and measures, and outline four or five dimension tables.

Data ModelingSystem Design
Author's notes

Started okay, picked an e-commerce transaction as my example and defined grain at the order-line level.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business process and analytics requirements, then choose the grain of the fact table before identifying dimensions. Walk through the star schema design, explaining how each dimension supports slicing and dicing of measures.

Pro tip: Emphasize that the grain determines the level of detail and must be declared before choosing dimensions; also mention that surrogate keys and slowly changing dimensions (SCDs) are critical for historical accuracy.

1. Clarify Business Process and Requirements

Ask questions to understand the transactional event (e.g., sales, orders, clicks) and the key metrics and dimensions needed for analysis.

2. Declare the Grain of the Fact Table

State the most atomic level of detail captured, such as one row per transaction line item, and explain why this grain supports flexible aggregation.

3. Identify Dimensions and Keys

List the dimension tables (e.g., Date, Customer, Product, Store, Promotion) and describe their attributes and surrogate keys.

4. Define Measures and Additive Nature

Specify the numeric measures (e.g., quantity, revenue, discount) and note which are additive, semi-additive, or non-additive.

5. Discuss SCDs and Performance Considerations

Mention how slowly changing dimensions are handled (Type 1/2/3) and any indexing or partitioning strategies for large fact tables.

Key Points to Mention

  • Grain declaration (e.g., one row per transaction line item)
  • Surrogate keys vs. natural keys in dimensions
  • Star schema vs. snowflake schema trade-offs
  • Additive, semi-additive, and non-additive measures
  • Slowly changing dimensions (SCD) Types 1, 2, and 3
  • Conformed dimensions for cross-process consistency

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

If you need to track how dimension attributes change over time, how would you implement SCD Type 2?

Data ModelingTechnical Trade-offs
Author's notes

Knew this one cold.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining SCD Type 2 and its purpose: preserving full history by creating a new row for each change, with effective dates and a current flag. Then walk through the implementation steps: adding metadata columns, detecting changes, expiring old records, inserting new ones, and handling late-arriving data. Finally, discuss trade-offs like storage and query complexity, and how to optimize for performance.

Pro tip: Emphasize the importance of a surrogate key and a natural/business key combination to uniquely identify each version, and mention that using a current flag (is_current) can simplify queries but requires careful maintenance. Also, consider partitioning by effective date for scalability.

1. Define SCD Type 2 and its purpose

Explain that SCD Type 2 tracks historical changes by creating a new record for each change, preserving full history. Mention that it's ideal for dimensions where historical context matters, like customer address or product category.

2. Design the dimension table schema

Add metadata columns: surrogate key (unique per version), natural/business key (identifies the entity), effective_start_date, effective_end_date, and is_current flag. Optionally include a version number or change reason.

3. Implement change detection and data loading

Use a source-to-target mapping to compare incoming records with current active records. For each change, expire the existing row by setting end_date and is_current=false, then insert a new row with new surrogate key and current dates.

4. Handle late-arriving data and edge cases

Discuss strategies for out-of-order updates, such as using effective dates to insert records in the correct historical position and adjusting end dates of adjacent records. Also mention handling deletes (soft deletes) and nulls.

5. Discuss trade-offs and optimizations

Acknowledge increased storage and query complexity. Suggest optimizations like partitioning by effective date, indexing on natural key and is_current, and using merge/upsert operations for efficiency.

Key Points to Mention

  • Surrogate key vs. natural key: surrogate key uniquely identifies each version, natural key links versions of the same entity.
  • Effective dating: start and end dates define the validity period of each version; end date of expired row should be one day before new start date (or use timestamps).
  • Current flag: is_current boolean simplifies queries for latest version but must be updated atomically.
  • Change detection: compare all tracked attributes; use hash or column-by-column comparison to detect changes efficiently.
  • Late-arriving data: handle by inserting with correct effective dates and adjusting neighboring records' end dates.
  • Performance considerations: partitioning, indexing, and incremental loading to manage large volumes.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Describe the relationship between two example tables, specifically contrasting one-to-many and many-to-many cardinalities, and explain how each affects your schema design.

Data ModelingSystem Design
Author's notes

Blanked for a second on a clean many-to-many example that wasn't just products and orders.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining two concrete example tables (e.g., User and Order) to illustrate one-to-many, then introduce a third table (e.g., Product) to show many-to-many via a junction table. Contrast how each cardinality affects schema design, focusing on foreign key placement, junction tables, and query patterns. Conclude with trade-offs in normalization, performance, and scalability.

Pro tip: Mention that many-to-many relationships often require additional attributes on the junction table (e.g., quantity, timestamp), which can turn it into an associative entity—this shows you think beyond textbook examples.

1. Define Example Tables

Choose simple, relatable tables like User and Order for one-to-many, and Student and Course for many-to-many. Clearly state the entities and their attributes.

2. Explain One-to-Many

Describe how one row in Table A relates to many rows in Table B, and show that the foreign key is placed on the 'many' side (e.g., Order.user_id).

3. Explain Many-to-Many

Describe how many rows in Table A relate to many rows in Table B, requiring a junction table (e.g., Enrollment) with foreign keys to both tables.

4. Contrast Schema Design Impact

Compare how one-to-many uses a simple foreign key, while many-to-many adds a junction table, affecting normalization, indexing, and join complexity.

5. Discuss Trade-offs and Use Cases

Mention performance implications (e.g., extra joins), data integrity constraints, and when denormalization might be considered for read-heavy workloads.

Key Points to Mention

  • Foreign key placement: on the 'many' side for one-to-many, and in a junction table for many-to-many.
  • Junction table (associative entity) may include additional attributes like quantity or date.
  • Normalization benefits: reduces data redundancy and maintains consistency.
  • Query patterns: one-to-many requires simple joins; many-to-many requires joining three tables.
  • Indexing strategies: foreign keys should be indexed for efficient lookups.
  • Scalability considerations: many-to-many can lead to larger junction tables and more complex queries.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How would you handle a many-to-many relationship in your schema, for example using a bridge table or an additional fact table, and what are the trade-offs between those approaches?

Data ModelingTechnical Trade-offs
Author's notes

This is where the conversation got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the use case and access patterns, then compare bridge table vs. fact table approaches based on cardinality, query flexibility, and performance. Conclude with a recommendation that balances normalization, query complexity, and scalability for the given scenario.

Pro tip: At Meta, scale and query patterns often drive schema decisions—emphasize how your choice optimizes for read-heavy workloads and avoids expensive joins at scale. Mention that you'd validate with real query plans and data volume estimates before committing.

1. Clarify requirements and access patterns

Ask about the nature of the relationship (e.g., users and groups), expected data volume, and primary queries (read vs. write, aggregation needs). This determines whether a bridge table or fact table is more appropriate.

2. Explain bridge table approach

Describe a bridge table (junction table) with foreign keys to both entities, possibly with additional attributes. Highlight its simplicity, normalization, and flexibility for many-to-many relationships without extra measures.

3. Explain fact table approach

Describe using a fact table where each row represents an event or transaction linking the two entities, often with measures (e.g., timestamp, count). This is common in data warehousing and supports analytical queries.

4. Compare trade-offs

Discuss trade-offs: bridge tables are simpler and more normalized but may require joins for analytics; fact tables denormalize and can improve query performance for aggregations but may introduce redundancy and complexity.

5. Recommend based on context

Tie back to the initial requirements: for transactional systems, bridge table; for analytical/warehouse systems, fact table. Mention hybrid approaches if needed.

Key Points to Mention

  • Cardinality and relationship attributes (e.g., timestamps, roles)
  • Query patterns: OLTP vs. OLAP, read/write ratio, aggregation needs
  • Normalization vs. denormalization trade-offs
  • Performance implications: join costs, indexing, partitioning
  • Scalability and maintenance considerations
  • Real-world examples (e.g., Facebook friendships, user-group memberships)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How would you evolve your schema to accommodate new requirements such as adding a column, introducing a new dimension, normalizing a table, or adding a new fact, while keeping a single authoritative fact table and maintaining scalability?

Data ModelingSystem DesignTechnical Trade-offs
Author's notes

Hardest part of the whole thing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the current schema and the specific new requirement, then propose a migration strategy that preserves the single authoritative fact table. Emphasize backward compatibility, scalability, and data integrity throughout the evolution process.

Pro tip: Always consider the impact on downstream consumers and ETL pipelines; propose a phased rollout with dual-write and backfill to minimize disruption.

1. Clarify Requirements and Current Schema

Ask questions to understand the new requirement, the existing schema, and how the fact table is used. Identify constraints like data volume, query patterns, and SLAs.

2. Assess Impact and Choose Evolution Strategy

Evaluate options: adding a column, creating a new dimension, normalizing, or adding a fact. Consider trade-offs between schema changes and maintaining a single fact table.

3. Design Migration Plan

Outline steps for schema alteration, data backfill, and dual-write if needed. Ensure the fact table remains authoritative and scalable.

4. Address Scalability and Performance

Discuss partitioning, indexing, and denormalization strategies to handle growth. Consider columnar storage and materialized views for performance.

5. Validate and Monitor

Plan for data validation, testing, and monitoring post-migration. Ensure rollback strategy and communication with stakeholders.

Key Points to Mention

  • Single source of truth: maintain one authoritative fact table
  • Backward compatibility: use views or dual-write during transition
  • Scalability: partitioning, indexing, and columnar storage
  • Data integrity: constraints, validation, and testing
  • ETL/ELT impact: update pipelines and backfill data
  • Trade-offs: normalization vs. denormalization, query performance

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.