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.

EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage

670 views

Published on

This presentation is Part 18 of the EWD 3 Training Course. It examines how the 4 main NoSQL database types can be modelled using a Global Storage Database

Published in: Software

EWD 3 Training Course Part 18: Modelling NoSQL Databases using Global Storage

  1. 1. Copyright © 2016 M/Gateway Developments Ltd EWD 3 Training Course Part 18 Modelling NoSQL Databases using Global Storage Rob Tweed Director, M/Gateway Developments Ltd Twitter: @rtweed
  2. 2. Copyright © 2016 M/Gateway Developments Ltd NoSQL Databases • 4 Main Models – Key/Value Store – Columnar – Graph – Document
  3. 3. Copyright © 2016 M/Gateway Developments Ltd NoSQL Databases • The following are just examples on how you might model these with Global Storage – No one way to do it – May be better ways to do it! – Aim is to demonstrate just how flexible and capable a Global Storage database really is
  4. 4. Copyright © 2016 M/Gateway Developments Ltd telephone "617-555-1414" "Tweed, Rob" "211-555-9012" "James, George" Key/Value Store
  5. 5. Copyright © 2016 M/Gateway Developments Ltd "617-555-1414" "name" "Tweed, Rob" "address" "112 Beacon Street, Boston" "211-555-9012" "name" "James, George" "address" "5308, 12th Avenue, Brooklyn" telephone More Complex Key/Value Store
  6. 6. Copyright © 2016 M/Gateway Developments Ltd Indexing Global Storage databases do not index automatically You create your own indices using Global Storage
  7. 7. Copyright © 2016 M/Gateway Developments Ltd "617-555-1414" "name" "Tweed, Rob" "address" "112 Beacon Street, Boston" "211-555-9012" "name" "James, George" "address" "5308, 12th Avenue, Brooklyn" telephone "James, George" nameIndex Indexing
  8. 8. Copyright © 2016 M/Gateway Developments Ltd "617-555-1414" "name" "Tweed, Rob" "address" "112 Beacon Street, Boston" "211-555-9012" "name" "James, George" "address" "5308, 12th Avenue, Brooklyn" telephone "James, George" nameIndex """211-555-9012" Indexing
  9. 9. Copyright © 2016 M/Gateway Developments Ltd "617-555-1414" "name" "Tweed, Rob" "address" "112 Beacon Street, Boston" "211-555-9012" "name" "James, George" "address" "5308, 12th Avenue, Brooklyn" telephone "James, George" nameIndex """211-555-9012" Indexing "Tweed, Rob" """617-555-1414"
  10. 10. Copyright © 2016 M/Gateway Developments Ltd "617-555-1414" "name" "Tweed, Rob" "address" "112 Beacon Street, Boston" "211-555-9012" "name" "James, George" "address" "5308, 12th Avenue, Brooklyn" telephone "James, George" nameIndex """211-555-9012" Indexing """211-863-3932" """224-543-5431" "Tweed, Rob" """617-555-1414"
  11. 11. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  12. 12. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  13. 13. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  14. 14. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  15. 15. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  16. 16. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  17. 17. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  18. 18. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  19. 19. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Rob George John
  20. 20. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 5 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Chris Rob George John
  21. 21. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 6 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 Linked List Chris Rob George John
  22. 22. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 6 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 6 "value" "Chris" Linked List Chris Rob George John
  23. 23. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 6 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 6 "nextNode" 5 "value" "Chris" Linked List Chris Rob George John
  24. 24. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 5 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 6 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 6 "nextNode" 5 "value" "Chris" Linked List Chris Rob George John "previousNode" 6
  25. 25. Copyright © 2016 M/Gateway Developments Ltd "firstNode" 6 "lastNode" 2 "node" 4 list "myList" "nodeCounter" 6 "nextNode" 2 "previousNode" 5 "value" "George" 5 "nextNode" 4 "value" "Rob" 2 "value" "John" "previousNode" 4 6 "nextNode" 5 "value" "Chris" Linked List Chris Rob George John "previousNode" 6
  26. 26. Copyright © 2016 M/Gateway Developments Ltd 1 1 "First Cell" 3 "Third Cell" ^table "myTable" Table Name Row No Column No Cell Value 5 "Fifth Cell" 2 2 "Second Cell" 3 "Third Cell" 3 4 "Fourth Cell" 5 "Fifth Cell" Tabular / Columnar
  27. 27. Copyright © 2016 M/Gateway Developments Ltd 1 7 2 name = "Rob" name = "George" name = "John"disclosure = public age = 3 days disclosure = public age = 2 years Graph
  28. 28. Copyright © 2016 M/Gateway Developments Ltd 1 7 2 name = "Rob" name = "George" name = "John"disclosure = public age = 3 days disclosure = public age = 2 years Graph 1 person 2 7 "name" "Rob" "knows" 2 7 "" "disclosure" "public" "timestamp" "2008-08-16T12:23:01Z" "" "name" "John" "name" "George" "knows" 2 "" "disclosure" "public" "timestamp" "2009-12-16T10:06:44Z"
  29. 29. Copyright © 2016 M/Gateway Developments Ltd 1 7 2 name = "Rob" name = "George" name = "John"disclosure = public age = 3 days disclosure = public age = 2 years Graph 1 person 2 7 "name" "Rob" "knows" 2 7 "" "disclosure" "public" "timestamp" "2008-08-16T12:23:01Z" "" "name" "John" "name" "George" "knows" 2 "" "disclosure" "public" "timestamp" "2009-12-16T10:06:44Z"
  30. 30. Copyright © 2016 M/Gateway Developments Ltd 1 7 2 name = "Rob" name = "George" name = "John"disclosure = public age = 3 days disclosure = public age = 2 years Graph 1 person 2 7 "name" "Rob" "knows" 2 7 "" "disclosure" "public" "timestamp" "2008-08-16T12:23:01Z" "" "name" "John" "name" "George" "knows" 2 "" "disclosure" "public" "timestamp" "2009-12-16T10:06:44Z"
  31. 31. Copyright © 2016 M/Gateway Developments Ltd 1 7 2 name = "Rob" name = "George" name = "John"disclosure = public age = 3 days disclosure = public age = 2 years Graph 1 person 2 7 "name" "Rob" "knows" 2 7 "" "disclosure" "public" "timestamp" "2008-08-16T12:23:01Z" "" "name" "John" "name" "George" "knows" 2 "" "disclosure" "public" "timestamp" "2009-12-16T10:06:44Z"
  32. 32. Copyright © 2016 M/Gateway Developments Ltd 1 7 2 name = "Rob" name = "George" name = "John"disclosure = public age = 3 days disclosure = public age = 2 years Graph 1 person 2 7 "name" "Rob" "knows" 2 7 "" "disclosure" "public" "timestamp" "2008-08-16T12:23:01Z" "" "name" "John" "name" "George" "knows" 2 "" "disclosure" "public" "timestamp" "2009-12-16T10:06:44Z"
  33. 33. Copyright © 2016 M/Gateway Developments Ltd 1 7 2 name = "Rob" name = "George" name = "John"disclosure = public age = 3 days disclosure = public age = 2 years Graph 1 person 2 7 "name" "Rob" "knows" 2 7 "" "disclosure" "public" "timestamp" "2008-08-16T12:23:01Z" "" "name" "John" "name" "George" "knows" 2 "" "disclosure" "public" "timestamp" "2009-12-16T10:06:44Z"
  34. 34. Copyright © 2016 M/Gateway Developments Ltd Document Database myGlobal "a" 123 "b" "c2" "foo2" "d" "c1" "foo" "e2" "e1" "f2" "bar2" "f1" "bar1" "f2" "bar2" "f1" "bar1" "f3" "bar3" myGlobal = { a: 123, b: { c1: 'foo', c2: 'foo2' } d: { e1: { f1: 'bar1', f2: 'bar2' }, e2: { f1: 'bar1', f2: 'bar2', f3: 'bar3' } } }
  35. 35. Copyright © 2016 M/Gateway Developments Ltd Other models possible • Relational – In fact Caché supports Relational storage, through modelling on Global Storage • Object – Also supported by Caché • Native XML Database – eXtc (now deprecated) • http://www.mgateway.com/eXtcOverview4_0.pdf • SimpleDB emulation – https://github.com/robtweed/node-mdb

×