📋
space
  • SDE Interview
  • Multi-threading
    • Mutex vs Semorphore
    • Thread vs process
  • Design Pattern
  • Java
    • Polymorphism
    • Encapsulation
    • Inheritance
    • Override vs overload
  • MySQL
    • DB transaction
  • Data Structure
    • Design hashset
    • AVL / red black tree
    • LinkedList vs arrayList
    • HashMap vs HashTable
    • Binary Tree
    • Heap
  • System Design
    • Session Cookie
    • GFS / BigTable / MapReduce
    • Zookeeper
    • gRPC vs thrift
    • Amazon RDS vs Oracle
    • Microservices
    • REST vs RPC
    • Database design
    • idempotent in HTTP
    • Optimistic locking / Pessimistic locking
    • Partitioning / Sharding data
    • Consistent Hashing
    • Case Study
      • Design Delay Task scheduler
      • Design View Count
      • Design Twitter
      • Design Web Crawler
      • Design Uber
      • Design Netflix
      • Design Google Doc
      • Design Monitoring System
      • Design Dropbox
      • Distributed Lock
      • Design Instagram
      • Design Yelp
      • Design Amazon
      • Design Google Search
      • Distributed Database System Key Value Store
      • Design Facebook message / Whatsapp
      • Design Logging Systems
      • Design Movie booking system
      • Design Google Autocomplete Feature
      • Design Twitter Search
    • Message Broker
      • Kafka
    • Design Data Intensive Application
      • Chapter 8
    • SQL vs NoSQL
      • Cassandra
      • MongoDB vs Cassandra vs MySQL vs HBase
    • TCP vs UDP
    • Load Balancer
    • Cache
      • Memcached
      • Redis
    • DNS
    • CDN
    • Strong consistency vs eventual consistency
    • Scalability
Powered by GitBook
On this page
  • Integration considerations
  • Scaling requirements
  • Support considerations
  • Budget considerations ? Probably not
  • CAP considerations
  • Simplicity
  • An example
  • Another example
  • Another example
  • You try it!

Was this helpful?

  1. System Design
  2. SQL vs NoSQL

MongoDB vs Cassandra vs MySQL vs HBase

how to choose the right database?

PreviousCassandraNextTCP vs UDP

Last updated 4 years ago

Was this helpful?

Integration considerations

Scaling requirements

Support considerations

Budget considerations ? Probably not

CAP considerations

availability

consistency partition tolerance

Simplicity

An example

You are building an internal phone directory app

  • scale: limited

  • consistency: eventual is fine

  • availability requirements: not mission critical

  • MySQL is probably already installed in your web server

MySQL: simple, cheap

Another example

  • You want to mine web server logs for interesting patterns

  • what are the most popular times of day? what's the average session length?

  • import raw data into HDFS cluster, using Hive to do to query, no need to use external data base

Another example

You try it!

MongoDB: support , consistency, partition tolerance