Upgrade to Pro — share decks privately, control downloads, hide ads and more …

no:sql taxonomy

no:sql taxonomy

High level overview of nosql database and rough comparisons.
Targeted at nosql newbes.

Ran Tavory

June 27, 2012
Tweet

More Decks by Ran Tavory

Other Decks in Programming

Transcript

  1. WHAT’S WRONG WITH SQL? • Nothing really wrong • But

    some problems - easier to solved with no:sql • For example: • High scale (reads, write, data size) • Data structures (sorted sets, hashes) • Graph processing Thursday, June 28, 2012
  2. RELATIONAL DATABASES - SWISS ARMY KNIFE? • You used to

    be able to do everything with Relational Databases • Until you reach: • Scaling limits • $$$ limits • Flexibility limits • Performance limits Thursday, June 28, 2012
  3. NOSQL USE CASES • Large amounts of data (linear horizontal

    scalability) • Massive writes • Speedy key-value access • Graphs • High availability • Easier operations (well, for some...) • Easier for programmers Thursday, June 28, 2012
  4. WHO AM I? • Cassandra contributor • Cassandra user •

    Author of Hector - cassandra client • MongoDB user • MySQL, PostgreSQL user • Just a curious guy... Thursday, June 28, 2012
  5. KEY-VALUE CACHING • memcached • repcached • coherence • infinispan

    • eXtreme scale • jboss cache • velocity • Terracotta Thursday, June 28, 2012
  6. KEY-VALUE STORE • DynamoDB • voldemort • Dynomite • SubRecord

    • Mo8onDb • Dovetaildb • Tokyo Tyrant • lightcloud • NMDB • luxio • memcachedb • actord • Riak Basho Thursday, June 28, 2012
  7. DOCUMENT STORE • CouchDB • MongoDB • Jackrabbit • XML

    Databases • ThruDB • CloudKit • Perservere • Scalaris Thursday, June 28, 2012
  8. COLUMNAR STORES • BigTable • Hbase • Cassandra • Hypertable

    • KAI • OpenNeptune • Qbase • KDI Thursday, June 28, 2012
  9. GRAPH DATABASES • Neo4J • VertexDB • FlockDB • DEX

    • OrientDB Thursday, June 28, 2012
  10. CASSANDRA • Decentralized (p2p) • Very high scale • Column

    oriented • Replication and Multi-DC • Fault tolerant • Tunable consistency • Tunable Caching • MapReduce • Query language (CQL) • Thrift Thursday, June 28, 2012
  11. MONGODB • Document Database • Ad-hoc queries • Indexing •

    Replication, Sharding • MapReduce • File storage • Capped collections • Flexible schema Thursday, June 28, 2012
  12. REDIS • Key-Value store • Data structure server • (Mostly)

    in-memory • Very high performance • Master-slave setup • Pub/Sub • Atomic, fast operations: • Sets • Sorted Sets • Strings • Hashes Thursday, June 28, 2012
  13. MYSQL • ACID • Atomicity • Consistency • Isolation •

    Durability • Transactional • SQL • Stored Procedures • (Usually) optimized for reads • MySQL Cluster • NoSQL and SQL mix Thursday, June 28, 2012
  14. MYSQL - MONGO MySQL MongoDB Relational Schema Flexible document schema

    Relational, SQL Document, JavaScript Manual Sharding (+ MySQL Cluster) Auto Sharding Joins - Key’d updates - comparable Inserts and non-key’d - much faster Read friendly, writes slow Better for many writes Transactional - Better Tooling In progress.... Thursday, June 28, 2012
  15. MYSQL - CASSANDRA MySQL Cassandra Limited Scale Very high scale

    Slow writes, fast reads Fast reads, very fast writes SQL CQL (more limited) Ad-hoc query - Normalization Denormalization Consistent Eventually consistent Relational Columnar MySQL Cluster (?) Multi-DC, auto-sharding Thursday, June 28, 2012
  16. CASSANDRA - HBASE Cassandra HBase Very high scale Very high

    scale Eventually consistent Fully consistent Peer to peer Master-slave Simple(r) Ops Complex Ops (on top of HDFS) Atomic counters Atomic read, write, modify Thursday, June 28, 2012
  17. CASSANDRA - MONGO Cassandra MongoDB p2p master-slave column oriented DB

    document DB somewhat flex schema very flex schema very high scale medium scale - Geo-spatial indexing Limited query (and MapRed) dynamic queries (JS, MapRed) Thursday, June 28, 2012
  18. REDIS - MONGO Redis MongoDB Very fast fast Data Structures

    database document database Mainly Memory-DB Disk, memory-mapped files Small amounts of data larger data sets sets, sorted sets, hashes, pubsub etc - Transactions (to some extent) Object level transactions Expiry - Thursday, June 28, 2012
  19. COMPARE Scale API Ops Schema Consistency Cassandra very high columns,

    indexed, counters medium semi-flex eventual HBase very high columns, indexed, counters hard semi-flex strict Mongo high very flex easy flex object trans Redis small data structure operations easy flex value trans DynamoDB very high KV hosted KV eventual MySQL medium SQL easy strict transactional Thursday, June 28, 2012