← Meta Interview Insights

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

Senior
Apr 2026

Summary

Meta data engineer interview with a system design question about schema design for a ride sharing app. Pretty open-ended, which I wasn't fully prepared for.

Questions Asked (1)

Q1

Design a database schema for a ride sharing application.

Data ModelingSystem DesignTechnical Trade-offs
Author's notes

I started with users and rides tables and felt okay for the first few minutes, but then they pushed on things like driver availability, pricing history, and how you'd handle trip states over time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the core requirements and scale of the ride-sharing app, then design a normalized schema for the main entities (riders, drivers, trips, payments) before addressing high-volume needs like location tracking and matching. Discuss trade-offs between normalization and denormalization, and how to handle real-time updates and scalability.

Pro tip: Emphasize that the schema must support high write throughput for location updates and low-latency reads for matching; consider using a hybrid approach with a relational database for transactional data and a NoSQL or in-memory store for real-time location and session data.

1. Clarify Requirements and Scale

Ask about expected user base, trip volume, read/write patterns, and consistency needs. This determines whether to prioritize normalization, denormalization, or a polyglot persistence approach.

2. Identify Core Entities and Relationships

List the main entities: Rider, Driver, Trip, Payment, Location, and Rating. Define their attributes and relationships, ensuring to capture cardinality (e.g., one rider to many trips).

3. Design Tables with Keys and Indexes

Create tables with primary keys, foreign keys, and appropriate indexes for frequent queries (e.g., finding nearby drivers, trip history). Consider using UUIDs for distributed systems.

4. Address High-Volume and Real-Time Data

For driver location updates and trip matching, propose a separate store (e.g., Redis for geospatial indexing, Cassandra for time-series location data) and discuss data synchronization with the core relational database.

5. Discuss Trade-offs and Scalability

Explain choices like normalization vs. denormalization, SQL vs. NoSQL, and how to handle sharding, replication, and eventual consistency. Mention how the schema supports features like surge pricing and ride history.

Key Points to Mention

  • Use of geospatial indexes (e.g., PostGIS, Redis GEO) for efficient nearby driver queries.
  • Separation of transactional data (trips, payments) from real-time location data for scalability.
  • Handling of trip state transitions (requested, accepted, ongoing, completed) with timestamps.
  • Indexing strategies for common queries: rider trip history, driver earnings, and active trips.
  • Consideration of data partitioning/sharding by region or time for large-scale systems.
  • Trade-offs between strong consistency for payments and eventual consistency for location updates.

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