Oceanvijai
Oceanvijai

Reputation: 393

What can be suitable DB schema for an application like quora?

I was reading some articles where Quora is using mySql as database but still manage to store data schema less. But I will like to know what would be the schema if its in a relational type schema and why wouldn't it fit.

I did my best to create a schema. I would like to know why it would not fit for Quora.

question_table (id, content, user_id); answer_table (id, content, question_id, user_id); comment_table (id, content, source_id, source_type, used_id); - since comment can be from question, answer and nested comment itself

All the table refer the same sequence for their ID column to help hierarchical search.

Other tables like like_table (id,source_id,user_id); vote_table (id,vote, user_id);

Can someone help me to learn, why wouldn't this fit an app like quora ?

Quora didnt straight away give their db design but they said its similaire to that of friend feed https://backchannel.org/blog/friendfeed-schemaless-mysql

Another good example is Pinterest

https://medium.com/@Pinterest_Engineering/sharding-pinterest-how-we-scaled-our-mysql-fleet-3f341e96ca6f

Other resources: https://www.quora.com/Why-does-Quora-use-MySQL-as-the-data-store-instead-of-NoSQLs-such-as-Cassandra-MongoDB-or-CouchDB-Are-they-doing-any-JOINs-over-MySQL-Are-there-plans-to-switch-to-another-DB

http://www.bigfastblog.com/quoras-technology-examined

Upvotes: 4

Views: 1334

Answers (0)

Related Questions