SlideShare a Scribd company logo
NoSQL databases
Filip Ilievski (f.ilievski@vu.nl)
Vrije Universiteit Amsterdam
What will you hear about today
1) Databases: A historical perspective
2) Modern trends and why NoSQL?
3) Properties of NoSQL
4) Categories and instances of NoSQL databases
5) RDBMSs vs NoSQL
6) Use cases & The Semantic Web
The origin of Relational DBMSs
“In 1970, Edgar F. Codd, an Oxford-educated mathematician working at the IBM
San Jose Research Lab, published a paper showing how information stored in large
databases could be accessed without knowing how the information was structured
or where it resided in the database.”
The origin of Relational DBMSs
“Until then, retrieving information required relatively sophisticated computer
knowledge, or even the services of specialists who knew how to write programs to
fetch specific information—a time-consuming and expensive task.”
“What Codd did was open the door to a new world of data independence. Users
wouldn’t have to be specialists, nor would they need to know where the information
was or how the computer retrieved it. They could now concentrate more on their
businesses and less on their computers.”
(http://www-03.ibm.com/ibm/history/ibm100/us/en/icons/reldb/)
The origin of Relational DBMSs
After Codd’s paper described the relational ideas in theory, practical
implementations followed.
Soon, the Relational DBMSs were proven superior over the ad-hoc flat file
databases and became de facto standard in terms of modelling, representing and
accessing data.
Relational databases were (and often still are) ideal when the storage of data was
expensive and the data schemas were fairly simple.
But the circumstances change.
Trend #1: Increase in modeling complexity
In the Big Data era, it is not uncommon for a database to have hundreds-
thousands of tables, and many of these should be combined to give the final
requested information.
=> Trend #1: Queries get more complex and require complex SQL
operations
Trend #2: Using tables is not always optimal
Think of social media, where it is more
intuitive to use something like a graph
network
=> Trend #2: Some use cases require
graphs or nested structures rather
than tables
Trend #2: Using tables is not always optimal
Think of social media, where it is more
intuitive to use something like a graph
network
=> Trend #2: Some use cases require
graphs or nested structures rather
than tables
Trend #3: A fixed schema is not always optimal
Our model might change over time
Applications in practice are typically incremental (“agile”), so the initial design
choices get altered -- and this influences the data model.
Having a fixed pre-defined schema is not always desired.
Trend #4: Increase in querying intensity
The Internet in the 80s was not there as we know it: only a handful of people
would access and use a database.
There are many more users accessing the data now, mainly needed by the social
networks and enabled by the computing power increase.
Trend #4: Increase in querying intensity
The Internet in the 80s was not there as we know it: only a handful of people
would access and use a database.
There are many more users accessing the data now, mainly needed by the social
networks and enabled by the computing power increase.
Additionally, the intensity of access by an individual user is higher (imagine that
each Facebook like is yet another WRITE to the database).
â—Ź A single website being accessed can trigger tens-hundreds of database
queries.
=> Trend #4: Many more queries have to be handled
=> Trend #4’: The querying intensity varies
Trend #5: Cheap storage
Hardware is much cheaper, more accessible and powerful now.
Trend #5: Cheap storage
Hardware is much cheaper, more accessible and powerful now.
Trend #5: Cheap storage
Hardware is much cheaper, more accessible and powerful now.
When scaling up, it makes more sense to add more computers (horizontal scaling)
rather than to upgrade a single machine (vertical scaling)
=> Trend #5: Usage of a lot of cheap (cloud) hardware instead of a single
powerful machine
Modern trends: summary
=> Trend #1: Queries get more complex and require complex SQL
operations
=> Trend #2: Some use cases require graphs or nested structures rather
than table
=> Trend #3: The data model might evolve over time
=> Trend #4: Many more queries have to be handled
=> Trend #4’: The querying intensity varies
=> Trend #5: Usage of a lot of cheap (cloud) hardware instead of a single
powerful machine
Relational databases in the modern era
Relational databases are not designed to handle many users or large data.
Relational databases are not designed to be distributed over multiple computers.
Relational databases are not efficient with data that is not meant to be stored in
tables.
Sometimes, the relational database principles (e.g. normalization) are too complex
and slow when there is a lot of data or a complex model.
NoSQL (=Not-Only-SQL)
Main idea: adapt to the new trends/needs
1) To avoid making complex queries and joining many datasets, store as much
as possible in a single record
a) Consequently, the data structure in NoSQL is often not a table, but instead a dictionary, a tree,
an array, etc.
b) Yes, this leads to repetition and violates the normalization principle.
NoSQL (=Not-Only-SQL)
Main idea: adapt to the new trends/needs
1) To avoid making complex queries and joining many datasets, store as much
as possible in a single record
a) Consequently, the data structure in NoSQL is often not a table, but instead a dictionary, a tree,
an array, etc.
b) Yes, this leads to repetition and violates the normalization principle.
2) Use a data structure that is most appropriate for the problem (e.g. use a
graph to model social networks)
NoSQL (=Not-Only-SQL)
Main idea: adapt to the new trends/needs
1) To avoid making complex queries and joining many datasets, store as much
as possible in a single record
a) Consequently, the data structure in NoSQL is often not a table, but instead a dictionary, a tree,
an array, etc.
b) Yes, this leads to repetition and violates the normalization principle.
2) Use a data structure that is most appropriate for the problem (e.g. use a
graph to model social networks)
3) To handle many users and many queries, and to use the cheap hardware,
distribute the data over many simple machines.
What is NoSQL?
What is NoSQL?
It is a group of databases that attempts to provide more flexible way of data
storage, while adapting to the new trends of intensive storage and accessible
hardware.
This idea started around 2009, and it has been already widely adopted.
What is NoSQL?
NoSQL stands for Not-Only-SQL (yes, some NoSQL databases support SQL
operations too).
NoSQL databases are NOT meant to replace relational databases, both have their
use cases.
â—Ź Flexible schema / schema less
Characteristics of a NoSQL database
Image from https://www.slideshare.net/mikecrabb/a-beginners-guide-to-nosql/30-SIDENOTEcolour_tabbyname_Gunthercolour_gingername_Mylocolour
â—Ź Flexible schema / schema less
â—Ź Non relational (forget about normalization today - but you have to know it for
the exam :) )
Characteristics of a NoSQL database
â—Ź Flexible schema / schema less
â—Ź Non relational
â—Ź Simple access compared to SQL (but not standard across products)
Characteristics of a NoSQL database
â—Ź Flexible schema / schema less
â—Ź Non relational
â—Ź Simple access compared to SQL (but not standard across products)
â—Ź Basically, does not support complicated queries
â—Ź Cheaper than RDBMS systems
â—Ź Horizontally scalable
â—Ź Replicated
â—Ź Distributed
Characteristics of a NoSQL database
NoSQL databases
NoSQL databases
Filip Ilievski (f.ilievski@vu.nl)
Vrije Universiteit Amsterdam
Half time
NoSQL DBs
A)KEY-VALUE DBs
Each record in the database contains a unique key, which “hides” the value
Analogue to key-value pairs in dictionaries/JSON
Very simple and designed to work with a lot of data
Each record can have a different structure/type of data
A)KEY-VALUE DBs
A)KEY-VALUE DBs
A)KEY-VALUE DBs
A)KEY-VALUE DBs: Code for Redis
Initialization
import redis
pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
r = redis.Redis(connection_pool=pool)
Store a record
my_key =”B”
my_value=”triangle”
r.set(my_key, my_value)
Obtain a record
my_key=”B”
r.get(my_key)
B) DOCUMENT-STORE DBs
Again, simple and designed to work with a lot of data
Very similar to a key-value database
Main difference is that you can actually see (and QUERY for) the values
B) DOCUMENT-STORE DBs
B) DOCUMENT-STORE DBs
B) DOCUMENT-STORE DBs
B) DOCUMENT-STORE DBs: MongoDB
C) GRAPH DBs
Graph databases focus on modelling the structure of the data
Inspired by Euler’s graph theory, G=(E,V)
Motivated mainly by social media networks
C) GRAPH DBs
C) GRAPH DBs
C) GRAPH DBs
C) GRAPH DBs
C) GRAPH DBs
C) GRAPH DBs: Neo4j
D) COLUMN STORE
Column data is saved together, instead of row data
Super useful for data analytics
Inspired by Google BigTable
D) COLUMN STORE: Facebook’s Cassandra
It is mainly about the size
E) OTHER DATABASES
Many other NoSQL databases exist that do not fall in these four categories:
â—Ź Text search databases (e.g. ElasticSearch)
â—Ź XML databases
â—Ź ...
NoSQL databases
Comparison of NoSQL categories
Popularity
https://db-engines.com/en/ranking
NoSQL databases
So, which one to use?
It depends
In general, RDBMS is great for ensuring data consistency, when data validity is
very important (think financial transactions and similar corporate applications)
NoSQL is great ensuring high availability and speed rather than validity
NoSQL is also great for many applications that are hard to imagine with RDBMSs:
indexing text documents, social networks, storing coordinates, etc.
Pick the right tool for the job!
NoSQL databases
Me and NoSQL: Map studio
Bachelor thesis: Use of political maps to render statistical data on countries,
provinces, areas, cities, etc.
We are drawing the maps from scratch, so we have to keep a huge number of
coordinates in our database
Typically the coordinates were stored only once, and retrieved many times. So the
READ operation is very important to be efficient, but not the WRITE one.
Me and NoSQL: Map studio
Requirements:
â—Ź Main one is response time (=how quick can the database return an
answer/the data)
â—Ź Secondary goal is horizontal scalability (=the database should allow one
easily to split the data on multiple machines)
What is less/not important:
â—Ź consistency
â—Ź concurrency
Map studio
Solution:
Knowledge graphs
Knowledge graphs
Knowledge graphs
A knowledge graph acquires and integrates information into an ontology
and applies a reasoner to derive new knowledge.
â—Ź It is a graph
â—Ź It is semantic = the meaning of the data is encoded alongside the data in the
graph, in the form of the ontology. A knowledge graph is self-descriptive, or,
simply put, it provides a single place to find the data and understand what it’s
all about.
â—Ź It is smart = the ontology allows implicit information to be inferred from explicit
data
â—Ź It is alive = it can grow and get updated
Knowledge graphs
These principles are shared in the research on Semantic Web and Linked open
data, aiming to construct a Web of things.
Each world fact is represented as a subject-predicate-object triple and stored as
Linked Open Data.
By the end of 2016 Google’s knowledge graph apparently contained 70 billion
connected facts.
The Linked Open Data cloud also contains billions of facts (our LOD Laundromat
collection at VU might be among the largest -> last counted 40B, but next run will
contain much more).
Take aways from today’s lecture
1) NoSQL fills the spectrum between flat files and relational DBs
2) NoSQL databases were introduced to fit the new trends: many users, many
queries, complex data models, diverse data structures, and cheap hardware
3) The data structure in NoSQL is often not a table, but instead a dictionary, a
tree, an array, etc.
4) Horizontal scaling, repetition of data, flexible schema
5) Classes of NoSQL DBs: graph, column, key-value, document, other
6) RDBMS or NoSQL? Pick the right tool for the job
Acknowledgements
Some slides have been copied from existing slides on Slideshare
â—Ź https://www.slideshare.net/mikecrabb/a-beginners-guide-to-nosql/
â—Ź https://www.slideshare.net/bhaskar_vk/introduction-to-nosql-databases-
47768468
â—Ź https://www.slideshare.net/RTigger/sql-vs-no-sql
https://hackernoon.com/wtf-is-a-knowledge-graph-a16603a1a25f
For an advanced presentation on NoSQL, see:
â—Ź https://www.slideshare.net/quipo/nosql-databases-why-what-and-when/34-
Thanks!
Anything you would like to talk about?

