System Design
  • Introduction
  • Basics
    • Key Characteristics of Distributed Systems
    • Load Balancing
    • Reverse Proxy
    • Cache
    • Sharding or Data Partitioning
    • Index
    • Redundancy and Replication
    • SQL vs NoSQL
  • Advanced
    • The Difference between SLI, SLO, and SLA
    • Consistent Hashing
    • Server-to-client Communication
    • Data Sharding
  • Database
    • SQL
    • ACID
    • Data Partitioning
  • News Feed
    • Design a News Feed System
    • Timeline creation with sharded data
    • Facebook News Feed
    • Twitter News Feed (Timeline)
    • How does facebook rank news feed?
  • Mint
    • Design Mint
  • Web Crawler
    • Design a web crawler
    • Design a decentralized web crawler
  • TODO
    • TODO
    • Elastic Search
    • Lucene
    • twitter-snowflake
Powered by GitBook
On this page
  • High level differences
  • Storage
  • Schema
  • Querying
  • Scalability
  • Reliability or ACID Compliancy (Atomicity, Consistency, Isolation, Durability)
  • Ideal Applications
  • Projects where SQL is ideal
  • Projects where NoSQL is ideal

Was this helpful?

  1. Basics

SQL vs NoSQL

SQL: relational database store data in tables which are formed in rows and columns.

NoSQL:

  • key-value

  • document

  • graph

High level differences

Storage

SQL: table

NoSQL: key-value, document, graph.

Schema

SQL: fixed

NoSQL: dynamic

Querying

SQL: uses SQL (structured query language)

NoSQL: UnQL (unstructured query language).

Scalability

SQL: vertically scalable. Hard to horizontally scale

NoSQL: horizontally scalable.

Reliability or ACID Compliancy (Atomicity, Consistency, Isolation, Durability)

SQL: ACID compliant

NoSQL: sacrifice ACID compliance for performance and scalability.

Ideal Applications

Projects where SQL is ideal

  • logical related discrete data requirements which can be identified up-front

  • data integrity is essential

  • standards-based proven technology with good developer experience and support.

Projects where NoSQL is ideal

  • unrelated, indeterminate or evolving data requirements

  • simpler or looser project objectives, able to start coding immediately

  • speed and scalability is imperative.

  • Rapid ingest of clickstream and log data

  • Leaderboard or scoring data

  • Temporary data, such as a shopping cart

  • Frequently accessed ('hot') tables

  • Metadata/lookup tables

PreviousRedundancy and ReplicationNextThe Difference between SLI, SLO, and SLA

Last updated 4 years ago

Was this helpful?

https://www.sitepoint.com/sql-vs-nosql-differences/
https://github.com/donnemartin/system-design-primer#sql-or-nosql