educative.io

Why would storing question and answers relational SQL DB?

Why would Quora use relation db like MySQL to store questions and answers? It would have scaling issues with popular questions and answers if we are maintaining foreign key concept. Also, user typically write question and answer once we should use some kind of read heavy db. Consistency can maintain if we do quorum writes and read.


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Initial Design of Quora

Hi Avinash,

Quora opted for a relational database like MySQL to store questions and answers due to its strong data integrity, ACID compliance, and structured data support. Features like foreign key constraints maintain data integrity.

Despite scaling challenges, strategies like sharding, caching, and query optimization ensure scalability. Increasing user numbers can be managed through these scaling techniques to maintain performance and reliability.

We hope Educative has inspired you to further your learning. Please drop us a note if you have any other questions or concerns.