More Related Content

PPTX
NOSQL vs SQL
PPTX
Non relational databases-no sql
PPTX
No SQL- The Future Of Data Storage
PPTX
Nosql databases
PPTX
NoSQL databases - An introduction
PPTX
NOSQL Databases types and Uses
PPTX
Sql vs NoSQL
PPTX
NOSQL vs SQL
Non relational databases-no sql
No SQL- The Future Of Data Storage
Nosql databases
NoSQL databases - An introduction
NOSQL Databases types and Uses
Sql vs NoSQL

What's hot (20)

PPTX
Introduction to NoSQL Databases
PPTX
Introduction to NoSQL
PPTX
Nosql seminar
PDF
NoSQL databases
PPTX
An Intro to NoSQL Databases
PPTX
An Overview of Apache Cassandra
PPTX
introduction to NOSQL Database
PPTX
NoSQL Architecture Overview
ZIP
NoSQL databases
PPTX
Cql – cassandra query language
PPTX
Relational and non relational database 7
PPTX
Mongo db intro.pptx
PPTX
Hadoop Tutorial For Beginners
PPTX
PPTX
Oracle architecture with details-yogiji creations
PPTX
MySQL_MariaDB-성능개선-202201.pptx
PPTX
Hive
PDF
Azure Cosmos DB
PPTX
MongoDB
PDF
NOSQL- Presentation on NoSQL
Introduction to NoSQL Databases
Introduction to NoSQL
Nosql seminar
NoSQL databases
An Intro to NoSQL Databases
An Overview of Apache Cassandra
introduction to NOSQL Database
NoSQL Architecture Overview
NoSQL databases
Cql – cassandra query language
Relational and non relational database 7
Mongo db intro.pptx
Hadoop Tutorial For Beginners
Oracle architecture with details-yogiji creations
MySQL_MariaDB-성능개선-202201.pptx
Hive
Azure Cosmos DB
MongoDB
NOSQL- Presentation on NoSQL
Ad

