Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

NoSQL in Perspective


Published on

Published in: Technology
  • Be the first to comment

NoSQL in Perspective

  1. 1. NoSQL in Perspective Jeff Smith
  2. 2. NoSQL on Wikipedia92 databases8 types6 sub-types
  3. 3. Easy QuestionsIs this a graph?Do I already have XML or JSON?Is this a caching problem?
  4. 4. Paul Grahamon Programming Languages Lisp C
  5. 5. Math ProblemLisp is just math.Math doesnt get stale.What in databases is just math?
  6. 6. Putting the R in RDBMSes Relation Attributes Tuples
  7. 7. Database AnalogyC is to LispasRelational Algebra is to Relational CalculusC: Lisp::Relational Algebra: Relational Calculus
  8. 8. Relational Algebra in ActionRelational Algebra:R ⋉S = { t : t R, s S, Fun (t s) }SQL:SELECT * FROM audience WHERE clue > 0;
  9. 9. Relational Calculus in Action?Relational Calculus:{ t : {name} | ∃ s : {name, wage} ( Employee(s) ∧ s.wage = 50.000 ∧ = ) }Relevant Implemented Language:This space under construction.
  10. 10. Relational Model UtilityEssentially, all models are wrong, but some are useful.- George E. P. Box
  11. 11. When relations are wrongSparse dataIrregular dataPoorly understood interrelationshipsNo definable indexesBig dataNo vertically scalable hardware
  12. 12. Papers Read Around the WorldGoogles BigTable: bigtable.htmlAmazons Dynamo: 2007/10/amazons_dynamo.html
  13. 13. Lessons from Functional ProgrammingMapReduce: mapreduce.html
  14. 14. MapReducemap(String key, String value):// key: document name// value: document contentsfor each word w in value: EmitIntermediate(w, "1");reduce(String key, Iterator values):// key: a word// values: a list of countsint result = 0;for each v in values: result += ParseInt(v);Emit(AsString(result)); [1]
  15. 15. CAP TheoremConsistencyAvailabilityPartition tolerance
  16. 16. CAP Theorem? Availability Consistency Partition Tolerance
  17. 17. Sacrifice Availability Consistency Partition Tolerance
  18. 18. Then, sacrifice what? Availability Availability Consistency Partition Tolerance
  19. 19. PACELCIn the event of a Partition, does the system prioritize Availability or ConsistencyElse does the system prioritize Latency or Consistency?
  20. 20. PACELC as a Tree Partition ElseAvailability Consistency Latency Consistency
  21. 21. Traditional RDBMSes: PC/EC Partition Else Consistency Consistency
  22. 22. Eventually Consistent: PA/EL Partition ElseAvailability Latency
  23. 23. ELC: Replication Options1. Update all nodes2. Update the master node first3. Update an arbitrary node first
  24. 24. Best of both worlds? SQL
  25. 25. HadoopDB
  26. 26. MySQL Cluster
  27. 27. Riak DemoN: persisted copiesR: read copiesW: write copiesStrong Consistency: R+W>N
  28. 28. Thanks Jeff Smith