Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 3.13 KB

File metadata and controls

52 lines (40 loc) · 3.13 KB

NoSQL databases

NoSQL database types

  • Key-value stores: simplest, item stored in the form of key/value pairs. Each Key is unique and accepts only strings, whereas the value corresponding to the particular Key can accept String, JSON, XML, etc.
    • Use Case: Session info, user preference, shopping carts, produce recommendations, etc
    • Products: Redis, Voldemort, Riak, and Amazon’s Dynamo
  • Document stores: extension of key-value store, pair each key with a complex data structure known as a document (i.e. JSON, XML, etc)
    • Use Case: User profiles, Management of content, etc
    • Products: MongoDB and CouchDB
  • Column-oriented database: store columns of data together instead of rows and are optimized for queries over large datasets
    • Use Case: User Preferences, Business Intelligence, Managing data warehouses, etc
    • Products: Cassandra, HBase, Hypertable, Google's BigTable
  • Graph database: store information about networks, such as social connections
    • Use Case: Social Networking, Recommendation Engine, Logistics, Risk Assessment, Fraud detection, etc
    • Products: Neo4J and HyperGraphDB

NoSQL database features

  • Different types for different use case
  • Distributed
  • Flexible Schema
  • Eliminated Downtime
  • High Scalability

Cassandra

  • Cassandra is de-centralized, which means all nodes are the same (its called server-symmetry). There is no leader-follower structure, all the nodes follows P2P (peer to peer) gossip protocol, so its highly available
  • Cassandra is highly scalable, new node will automatically be discovered and there is no reboot needed

Cassandra vs MongoDB

Difference Cassandra MongoDB
DB structure Unstructured data JSON-like documents
Index Primary Key, but no secondary indexes supported Index, if no index then each file is searched which could slow down read times
Query CQL (like SQL) More like programming
Replication leader-leader leader-follower with auto-election

Reference