a beginners guide to nosql
TRANSCRIPT
![Page 1: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/1.jpg)
THE BEGINNERS GUIDE TO
noSQL
![Page 2: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/2.jpg)
THE
WHY WE ARE STORING MORE DATA NOW THAN WE EVER HAVE
BEFORE
![Page 3: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/3.jpg)
THE
WHY WE ARE STORING MORE DATA NOW THAN WE EVER HAVE
BEFORE
CONNECTIONS BETWEEN OUR DATA ARE GROWING ALL THE
TIME
![Page 4: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/4.jpg)
THE
WHY WE ARE STORING MORE DATA NOW THAN WE EVER HAVE
BEFORE
CONNECTIONS BETWEEN OUR DATA ARE GROWING ALL THE
TIME
WE DON’T MAKE THINGS KNOWING THE STRUCTURE
FROM DAY 1
![Page 5: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/5.jpg)
THE
WHY WE ARE STORING MORE DATA NOW THAN WE EVER HAVE
BEFORE
CONNECTIONS BETWEEN OUR DATA ARE GROWING ALL THE
TIME
WE DON’T MAKE THINGS KNOWING THE STRUCTURE
FROM DAY 1
SERVER ARCHITECTURE IS NOW AT A STAGE WHERE WE CAN
TAKE ADVANTAGE OF IT
![Page 6: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/6.jpg)
salary lists
most web applications
social networks
semantic trading
SiZE
Complexity
relational databases
![Page 7: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/7.jpg)
NOSQL
USE CASESLARGE DATA VOLUMES
MASSIVELY DISTRIBUTED ARCHITECTURE REQUIRED TO STORE THE DATA
GOOGLE, AMAZON, FACEBOOK, 100K SERVERS
![Page 8: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/8.jpg)
NOSQL
USE CASESLARGE DATA VOLUMES
MASSIVELY DISTRIBUTED ARCHITECTURE REQUIRED TO STORE THE DATA
GOOGLE, AMAZON, FACEBOOK, 100K SERVERS
EXTREME QUERY WORKLOAD IMPOSSIBLE TO EFFICIENTLY DO JOINS AT THAT
SCALE WITH AN RDBMS
![Page 9: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/9.jpg)
NOSQL
USE CASESLARGE DATA VOLUMES
MASSIVELY DISTRIBUTED ARCHITECTURE REQUIRED TO STORE THE DATA
GOOGLE, AMAZON, FACEBOOK, 100K SERVERS
EXTREME QUERY WORKLOAD IMPOSSIBLE TO EFFICIENTLY DO JOINS AT THAT
SCALE WITH AN RDBMS
SCHEMA EVOLUTION SCEMA FLEXIBILITY IS NOT TRIVIAL AT A LARGE
SCALE BUT IT CAN BE WITH NO SQL
![Page 10: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/10.jpg)
NOSQL
PROS AND CONSPROS
MASSIVE SCALABILITY HIGH AVAILABILITY
LOWER COST SCHEMA FLEXIBILITY
SPARCE AND SEMI STRUCTURED DATA
![Page 11: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/11.jpg)
NOSQL
PROS AND CONSPROS
MASSIVE SCALABILITY HIGH AVAILABILITY
LOWER COST SCHEMA FLEXIBILITY
SPARCE AND SEMI STRUCTURED DATA
CONS LIMITED QUERY CAPABILITIES
NOT STANDARDISED (PORTABILITY MAY BE AN ISSUE) STILL A DEVELOPING TECHNOLOGY
![Page 12: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/12.jpg)
NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL BIGTABLE NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL
NOSQL NOSQL KEY VALUE NOSQL NO NOSQL NOSQL NOSQL NOSQL NOSQL
NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL
NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL GRAPHDB NOSQL NOSQL NOSQL
NOSQL NOSQL NOSQL NOSQL NOSQL
NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL NOSQL DOCUMENT NOSQL
FOUREMERGING TRENDS IN
NOSQL DATABASES
![Page 13: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/13.jpg)
BUT FIRST…IMAGINE A LIBRARY
LOTS OF DIFFERENT FLOORS
DIFFERENT SECTIONS ON EACH FLOOR
DIFFERENT BOOKSHELVES IN EACH SECTION
LOTS OF BOOKS ON EACH SHELF
LOTS OF PAGES IN EACH BOOK
LOTS OF WORDS ON EACH PAGE
EVERYTHING IS WELL ORGANISED AND EVERYTHING HAS A SPACE
![Page 14: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/14.jpg)
BUT FIRST…IMAGINE A LIBRARY
WHAT HAPPENS IF WE BUY TOO MANY BOOKS!?
(THE WORLD EXPLODES AND THE KITTENS WIN)
![Page 15: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/15.jpg)
BUT FIRST…IMAGINE A LIBRARY
WHAT HAPPENS IF WE WANT TO STORE CDS ALL OF A SUDDEN!?
(THE WORLD EXPLODES AND THE KITTENS WIN)
![Page 16: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/16.jpg)
BUT FIRST…IMAGINE A LIBRARY
WHAT HAPPENS IF WE WANT TO GET RID OF ALL BOOKS THAT MENTION KITTENS
(KITTENS STILL WIN)
![Page 17: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/17.jpg)
BIGBEHAVES LIKE A STANDARD RELATIONAL DATABASE BUT WITH A SLIGHT CHANGE
http://research.google.com/archive/bigtable.html
http://research.google.com/archive/spanner.html
DESIGNED TO WORK WITH A LOT OF DATA…A REALLY BIG CRAP TON
CREATED BY GOOGLE AND NOW USED BY LOTS OF OTHERS
TABLE
![Page 18: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/18.jpg)
THIS IS A STANDARD RELATIONAL DATABASE
BIGTABLE
THIS IS A BIG TABLE DATABASE
(AND NOW THE NAME MAKES SENCE!)
![Page 19: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/19.jpg)
BIGTABLE
“A Bigtable is a sparse, distributed, persistent multidimensional sorted map. The map is indexed by a
row key, column key, and a timestamp; each value in the map is an uninterpreted array of bytes.”
![Page 20: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/20.jpg)
BIGTABLE
“A Bigtable is a sparse, distributed, persistent multidimensional sorted map. The map is indexed by a
row key, column key, and a timestamp; each value in the map is an uninterpreted array of bytes.”
![Page 21: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/21.jpg)
BIGTABLE
“A Bigtable is a sparse, distributed, persistent multidimensional sorted map. The map is indexed by a
row key, column key, and a timestamp; each value in the map is an uninterpreted array of bytes.”
![Page 22: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/22.jpg)
KEYVALUE
AGAIN, DESIGNED TO WORK WITH A LOT OF DATA
EACH BIT OF DATA IS STORED IN A SINGLE COLLECTION
EACH COLLECTION CAN HAVE DIFFERENT TYPES OF DATA
![Page 23: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/23.jpg)
KEYVALUE
A CB D E
![Page 24: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/24.jpg)
KEYVALUE
A C D E
OUR VALUES ARE HIDDEN INSIDE THE KEYS
TO FIND OUT WHAT THEY ARE WE NEED TO QUERY THEM
What is in Key B?
The Triangle
B
![Page 25: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/25.jpg)
KEYVALUE
(VOLDERMORT)
![Page 26: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/26.jpg)
DOCUMENTSTORE
DESIGNED TO WORK WITH A LOT OF DATA (BEGINNING TO NOTICE A THEME?)
VERY SIMILAR TO A KEY VALUE DATABASE
MAIN DIFFERENCE IS THAT YOU CAN ACTUALLY SEE THE VALUES
![Page 27: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/27.jpg)
DOCUMENTSTORE
A CB D E
![Page 28: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/28.jpg)
DOCUMENTSTORE
A CB D E
Bring me the triangles
Yes m’lord.
![Page 29: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/29.jpg)
SID
E N
OT
E
REMEMBER HOW SQL DATABASES ARE LIBRARIES?
NO SQL IS MORE LIKE A BAG OF CATS!
![Page 30: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/30.jpg)
SID
E N
OT
E
colour: tabby name: Gunther
colour: ginger name: Mylo
colour: grey name: Ruffus age: kitten
colour: ginger(ish) name: Fred age: kitten
colour: ginger(ish) name: Quentin legs: 3
WE CAN ADD IN FIELDS AS AND
WHEN WE NEED THEM
![Page 31: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/31.jpg)
DOCUMENTSTORE
A CB D E
Bring me the KITTENS!
Of course m’lord.
![Page 32: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/32.jpg)
DOCUMENTSTORE
![Page 33: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/33.jpg)
GRAPHDATABASE
FOCUS HERE IS ON MODELLING THE STRUCTURE OF THE DATA
INSPIRED BY GRAPH THEORY (GO MATHS!)
SCALES REALLY WELL TO THE STRUCTURE OF THE DATA
![Page 34: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/34.jpg)
GRAPHDATABASE
![Page 35: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/35.jpg)
GRAPHDATABASE
![Page 36: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/36.jpg)
GRAPHDATABASE
WORKS_WITHWORKS_WITH
OWNS
OWNS
CARSHARES IN
![Page 37: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/37.jpg)
GRAPHDATABASE
name: “Michael” twitter: “@mrmike
name: “John” twitter:”@mrjohn”
brand: “Toyota” currentState: “Broken”
brand: “Vauxhall” currentState: “Working”
WORKS_WITHWORKS_WITH
OWNS
OWNS
CARSHARES IN
![Page 38: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/38.jpg)
GRAPHDATABASE
name: “Michael” twitter: “@mrmike
name: “John” twitter:”@mrjohn”
brand: “Toyota” currentState: “Broken”
brand: “Vauxhall” currentState: “Working”
WORKS_WITHWORKS_WITH
OWNS propertyType: “car”
OWNS propertyType: “car”CARSHARES IN
![Page 39: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/39.jpg)
GRAPHDATABASE
![Page 40: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/40.jpg)
key/value store
bigtable clone
document database
graph database
SiZE
Complexity
![Page 41: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/41.jpg)
key/value store
bigtable clone
document database
graph database
SiZE
Complexity
>90% of use cases
![Page 42: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/42.jpg)
WHEN TO USE
NOSQLAND WHEN TO USE
SQL
![Page 43: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/43.jpg)
THE BASICSHigh availability and disaster recovery are a must
Understand the pros and cons of each design model
Don’t pick something just because it is new Do you remember the zune?
Don’t pick something based JUST on performance
![Page 44: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/44.jpg)
SQLHigh performance for transactions. Think ACID
Highly structured, very portable
Small amounts of dataSMALL IS LESS THAN 500GB
Supports many tables with different types of data
Can fetch ordered data
Compatible with lots of tools
THE GOOD
![Page 45: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/45.jpg)
ATOMICITY
CONSISTENCY
ISOLATION
DURABILITY
SQL
![Page 46: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/46.jpg)
SQLHigh performance for transactions. Think ACID
Highly structured, very portable
Small amounts of dataSMALL IS LESS THAN 500GB
Supports many tables with different types of data
Can fetch ordered data
Compatible with lots of tools
THE GOOD
![Page 47: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/47.jpg)
SQLComplex queries take a long time
The relational model takes a long time to learn
Not really scalable
Not suited for rapid development
THE BAD
![Page 48: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/48.jpg)
noSQLFits well for volatile data
High read and write throughput
Scales really well
Rapid development is possible
In general it’s faster than SQL
THE GOOD
![Page 49: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/49.jpg)
BASICALLY
AVAILABLE
SOFT STATE
EVENTUALLY CONSISTENT
noSQL
![Page 50: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/50.jpg)
noSQLFits well for volatile data
High read and write throughput
Scales really well
Rapid development is possible
In general it’s faster than SQL
THE GOOD
![Page 51: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/51.jpg)
noSQLKey/Value pairs need to be packed/unpacked all the time
Still working on getting security for these working as well as SQL
Lack of relations from one key to another
THE GOOD
![Page 52: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/52.jpg)
tl;dr
so use both, but think about when you want to use them!
works great, can’t scale for large data
works great, doesn't fit all situations
SQL
noSQL
![Page 53: A Beginners Guide to noSQL](https://reader030.vdocument.in/reader030/viewer/2022033022/586e73cc1a28ab99598b55d9/html5/thumbnails/53.jpg)
A lot of this content is loving ripped from lots of other (more impressive)
presentations that are already on SlideShare - you should check them out!
FINALLY