educative.io

Why Relation DB to store congestion data?

Why Relation DB to store congestion data? why not key-value store with segment id as a key?


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Detailed Design of Google Maps - Grokking Modern System Design Interview for Engineers & Managers

Hi Gaurav,

A relational database is used to store congestion data due to its relational nature, involving segment id, time of day, and congestion status. It allows complex queries, ensuring data integrity with ACID properties, and can be easily joined with other related data for a comprehensive traffic view. A key-value store, suitable for simple lookups, would struggle to achieve this.

Thank you.