Similar to NoSQL databases (20)

DOCX
Unit II -BIG DATA ANALYTICS.docx
PPTX
Introduction to Data Science NoSQL.pptx
PDF
the rising no sql technology
PPTX
NoSQL
PPTX
UNIT-2.pptx
PDF
NOsql Presentation.pdf
PPTX
cours database pour etudiant NoSQL (1).pptx
PPTX
Introduction to asdfghjkln b vfgh n v
 
PPTX
NoSQL.pptx
PPTX
unit2-ppt1.pptx
PPTX
Introduction to NoSQL database technology
DOCX
Evaluation criteria for nosql databases
PDF
The Rise of Nosql Databases
PPTX
UNIT I Introduction to NoSQL.pptx
PDF
NoSQL BIg Data Analytics Mongo DB and Cassandra .pdf
PDF
NOSQL in big data is the not only structure langua.pdf
PDF
A Comparative Study of NoSQL and Relational Database.pdf
PDF
Brief introduction to NoSQL by fas mosleh
PPTX
Modern database
PPTX
Relational databases vs Non-relational databases
Unit II -BIG DATA ANALYTICS.docx
Introduction to Data Science NoSQL.pptx
the rising no sql technology
NoSQL
UNIT-2.pptx
NOsql Presentation.pdf
cours database pour etudiant NoSQL (1).pptx
Introduction to asdfghjkln b vfgh n v
 
