DEV Community

Paresh
Paresh

Posted on

RDBMS or NoSQL: The question that pops up with every new project!

Alt Text

Barun is starting his next software development assignment soon, but his biggest worry is - SQL or NoSQL and he is pondering about these questions:

  • Which database to use for this new project?

  • Should I use relational database or NoSQL?

  • MongoDB is nice, it is schema-less and it does not require creating tables and normalize the structure, should I just select it for this project?

  • Or whether I just use cloud-native databases like Amazon DynamoDB or Cosmos DB?

  • No wait, I heard Redis can also be used for persistence and it is a key-value pair so that may also fit well here! The choices are endless...

Have you ever come across these questions or a debate on which database is right for your project? The decision depends on number of factors and there are dozens of articles available over internet explaining pros and cons of different options. I am not going to repeat them here. I am rather interested in documenting what some of the popular internet apps are using as their data store. I'd done this exercise in the past, but lost the record. While doing this exercise again, I thought this could be useful for wider #DEVCommunity.

It would be interesting to know from you if you have gone through the process of making decision on choosing the right data store for your application. Feel free to add your comments to build this knowledge base.

  • Twitter - Twitter was built on MySQL and everything was stored in a single instance of database. However, as platform evolved, it is using number of different database technologies - MySQL, PostgreSQL, Vertica, Blobstore, Graph store, Hadoop. You can read more information about this here

  • Facebook - MySQL, Memcached, Haystack (for photo storage), Hadoop and Hive. Read more about complete technology stack used by Facebook here

  • Youtube - MySQL, Bigtable

  • LinkedIn - traditionally used Oracle and key-value stores such as Voldemort. But then moved to distributed data store, Espresso.

  • Instagram - Instagram mainly uses two database systems: PostgreSQL and Cassandra.

  • DEV.together - PostgreSQL as primary datastore and Redis for cached data.

Note: this information is collected from different forums, engineering blogs and Q&A sites, if you think anything is incorrect, feel free to point out, I will be happy to update the post.

Top comments (8)

Collapse
 
jitenpansara profile image
jitenpansara

Good one Paresh. Bit surprised that popular internet apps are not using SQL and some of them which used Oracle are moved out of it.

Collapse
 
pareshjoshi profile image
Paresh

I think it depends on the type of data. Also, many apps use hybrid approach because they have structured as well unstructured data.

Collapse
 
jitenpansara profile image
jitenpansara

Can you share examples of such cases?

Thread Thread
 
pareshjoshi profile image
Paresh

Take Twitter or Facebook for example. See the links given in the post to read more about their architecture.

Collapse
 
pareshjoshi profile image
Paresh

@ben What does DEV.to use for its backend store?

Collapse
 
helenanders26 profile image
Helen Anderson

You can read more about the Dev stack in the docs here -> docs.dev.to/technical-overview/stack/

Collapse
 
pareshjoshi profile image
Paresh

Thanks. I will update my post to include Dev.to as well

Collapse
 
princebillygk profile image
Prince Billy Graham Karmoker

Following