http://disa.fi.muni.cz/vlastislav-dohnal/teaching/nosql-databases-fall-2019/ ● ○ ● ○ ○ ○ ○ ● ○ ○ ○ ● ○ ● ○ ID primary key ○ DATA BLOB ● ○ put(key, value) ○ value:= get(key) ○ delete(key) ● ● ○ ● ○ ■ ■ ■ ● ○ ● ○ ● ○ ● ○ ● basic info: http://db-engines.com/en/system/Riak website: http://basho.com/products/riak-overview ● ○ ○ ● http://localhost:8098/ ● ■ ■ ■ … ● curl -X method URL -d data ○ curl -X PUT http://localhost:8098/buckets/authors/keys/David -d '{"name": "David Novák", "affiliation": "MU"}' curl -X GET http://localhost:8098/buckets/authors/keys/David {"name": "David Novák", "affiliation": "MU"} curl -X DELETE http://localhost:8098/buckets/authors/keys/David ● ○ ■ ■ ■ … ○ ○ ● ○ ■ ● location location = ● ○ ○ ○ put( , value ) value := get( ) delete( ) userID userProfile sessionData shoppingCart ● item 1 ● item 2 Namespace User Key: Value: Namespace UserProfiles userID userProfile Key: Value: Namespace Sessions userID sessionData Key: Value: userID shoppingCart ● item 1 ● item 2 Namespace ShoppingCart Key: Value: ● ● ● ○ ■ ● ● ○ ● ○ ○ ● ○ ■ ○ ○ ■ node(key) = hash(key) mod (#_of_nodes - 1)node(key) = hash(key) mod (#_of_nodes) node 4 ● hash(key) key-value node 4node 1 node 2 node 3 ? ● #_of_nodes ○ ● node B hash: Keys ->[0,2n ]Hash value space (ring) node A node B node E node D node C 2n = 0 ● ○ ● ○ ● ○ ■ ○ ● ● ● ● ● source: http://docs.basho.com/riak/latest/theory/concepts/ ● ● ● source: http://docs.basho.com/riak/latest/theory/concepts/ ● ○ ○ ○ W > N/2 R + W > N ● ○ ○ ● ○ ○ ● ○ key1 nodeA, nodeB, nodeC ○ ■ get(key1) value ● value:= get(key1) ○ nodeB ○ nodeA nodeC ○ (key, value2)(key, value3)(key, value3) (key, value5)(key, value1)(key, value2)(key, value2)(key, value3)(key, value3) (key, value2)(key, value3)(key, value3)(key, value4)(key, value1)(key, value2) (key, value1) (key, value1) blue red green ● ● ○ ● ○ ● ● ○ ○ ● ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ● ○ ○ ● ● ○ ○ ■ ● ○ ○ ■ ○ ○ ■ ■ ○ ■ ○ ■ ■ (key, value2) [blue: 2, green: 1, red: 1] (key, value3) [blue: 2, green: 2, red: 1] (key, value3) [blue: 2, green: 2, red: 1] (key, value5) [blue: 2, green: 2, red: 2] (key, value1) [blue: 1, green: 1, red: 1] (key, value2) [blue: 2, green: 1, red: 1] (key, value2) [blue: 2, green: 1, red: 1] (key, value3) [blue: 2, green: 2, red: 1] (key, value3) [blue: 2, green: 2, red: 1] (key, value2) [blue: 2, green: 1, red: 1] (key, value3) [blue: 2, green: 2, red: 1] (key, value3) [blue: 2, green: 2, red: 1] (key, value4) [blue: 3, green: 2, red: 1] (key, value1) [blue: 1, green: 1, red: 1] (key, value2) [blue: 2, green: 1, red: 1] (key, value1) [blue: 1, green: 1, red: 1] blue red green ● ○ ● ● ○ ● ● ○ ○ ■ ■ ○ ○ ○ ● ○ ○ ○ ○ ■ ○ ○ ● ○ ○ ● ○ ○ ○ ● ● ○ ■ ○ ■ ● ○ ● ○ ○ ○ ○ ○ source: http://en.wikipedia.org/wiki/Isolation_(database_systems) ● ○ ○ ○ ○ ■ source: http://en.wikipedia.org/wiki/Multiversion_concurrency_control source: http://www.slideshare.net/quipo/nosql-databases-why-what-and-when ● ○ ■ ● ○ ■ ○ ○ ■ source: http://en.wikipedia.org/wiki/Snapshot_isolation http://infinispan.org/docs/7.0.x/user_guide/user_guide.html ● ○ ○ ■ source: http://en.wikipedia.org/wiki/2PC http://www.slideshare.net/quipo/nosql-databases-why-what-and-when ● ○ ○ ○ ● ○ … ○ ● ○ ● ○ ■ ● ○ ■ → ● ○ ■ ● ○ ■ ○ ○ ○ ○ ■ ● ○ ● ○ ● ○ ● ○ ● ○ ● ○ ○ ● ○ ● ○ ○ ● ○ ○ ● ○ ○ ● ○ ○ ● ○ ● ○ ○ ■ ● ○ ○ ● ○ ● ○ ○ ● ○ ● ○ ○ ○ ○ ○ ○ ○ ● I. Holubová, J. Kosek, K. Minařík, D. Novák. Big Data a NoSQL databáze. Praha: Grada Publishing, 2015. 288 p. ● Sadalage, P. J., & Fowler, M. (2012). NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence. Addison-Wesley Professional, 192 p. ● RNDr. Irena Holubova, Ph.D. MMF UK course NDBI040: Big Data Management and NoSQL Databases