title: SQL vs NoSQL
tags: Database

Comparision

SQL (RDBMS database management system)

Usage

  • Already sure about schema, won't change in the future
  • Relation between data is important
  • Hope to read data more efficiently, and might use "JOIN" frequently in the future
  • Prefer accuracy and consistency (ACID) of data operation

NoSQL

Feature

  • Don't have to pre-define data schema and relation between data
  • You can add columns freely, don't have to correct past data documents
  • You can define document structure freely

Usage

  • You wanna start a small project and test your idea
  • Not sure yet your schema, very likely to adjust in the future
  • No complicated relation between data, don't have to use "JOIN" in the future
  • Prefer reading speed and availability over ACID

Example

  • Facebook has to deal with tons of "like", but these like don't have to be seen by all the users at the same time, we just have to make sure all the user can get the same result in the end. So in this case, we can choose NoSQL.
Select a repo