NoSQL.pptx
unit2-ppt1.pptx
Introduction to NoSQL database technology
Evaluation criteria for nosql databases
The Rise of Nosql Databases
UNIT I Introduction to NoSQL.pptx
NoSQL BIg Data Analytics Mongo DB and Cassandra .pdf
NOSQL in big data is the not only structure langua.pdf
A Comparative Study of NoSQL and Relational Database.pdf
Brief introduction to NoSQL by fas mosleh
Modern database
Relational databases vs Non-relational databases
Ad

More from Filip Ilievski (11)

PPTX
The Commonsense Knowledge Graph
PPTX
Commonsense knowledge in Wikidata
PDF
SemEval-2018 task 5: Counting events and participants in the long tail
PDF
A look inside Babelfy: Examining the bubble
PDF
2nd Spinoza workshop: Looking at the Long Tail - introductory slides
PPTX
Systematic Study of Long Tail Phenomena in Entity Linking
PDF
LOTUS: Adaptive Text Search for Big Linked Data
PDF
Lotus: Linked Open Text UnleaShed - ISWC COLD '15
PDF
NAF2SEM and cross-document Event Coreference
PDF
Mini seminar presentation on context-based NED optimization
PDF
CLiN 25: NED with two-stage coherence optimization
The Commonsense Knowledge Graph
Commonsense knowledge in Wikidata
SemEval-2018 task 5: Counting events and participants in the long tail
A look inside Babelfy: Examining the bubble
2nd Spinoza workshop: Looking at the Long Tail - introductory slides
Systematic Study of Long Tail Phenomena in Entity Linking
LOTUS: Adaptive Text Search for Big Linked Data
Lotus: Linked Open Text UnleaShed - ISWC COLD '15
NAF2SEM and cross-document Event Coreference
Mini seminar presentation on context-based NED optimization
CLiN 25: NED with two-stage coherence optimization

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
 
