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.

Key-Value NoSQL Database

1,651 views

Published on

this presentation describe NoSQL data model and consistency topic and introduce Key-Value database

Published in: Technology
  • Login to see the comments

  • Be the first to like this

Key-Value NoSQL Database

  1. 1. Distributed Database
  2. 2. Data Model • Relation • The Dominant Data Model of Last Couple Decade • Table, Column, Rows • Cannot Nest One Tuple Within Another • Aggregate • Collection of related object that we wish to treat as a unit • Consistency Unit
  3. 3. Relational Data Model
  4. 4. Aggregate Data Model
  5. 5. • Aggregate-Ignorant • Relational Data Model • Graph • Aggregate-Oriented • Key-Value • Document • Column Family Data Model Types
  6. 6. Distribution Model • Single Server • Sharding (Horizontal Scalability) • Put different data on different node. • Replication • Take the same data and copies it over multiple node.
  7. 7. Sharding
  8. 8. Master-Slave Replication
  9. 9. Peer-to-Peer Replication
  10. 10. Combining Sharding and Replication
  11. 11. Combining Sharding and Replication
  12. 12. Consistency
  13. 13. Update Consistency • Write-Write Conflict • Lost Update • Pessimistic Consistency • Optimistic Consistency
  14. 14. Read Consistency
  15. 15. Replication Inconsistency
  16. 16. Relaxing Consistency • Eventual Consistency • Quorums • CAP Theorem • Consistency • Availability • Partition Tolerance
  17. 17. CAP Theorem
  18. 18. Key-Value Group A
  19. 19. What's Key-Value Store • Simple Hash Table • Collection of Key-Value Pair • Associate Array • The Key Unique Within Collection
  20. 20. Basic Operation • Insert Pair • Delete Pair • Update Value Of Existing Pair • Find Value Associate With a Particular Key
  21. 21. Performance Factor • The efficiency of the hashing function. • The design of the keys and the size of the values being stored and retrieved. • The distribution of data across partitions. • The functional patterns that applications follow to store and retrieve data.
  22. 22. Storing All the Data in a Single Bucket
  23. 23. Terminology – Oracle vs. Riak
  24. 24. Some of The Popular Key-Value Databases • Redis • Riak • Memcache DB • BerkeleyDB • HamsterDB • Amazon DynamoDB • Project Voldemort
  25. 25. Key-Value Store Features • Consistency • Consistency is applicable only for operations on a single key • Eventually Consistent in Distribute Implementation • Transaction • Quorum • Query • Structure Of Data • Scaling • Sharding • CAP
  26. 26. Suitable Use Case • Storing Session Information • User Profiles, Preferences • Shopping Cart Data
  27. 27. When Not to Use • Relation Among Data • Multioperation Transactions • Query by Data • Operations by Sets
  28. 28. Distributed, Masterless, Highly-Available Key-Value Store
  29. 29. Replication
  30. 30. Demo
  31. 31. Redis Features • Extremely Fast! • Ability to store more than just strings • Persistence • Replication • Built in LUA support
  32. 32. Demo

×