Non-Relational Database Stores

From OpenSQLCamp

Jump to: navigation, search

Igal Koshevoy, Pragmaticraft Comparing Non-Relational Databases: MongoDB, Tokya Tyrant, CouchDB

Note taker: dukeleto

(Starts out with "what i do" and "what my biases are")

Performance + scalability of NRD

Relational: SQL

Key-value: hash struct

Document-oriented: mongo, couch, etc

why?

  • easier replication and scaling
  • incremental schema migrations
  • better performance, sometimes

why not?

  • transaction and durability, not so good
  • newfangled, young and brash


non-relational coding patterns

  • denormalization to reduce finds/queries
  • track schema versions per doc
  • use as need incremental migrations
  • store assocations externally or internally
( interjection: deep joins vs. shallow joins )
  • sharding data
  • MongoDB

GNU APL 3.0 No ACID + MVCC not the fastest good community map reduce master-slaves shards multiple indexes replica pairs

( code sample )

  • tokyo cabinet + tyrant

tokyocabinet.sourceforge.net LGPL 2.1 key-value, document-oriented

strings only simple queries specialized engines memcache-compatible API resilient: dual master transactions only on document store per port

  • couchdb

apache project apache license 2.0 scalable-multi-master mvcc+acid+versioned docs REST map reduce complex queries

very very slow (40x slower than tokyo tyrant) NOTE: benchmarks with TT did not include sync'ing to disk NOTES on above NOTE: 1. There's no way to force a sync of a Tokyo Tyrant "table", at least not with the Rufus Ruby driver. It has its own logic for determining when to sync. 2. All contenders were allowed to use their default sync settings.

must create views harder to use site + docs: fail harder to use

hovercraft = erlang (same machine)

cassandra - linear algorithm to drop in more boxes

Personal tools