PDF
Encapsulation theory and applications.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
 
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Teaching material agriculture food technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
sap open course for s4hana steps from ECC to s4
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
 
Encapsulation theory and applications.pdf
Review of recent advances in non-invasive hemoglobin estimation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
The Rise and Fall of 3GPP – Time for a Sabbatical?
 
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

NoSQL databases

  • 1. NoSQL databases Filip Ilievski (f.ilievski@vu.nl) Vrije Universiteit Amsterdam
  • 2. What will you hear about today 1) Databases: A historical perspective 2) Modern trends and why NoSQL? 3) Properties of NoSQL 4) Categories and instances of NoSQL databases 5) RDBMSs vs NoSQL 6) Use cases & The Semantic Web
  • 3. The origin of Relational DBMSs “In 1970, Edgar F. Codd, an Oxford-educated mathematician working at the IBM San Jose Research Lab, published a paper showing how information stored in large databases could be accessed without knowing how the information was structured or where it resided in the database.”
  • 4. The origin of Relational DBMSs “Until then, retrieving information required relatively sophisticated computer knowledge, or even the services of specialists who knew how to write programs to fetch specific information—a time-consuming and expensive task.” “What Codd did was open the door to a new world of data independence. Users wouldn’t have to be specialists, nor would they need to know where the information was or how the computer retrieved it. They could now concentrate more on their businesses and less on their computers.” (http://www-03.ibm.com/ibm/history/ibm100/us/en/icons/reldb/)
  • 5. The origin of Relational DBMSs After Codd’s paper described the relational ideas in theory, practical implementations followed. Soon, the Relational DBMSs were proven superior over the ad-hoc flat file databases and became de facto standard in terms of modelling, representing and accessing data. Relational databases were (and often still are) ideal when the storage of data was expensive and the data schemas were fairly simple.
  • 7. Trend #1: Increase in modeling complexity In the Big Data era, it is not uncommon for a database to have hundreds- thousands of tables, and many of these should be combined to give the final requested information. => Trend #1: Queries get more complex and require complex SQL operations
  • 8. Trend #2: Using tables is not always optimal Think of social media, where it is more intuitive to use something like a graph network => Trend #2: Some use cases require graphs or nested structures rather than tables
  • 9. Trend #2: Using tables is not always optimal Think of social media, where it is more intuitive to use something like a graph network => Trend #2: Some use cases require graphs or nested structures rather than tables
  • 10. Trend #3: A fixed schema is not always optimal Our model might change over time Applications in practice are typically incremental (“agile”), so the initial design choices get altered -- and this influences the data model. Having a fixed pre-defined schema is not always desired.
  • 11. Trend #4: Increase in querying intensity The Internet in the 80s was not there as we know it: only a handful of people would access and use a database. There are many more users accessing the data now, mainly needed by the social networks and enabled by the computing power increase.
  • 12. Trend #4: Increase in querying intensity The Internet in the 80s was not there as we know it: only a handful of people would access and use a database. There are many more users accessing the data now, mainly needed by the social networks and enabled by the computing power increase. Additionally, the intensity of access by an individual user is higher (imagine that each Facebook like is yet another WRITE to the database). â—Ź A single website being accessed can trigger tens-hundreds of database queries. => Trend #4: Many more queries have to be handled => Trend #4’: The querying intensity varies
  • 13. Trend #5: Cheap storage Hardware is much cheaper, more accessible and powerful now.
  • 14. Trend #5: Cheap storage Hardware is much cheaper, more accessible and powerful now.
  • 15. Trend #5: Cheap storage Hardware is much cheaper, more accessible and powerful now. When scaling up, it makes more sense to add more computers (horizontal scaling) rather than to upgrade a single machine (vertical scaling) => Trend #5: Usage of a lot of cheap (cloud) hardware instead of a single powerful machine
  • 16. Modern trends: summary => Trend #1: Queries get more complex and require complex SQL operations => Trend #2: Some use cases require graphs or nested structures rather than table => Trend #3: The data model might evolve over time => Trend #4: Many more queries have to be handled => Trend #4’: The querying intensity varies => Trend #5: Usage of a lot of cheap (cloud) hardware instead of a single powerful machine
  • 17. Relational databases in the modern era Relational databases are not designed to handle many users or large data. Relational databases are not designed to be distributed over multiple computers. Relational databases are not efficient with data that is not meant to be stored in tables. Sometimes, the relational database principles (e.g. normalization) are too complex and slow when there is a lot of data or a complex model.
  • 18. NoSQL (=Not-Only-SQL) Main idea: adapt to the new trends/needs 1) To avoid making complex queries and joining many datasets, store as much as possible in a single record a) Consequently, the data structure in NoSQL is often not a table, but instead a dictionary, a tree, an array, etc. b) Yes, this leads to repetition and violates the normalization principle.
  • 19. NoSQL (=Not-Only-SQL) Main idea: adapt to the new trends/needs 1) To avoid making complex queries and joining many datasets, store as much as possible in a single record a) Consequently, the data structure in NoSQL is often not a table, but instead a dictionary, a tree, an array, etc. b) Yes, this leads to repetition and violates the normalization principle. 2) Use a data structure that is most appropriate for the problem (e.g. use a graph to model social networks)
  • 20. NoSQL (=Not-Only-SQL) Main idea: adapt to the new trends/needs 1) To avoid making complex queries and joining many datasets, store as much as possible in a single record a) Consequently, the data structure in NoSQL is often not a table, but instead a dictionary, a tree, an array, etc. b) Yes, this leads to repetition and violates the normalization principle. 2) Use a data structure that is most appropriate for the problem (e.g. use a graph to model social networks) 3) To handle many users and many queries, and to use the cheap hardware, distribute the data over many simple machines.
  • 22. What is NoSQL? It is a group of databases that attempts to provide more flexible way of data storage, while adapting to the new trends of intensive storage and accessible hardware. This idea started around 2009, and it has been already widely adopted.
  • 23. What is NoSQL? NoSQL stands for Not-Only-SQL (yes, some NoSQL databases support SQL operations too). NoSQL databases are NOT meant to replace relational databases, both have their use cases.
  • 24. â—Ź Flexible schema / schema less Characteristics of a NoSQL database Image from https://www.slideshare.net/mikecrabb/a-beginners-guide-to-nosql/30-SIDENOTEcolour_tabbyname_Gunthercolour_gingername_Mylocolour
  • 25. â—Ź Flexible schema / schema less â—Ź Non relational (forget about normalization today - but you have to know it for the exam :) ) Characteristics of a NoSQL database
  • 26. â—Ź Flexible schema / schema less â—Ź Non relational â—Ź Simple access compared to SQL (but not standard across products) Characteristics of a NoSQL database
  • 27. â—Ź Flexible schema / schema less â—Ź Non relational â—Ź Simple access compared to SQL (but not standard across products) â—Ź Basically, does not support complicated queries â—Ź Cheaper than RDBMS systems â—Ź Horizontally scalable â—Ź Replicated â—Ź Distributed Characteristics of a NoSQL database
  • 29. NoSQL databases Filip Ilievski (f.ilievski@vu.nl) Vrije Universiteit Amsterdam Half time
  • 31. A)KEY-VALUE DBs Each record in the database contains a unique key, which “hides” the value Analogue to key-value pairs in dictionaries/JSON Very simple and designed to work with a lot of data Each record can have a different structure/type of data
  • 35. A)KEY-VALUE DBs: Code for Redis Initialization import redis pool = redis.ConnectionPool(host='localhost', port=6379, db=0) r = redis.Redis(connection_pool=pool) Store a record my_key =”B” my_value=”triangle” r.set(my_key, my_value) Obtain a record my_key=”B” r.get(my_key)
  • 36. B) DOCUMENT-STORE DBs Again, simple and designed to work with a lot of data Very similar to a key-value database Main difference is that you can actually see (and QUERY for) the values
  • 41. C) GRAPH DBs Graph databases focus on modelling the structure of the data Inspired by Euler’s graph theory, G=(E,V) Motivated mainly by social media networks
  • 47. C) GRAPH DBs: Neo4j
  • 48. D) COLUMN STORE Column data is saved together, instead of row data Super useful for data analytics Inspired by Google BigTable
  • 49. D) COLUMN STORE: Facebook’s Cassandra
  • 50. It is mainly about the size
  • 51. E) OTHER DATABASES Many other NoSQL databases exist that do not fall in these four categories: â—Ź Text search databases (e.g. ElasticSearch) â—Ź XML databases â—Ź ...
  • 53. Comparison of NoSQL categories
  • 56. So, which one to use? It depends In general, RDBMS is great for ensuring data consistency, when data validity is very important (think financial transactions and similar corporate applications) NoSQL is great ensuring high availability and speed rather than validity NoSQL is also great for many applications that are hard to imagine with RDBMSs: indexing text documents, social networks, storing coordinates, etc. Pick the right tool for the job!
  • 58. Me and NoSQL: Map studio Bachelor thesis: Use of political maps to render statistical data on countries, provinces, areas, cities, etc. We are drawing the maps from scratch, so we have to keep a huge number of coordinates in our database Typically the coordinates were stored only once, and retrieved many times. So the READ operation is very important to be efficient, but not the WRITE one.
  • 59. Me and NoSQL: Map studio Requirements: â—Ź Main one is response time (=how quick can the database return an answer/the data) â—Ź Secondary goal is horizontal scalability (=the database should allow one easily to split the data on multiple machines) What is less/not important: â—Ź consistency â—Ź concurrency
  • 63. Knowledge graphs A knowledge graph acquires and integrates information into an ontology and applies a reasoner to derive new knowledge. â—Ź It is a graph â—Ź It is semantic = the meaning of the data is encoded alongside the data in the graph, in the form of the ontology. A knowledge graph is self-descriptive, or, simply put, it provides a single place to find the data and understand what it’s all about. â—Ź It is smart = the ontology allows implicit information to be inferred from explicit data â—Ź It is alive = it can grow and get updated
  • 64. Knowledge graphs These principles are shared in the research on Semantic Web and Linked open data, aiming to construct a Web of things. Each world fact is represented as a subject-predicate-object triple and stored as Linked Open Data. By the end of 2016 Google’s knowledge graph apparently contained 70 billion connected facts. The Linked Open Data cloud also contains billions of facts (our LOD Laundromat collection at VU might be among the largest -> last counted 40B, but next run will contain much more).
  • 65. Take aways from today’s lecture 1) NoSQL fills the spectrum between flat files and relational DBs 2) NoSQL databases were introduced to fit the new trends: many users, many queries, complex data models, diverse data structures, and cheap hardware 3) The data structure in NoSQL is often not a table, but instead a dictionary, a tree, an array, etc. 4) Horizontal scaling, repetition of data, flexible schema 5) Classes of NoSQL DBs: graph, column, key-value, document, other 6) RDBMS or NoSQL? Pick the right tool for the job
  • 66. Acknowledgements Some slides have been copied from existing slides on Slideshare â—Ź https://www.slideshare.net/mikecrabb/a-beginners-guide-to-nosql/ â—Ź https://www.slideshare.net/bhaskar_vk/introduction-to-nosql-databases- 47768468 â—Ź https://www.slideshare.net/RTigger/sql-vs-no-sql https://hackernoon.com/wtf-is-a-knowledge-graph-a16603a1a25f For an advanced presentation on NoSQL, see: â—Ź https://www.slideshare.net/quipo/nosql-databases-why-what-and-when/34-
  • 67. Thanks! Anything you would like to talk about?