SlideShare a Scribd company logo
CS315: Principles of Database Systems
NoSQL
Arnab Bhattacharya
arnabb@cse.iitk.ac.in
Computer Science and Engineering,
Indian Institute of Technology, Kanpur
http://web.cse.iitk.ac.in/˜cs315/
2nd
semester, 2013-14
Tue, Fri 1530-1700 at CS101
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 1 / 12
NoSQL
NoSQL is
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 2 / 12
NoSQL
NoSQL is not “no-SQL”
It is not only SQL
It does not aim to provide the ACID properties
Originated as no-SQL though
Later changed since RDBMS is too powerful to always ignore
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 2 / 12
NoSQL
NoSQL is not “no-SQL”
It is not only SQL
It does not aim to provide the ACID properties
Originated as no-SQL though
Later changed since RDBMS is too powerful to always ignore
Aims to provide
Scalability
Flexibility
Naturalness
Distribution
Performance
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 2 / 12
CAP theorem
All of C, A, P cannot be satisfied simultaneously
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 3 / 12
CAP theorem
All of C, A, P cannot be satisfied simultaneously
CA: single-site; partitioning is not allowed
CP: what is available is consistent
AP: everything is available but may not be consistent
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 3 / 12
CAP theorem
All of C, A, P cannot be satisfied simultaneously
CA: single-site; partitioning is not allowed
CP: what is available is consistent
AP: everything is available but may not be consistent
Not a theorem – just a hypothesis
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 3 / 12
BASE properties
Basically Available: System guarantees availability
Soft state: State of system is soft, i.e., it may change without input to
maintain consistency
Eventual consistency: Data will be eventually consistent without any
interim perturbation
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 4 / 12
BASE properties
Basically Available: System guarantees availability
Soft state: State of system is soft, i.e., it may change without input to
maintain consistency
Eventual consistency: Data will be eventually consistent without any
interim perturbation
Sacrifices consistency
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 4 / 12
BASE properties
Basically Available: System guarantees availability
Soft state: State of system is soft, i.e., it may change without input to
maintain consistency
Eventual consistency: Data will be eventually consistent without any
interim perturbation
Sacrifices consistency
To counter ACID
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 4 / 12
Types
Four main types of NoSQL data stores:
1 Columnar families
2 Bigtable systems
3 Document databases
4 Graph databases
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 5 / 12
Columnar storage
Instead of rows being stored togther, columns are stored
consecutively
A single disk block (or a set of consecutive blocks) stores a single
column family
A column family may consist of one or multiple columns
This set of columns is called a super column
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 6 / 12
Columnar storage
Instead of rows being stored togther, columns are stored
consecutively
A single disk block (or a set of consecutive blocks) stores a single
column family
A column family may consist of one or multiple columns
This set of columns is called a super column
Two main types
Columnar relational models
Key-value stores and/or big tables
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 6 / 12
Columnar relational models
Not NoSQL and is actually RDBMS
Column-wise storage on the disk
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
Columnar relational models
Not NoSQL and is actually RDBMS
Column-wise storage on the disk
Allows faster querying when only few columns are touched on the
entire data
Allows compression of columns
Provides better memory caching
Joins are faster since they are mostly on similar columns from two
tables
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
Columnar relational models
Not NoSQL and is actually RDBMS
Column-wise storage on the disk
Allows faster querying when only few columns are touched on the
entire data
Allows compression of columns
Provides better memory caching
Joins are faster since they are mostly on similar columns from two
tables
Is not good for updates
Is not good when many columns of a few tuples are accessed
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
Columnar relational models
Not NoSQL and is actually RDBMS
Column-wise storage on the disk
Allows faster querying when only few columns are touched on the
entire data
Allows compression of columns
Provides better memory caching
Joins are faster since they are mostly on similar columns from two
tables
Is not good for updates
Is not good when many columns of a few tuples are accessed
Good for OLAP (online analytical processing)
Not good for OLTP (online transaction processing)
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
Columnar relational models
Not NoSQL and is actually RDBMS
Column-wise storage on the disk
Allows faster querying when only few columns are touched on the
entire data
Allows compression of columns
Provides better memory caching
Joins are faster since they are mostly on similar columns from two
tables
Is not good for updates
Is not good when many columns of a few tuples are accessed
Good for OLAP (online analytical processing)
Not good for OLTP (online transaction processing)
Example: MonetDB
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
Key-value stores
Two columns: a key and a value
Key is mostly text
Value can be anything and is simply an object
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
Key-value stores
Two columns: a key and a value
Key is mostly text
Value can be anything and is simply an object
Essentially, actual data becomes “value” and an unique id is
generated which becomes “key”
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
Key-value stores
Two columns: a key and a value
Key is mostly text
Value can be anything and is simply an object
Essentially, actual data becomes “value” and an unique id is
generated which becomes “key”
Whole database is then just one big table with these two columns
Becomes schema-less
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
Key-value stores
Two columns: a key and a value
Key is mostly text
Value can be anything and is simply an object
Essentially, actual data becomes “value” and an unique id is
generated which becomes “key”
Whole database is then just one big table with these two columns
Becomes schema-less
Can be distributed and is, thus, highly scalable
So, in essence a big distributed hash table
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
Key-value stores
Two columns: a key and a value
Key is mostly text
Value can be anything and is simply an object
Essentially, actual data becomes “value” and an unique id is
generated which becomes “key”
Whole database is then just one big table with these two columns
Becomes schema-less
Can be distributed and is, thus, highly scalable
So, in essence a big distributed hash table
All queries are on keys
Keys are necessarily indexed
Uses memcache where most queried keys are persisted in memory
for faster access
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
Key-value stores
Two columns: a key and a value
Key is mostly text
Value can be anything and is simply an object
Essentially, actual data becomes “value” and an unique id is
generated which becomes “key”
Whole database is then just one big table with these two columns
Becomes schema-less
Can be distributed and is, thus, highly scalable
So, in essence a big distributed hash table
All queries are on keys
Keys are necessarily indexed
Uses memcache where most queried keys are persisted in memory
for faster access
Example: Cassandra, CouchDB, Tokyo Cabinet, Redis
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
Bigtable systems
Started from Google’s BigTable implementation
Uses a key-value store
Data can be replicated for better availability
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 9 / 12
Bigtable systems
Started from Google’s BigTable implementation
Uses a key-value store
Data can be replicated for better availability
Uses a timestamp
Timestamp is used to
Expire data
Delete stale data
Resolve read-write conflicts
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 9 / 12
Bigtable systems
Started from Google’s BigTable implementation
Uses a key-value store
Data can be replicated for better availability
Uses a timestamp
Timestamp is used to
Expire data
Delete stale data
Resolve read-write conflicts
Same value can be indexed using multiple keys
Map-reduce framework to compute
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 9 / 12
Bigtable systems
Started from Google’s BigTable implementation
Uses a key-value store
Data can be replicated for better availability
Uses a timestamp
Timestamp is used to
Expire data
Delete stale data
Resolve read-write conflicts
Same value can be indexed using multiple keys
Map-reduce framework to compute
Example: BigTable, HBase, Cassandra, HyperTable, SimpleDB
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 9 / 12
Document databases
Uses documents as the main storage format of data
Popular document formats are XML, JSON, BSON, YAML
Document itself is the key while the content is the value
Document can be indexed by id or simply its location (e.g., URI)
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 10 / 12
Document databases
Uses documents as the main storage format of data
Popular document formats are XML, JSON, BSON, YAML
Document itself is the key while the content is the value
Document can be indexed by id or simply its location (e.g., URI)
Content needs to be parsed to make sense
Content can be organised further
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 10 / 12
Document databases
Uses documents as the main storage format of data
Popular document formats are XML, JSON, BSON, YAML
Document itself is the key while the content is the value
Document can be indexed by id or simply its location (e.g., URI)
Content needs to be parsed to make sense
Content can be organised further
Extremely useful for insert-once read-many scenarios
Can use map-reduce framework to compute
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 10 / 12
Document databases
Uses documents as the main storage format of data
Popular document formats are XML, JSON, BSON, YAML
Document itself is the key while the content is the value
Document can be indexed by id or simply its location (e.g., URI)
Content needs to be parsed to make sense
Content can be organised further
Extremely useful for insert-once read-many scenarios
Can use map-reduce framework to compute
Example: MongoDB, CouchDB
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 10 / 12
Graph databases
Nodes represent entities
Edges encode relationships between nodes
Can be directed
Can have hyper-edges as well
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 11 / 12
Graph databases
Nodes represent entities
Edges encode relationships between nodes
Can be directed
Can have hyper-edges as well
Easier to find distances and neighbors
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 11 / 12
Graph databases
Nodes represent entities
Edges encode relationships between nodes
Can be directed
Can have hyper-edges as well
Easier to find distances and neighbors
Example: Neo4J, HyperGraph, Infinite Graph, FlockDB
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 11 / 12
Discussion
NoSQL, although started as anti-SQL, is no more so
More a realisation that for some cases
RDBMS does not scale or distribute, and in some other cases
ACIDity is an overkill
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 12 / 12
Discussion
NoSQL, although started as anti-SQL, is no more so
More a realisation that for some cases
RDBMS does not scale or distribute, and in some other cases
ACIDity is an overkill
NoSQL is not good for every scenario
Not every good feature reported has been validated
Most legacy systems still use RDBMS
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 12 / 12
Discussion
NoSQL, although started as anti-SQL, is no more so
More a realisation that for some cases
RDBMS does not scale or distribute, and in some other cases
ACIDity is an overkill
NoSQL is not good for every scenario
Not every good feature reported has been validated
Most legacy systems still use RDBMS
NoSQL horizon is shifting rapidly with almost no control or sense
However, trend is for NoSQL as cloud computing and big data relies
on it
Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 12 / 12

More Related Content

What's hot

Not Your Father's Database: How to Use Apache Spark Properly in Your Big Data...
Not Your Father's Database: How to Use Apache Spark Properly in Your Big Data...Not Your Father's Database: How to Use Apache Spark Properly in Your Big Data...
Not Your Father's Database: How to Use Apache Spark Properly in Your Big Data...
Databricks
 
Azure data lake sql konf 2016
Azure data lake   sql konf 2016Azure data lake   sql konf 2016
Azure data lake sql konf 2016
Kenneth Michael Nielsen
 
ADL/U-SQL Introduction (SQLBits 2016)
ADL/U-SQL Introduction (SQLBits 2016)ADL/U-SQL Introduction (SQLBits 2016)
ADL/U-SQL Introduction (SQLBits 2016)
Michael Rys
 
Amazon Athena Hands-On Workshop
Amazon Athena Hands-On WorkshopAmazon Athena Hands-On Workshop
Amazon Athena Hands-On Workshop
DoiT International
 
2016 Spark Summit East Keynote: Matei Zaharia
2016 Spark Summit East Keynote: Matei Zaharia2016 Spark Summit East Keynote: Matei Zaharia
2016 Spark Summit East Keynote: Matei Zaharia
Databricks
 
3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql
Łukasz Grala
 
Cassandra in e-commerce
Cassandra in e-commerceCassandra in e-commerce
Cassandra in e-commerce
Alexander Solovyev
 
Introduction to Spark SQL training workshop
Introduction to Spark SQL training workshopIntroduction to Spark SQL training workshop
Introduction to Spark SQL training workshop
(Susan) Xinh Huynh
 
SQL PASS BAC - 60 reporting tips in 60 minutes
SQL PASS BAC - 60 reporting tips in 60 minutesSQL PASS BAC - 60 reporting tips in 60 minutes
SQL PASS BAC - 60 reporting tips in 60 minutes
Ike Ellis
 
Distributed ML in Apache Spark
Distributed ML in Apache SparkDistributed ML in Apache Spark
Distributed ML in Apache Spark
Databricks
 
SFScon18 - Stefano Pampaloni - The SQL revenge
SFScon18 - Stefano Pampaloni - The SQL revengeSFScon18 - Stefano Pampaloni - The SQL revenge
SFScon18 - Stefano Pampaloni - The SQL revenge
South Tyrol Free Software Conference
 
Azure Data Lake and U-SQL
Azure Data Lake and U-SQLAzure Data Lake and U-SQL
Azure Data Lake and U-SQL
Michael Rys
 
In Memory Data Pipeline And Warehouse At Scale - BerlinBuzzwords 2015
In Memory Data Pipeline And Warehouse At Scale - BerlinBuzzwords 2015In Memory Data Pipeline And Warehouse At Scale - BerlinBuzzwords 2015
In Memory Data Pipeline And Warehouse At Scale - BerlinBuzzwords 2015
Iulia Emanuela Iancuta
 
Big Data Processing with Spark and .NET - Microsoft Ignite 2019
Big Data Processing with Spark and .NET - Microsoft Ignite 2019Big Data Processing with Spark and .NET - Microsoft Ignite 2019
Big Data Processing with Spark and .NET - Microsoft Ignite 2019
Michael Rys
 
Dive Into Azure Data Lake - PASS 2017
Dive Into Azure Data Lake - PASS 2017Dive Into Azure Data Lake - PASS 2017
Dive Into Azure Data Lake - PASS 2017
Ike Ellis
 
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
Cathrine Wilhelmsen
 
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
Michael Rys
 
Common Strategies for Improving Performance on Your Delta Lakehouse
Common Strategies for Improving Performance on Your Delta LakehouseCommon Strategies for Improving Performance on Your Delta Lakehouse
Common Strategies for Improving Performance on Your Delta Lakehouse
Databricks
 
An Introduction to Distributed Search with Datastax Enterprise Search
An Introduction to Distributed Search with Datastax Enterprise SearchAn Introduction to Distributed Search with Datastax Enterprise Search
An Introduction to Distributed Search with Datastax Enterprise Search
Patricia Gorla
 

What's hot (20)

Not Your Father's Database: How to Use Apache Spark Properly in Your Big Data...
Not Your Father's Database: How to Use Apache Spark Properly in Your Big Data...Not Your Father's Database: How to Use Apache Spark Properly in Your Big Data...
Not Your Father's Database: How to Use Apache Spark Properly in Your Big Data...
 
Azure data lake sql konf 2016
Azure data lake   sql konf 2016Azure data lake   sql konf 2016
Azure data lake sql konf 2016
 
ADL/U-SQL Introduction (SQLBits 2016)
ADL/U-SQL Introduction (SQLBits 2016)ADL/U-SQL Introduction (SQLBits 2016)
ADL/U-SQL Introduction (SQLBits 2016)
 
Amazon Athena Hands-On Workshop
Amazon Athena Hands-On WorkshopAmazon Athena Hands-On Workshop
Amazon Athena Hands-On Workshop
 
2016 Spark Summit East Keynote: Matei Zaharia
2016 Spark Summit East Keynote: Matei Zaharia2016 Spark Summit East Keynote: Matei Zaharia
2016 Spark Summit East Keynote: Matei Zaharia
 
3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql
 
Cassandra in e-commerce
Cassandra in e-commerceCassandra in e-commerce
Cassandra in e-commerce
 
Introduction to Spark SQL training workshop
Introduction to Spark SQL training workshopIntroduction to Spark SQL training workshop
Introduction to Spark SQL training workshop
 
SQL PASS BAC - 60 reporting tips in 60 minutes
SQL PASS BAC - 60 reporting tips in 60 minutesSQL PASS BAC - 60 reporting tips in 60 minutes
SQL PASS BAC - 60 reporting tips in 60 minutes
 
Distributed ML in Apache Spark
Distributed ML in Apache SparkDistributed ML in Apache Spark
Distributed ML in Apache Spark
 
Vertica
VerticaVertica
Vertica
 
SFScon18 - Stefano Pampaloni - The SQL revenge
SFScon18 - Stefano Pampaloni - The SQL revengeSFScon18 - Stefano Pampaloni - The SQL revenge
SFScon18 - Stefano Pampaloni - The SQL revenge
 
Azure Data Lake and U-SQL
Azure Data Lake and U-SQLAzure Data Lake and U-SQL
Azure Data Lake and U-SQL
 
In Memory Data Pipeline And Warehouse At Scale - BerlinBuzzwords 2015
In Memory Data Pipeline And Warehouse At Scale - BerlinBuzzwords 2015In Memory Data Pipeline And Warehouse At Scale - BerlinBuzzwords 2015
In Memory Data Pipeline And Warehouse At Scale - BerlinBuzzwords 2015
 
Big Data Processing with Spark and .NET - Microsoft Ignite 2019
Big Data Processing with Spark and .NET - Microsoft Ignite 2019Big Data Processing with Spark and .NET - Microsoft Ignite 2019
Big Data Processing with Spark and .NET - Microsoft Ignite 2019
 
Dive Into Azure Data Lake - PASS 2017
Dive Into Azure Data Lake - PASS 2017Dive Into Azure Data Lake - PASS 2017
Dive Into Azure Data Lake - PASS 2017
 
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
Building Dynamic Data Pipelines in Azure Data Factory (Microsoft Ignite 2019)
 
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
 
Common Strategies for Improving Performance on Your Delta Lakehouse
Common Strategies for Improving Performance on Your Delta LakehouseCommon Strategies for Improving Performance on Your Delta Lakehouse
Common Strategies for Improving Performance on Your Delta Lakehouse
 
An Introduction to Distributed Search with Datastax Enterprise Search
An Introduction to Distributed Search with Datastax Enterprise SearchAn Introduction to Distributed Search with Datastax Enterprise Search
An Introduction to Distributed Search with Datastax Enterprise Search
 

Similar to 16 nosql

Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
RojaT4
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
Pooyan Mehrparvar
 
SQL vs NoSQL deep dive
SQL vs NoSQL deep diveSQL vs NoSQL deep dive
SQL vs NoSQL deep dive
Ahmed Shaaban
 
NoSQL Database- cassandra column Base DB
NoSQL Database- cassandra column Base DBNoSQL Database- cassandra column Base DB
NoSQL Database- cassandra column Base DB
sadegh salehi
 
No sql databases
No sql databasesNo sql databases
No sql databases
Ashish Kumar Thakur
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
Ashwani Kumar
 
Presentation on NoSQL Database related RDBMS
Presentation on NoSQL Database related RDBMSPresentation on NoSQL Database related RDBMS
Presentation on NoSQL Database related RDBMS
abdurrobsoyon
 
NoSQL Basics - A Quick Tour
NoSQL Basics - A Quick TourNoSQL Basics - A Quick Tour
NoSQL Basics - A Quick Tour
Bikram Sinha. MBA, PMP
 
Conquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryConquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard query
Justin Swanhart
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)
Rahul P
 
no sql presentation
no sql presentationno sql presentation
no sql presentation
chandanm2
 
nosql.pptx
nosql.pptxnosql.pptx
nosql.pptx
Prakash Zodge
 
GIDS 2016 Understanding and Building No SQLs
GIDS 2016 Understanding and Building No SQLsGIDS 2016 Understanding and Building No SQLs
GIDS 2016 Understanding and Building No SQLs
techmaddy
 
No SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability MeetupNo SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability Meetup
Hyderabad Scalability Meetup
 
Perl and Elasticsearch
Perl and ElasticsearchPerl and Elasticsearch
Perl and Elasticsearch
Dean Hamstead
 
To SQL or NoSQL, that is the question
To SQL or NoSQL, that is the questionTo SQL or NoSQL, that is the question
To SQL or NoSQL, that is the question
Krishnakumar S
 
Azure SQL DWH
Azure SQL DWHAzure SQL DWH
Azure SQL DWH
Shy Engelberg
 
Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008paulguerin
 
NoSQL
NoSQLNoSQL

Similar to 16 nosql (20)

Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
SQL vs NoSQL deep dive
SQL vs NoSQL deep diveSQL vs NoSQL deep dive
SQL vs NoSQL deep dive
 
NoSQL Database- cassandra column Base DB
NoSQL Database- cassandra column Base DBNoSQL Database- cassandra column Base DB
NoSQL Database- cassandra column Base DB
 
No sql databases
No sql databasesNo sql databases
No sql databases
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
 
Presentation on NoSQL Database related RDBMS
Presentation on NoSQL Database related RDBMSPresentation on NoSQL Database related RDBMS
Presentation on NoSQL Database related RDBMS
 
NoSQL Basics - A Quick Tour
NoSQL Basics - A Quick TourNoSQL Basics - A Quick Tour
NoSQL Basics - A Quick Tour
 
Conquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryConquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard query
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
 
NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)
 
no sql presentation
no sql presentationno sql presentation
no sql presentation
 
nosql.pptx
nosql.pptxnosql.pptx
nosql.pptx
 
GIDS 2016 Understanding and Building No SQLs
GIDS 2016 Understanding and Building No SQLsGIDS 2016 Understanding and Building No SQLs
GIDS 2016 Understanding and Building No SQLs
 
No SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability MeetupNo SQL and MongoDB - Hyderabad Scalability Meetup
No SQL and MongoDB - Hyderabad Scalability Meetup
 
Perl and Elasticsearch
Perl and ElasticsearchPerl and Elasticsearch
Perl and Elasticsearch
 
To SQL or NoSQL, that is the question
To SQL or NoSQL, that is the questionTo SQL or NoSQL, that is the question
To SQL or NoSQL, that is the question
 
Azure SQL DWH
Azure SQL DWHAzure SQL DWH
Azure SQL DWH
 
Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008
 
NoSQL
NoSQLNoSQL
NoSQL
 

Recently uploaded

zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

16 nosql

  • 1. CS315: Principles of Database Systems NoSQL Arnab Bhattacharya arnabb@cse.iitk.ac.in Computer Science and Engineering, Indian Institute of Technology, Kanpur http://web.cse.iitk.ac.in/˜cs315/ 2nd semester, 2013-14 Tue, Fri 1530-1700 at CS101 Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 1 / 12
  • 2. NoSQL NoSQL is Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 2 / 12
  • 3. NoSQL NoSQL is not “no-SQL” It is not only SQL It does not aim to provide the ACID properties Originated as no-SQL though Later changed since RDBMS is too powerful to always ignore Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 2 / 12
  • 4. NoSQL NoSQL is not “no-SQL” It is not only SQL It does not aim to provide the ACID properties Originated as no-SQL though Later changed since RDBMS is too powerful to always ignore Aims to provide Scalability Flexibility Naturalness Distribution Performance Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 2 / 12
  • 5. CAP theorem All of C, A, P cannot be satisfied simultaneously Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 3 / 12
  • 6. CAP theorem All of C, A, P cannot be satisfied simultaneously CA: single-site; partitioning is not allowed CP: what is available is consistent AP: everything is available but may not be consistent Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 3 / 12
  • 7. CAP theorem All of C, A, P cannot be satisfied simultaneously CA: single-site; partitioning is not allowed CP: what is available is consistent AP: everything is available but may not be consistent Not a theorem – just a hypothesis Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 3 / 12
  • 8. BASE properties Basically Available: System guarantees availability Soft state: State of system is soft, i.e., it may change without input to maintain consistency Eventual consistency: Data will be eventually consistent without any interim perturbation Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 4 / 12
  • 9. BASE properties Basically Available: System guarantees availability Soft state: State of system is soft, i.e., it may change without input to maintain consistency Eventual consistency: Data will be eventually consistent without any interim perturbation Sacrifices consistency Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 4 / 12
  • 10. BASE properties Basically Available: System guarantees availability Soft state: State of system is soft, i.e., it may change without input to maintain consistency Eventual consistency: Data will be eventually consistent without any interim perturbation Sacrifices consistency To counter ACID Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 4 / 12
  • 11. Types Four main types of NoSQL data stores: 1 Columnar families 2 Bigtable systems 3 Document databases 4 Graph databases Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 5 / 12
  • 12. Columnar storage Instead of rows being stored togther, columns are stored consecutively A single disk block (or a set of consecutive blocks) stores a single column family A column family may consist of one or multiple columns This set of columns is called a super column Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 6 / 12
  • 13. Columnar storage Instead of rows being stored togther, columns are stored consecutively A single disk block (or a set of consecutive blocks) stores a single column family A column family may consist of one or multiple columns This set of columns is called a super column Two main types Columnar relational models Key-value stores and/or big tables Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 6 / 12
  • 14. Columnar relational models Not NoSQL and is actually RDBMS Column-wise storage on the disk Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
  • 15. Columnar relational models Not NoSQL and is actually RDBMS Column-wise storage on the disk Allows faster querying when only few columns are touched on the entire data Allows compression of columns Provides better memory caching Joins are faster since they are mostly on similar columns from two tables Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
  • 16. Columnar relational models Not NoSQL and is actually RDBMS Column-wise storage on the disk Allows faster querying when only few columns are touched on the entire data Allows compression of columns Provides better memory caching Joins are faster since they are mostly on similar columns from two tables Is not good for updates Is not good when many columns of a few tuples are accessed Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
  • 17. Columnar relational models Not NoSQL and is actually RDBMS Column-wise storage on the disk Allows faster querying when only few columns are touched on the entire data Allows compression of columns Provides better memory caching Joins are faster since they are mostly on similar columns from two tables Is not good for updates Is not good when many columns of a few tuples are accessed Good for OLAP (online analytical processing) Not good for OLTP (online transaction processing) Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
  • 18. Columnar relational models Not NoSQL and is actually RDBMS Column-wise storage on the disk Allows faster querying when only few columns are touched on the entire data Allows compression of columns Provides better memory caching Joins are faster since they are mostly on similar columns from two tables Is not good for updates Is not good when many columns of a few tuples are accessed Good for OLAP (online analytical processing) Not good for OLTP (online transaction processing) Example: MonetDB Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 7 / 12
  • 19. Key-value stores Two columns: a key and a value Key is mostly text Value can be anything and is simply an object Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
  • 20. Key-value stores Two columns: a key and a value Key is mostly text Value can be anything and is simply an object Essentially, actual data becomes “value” and an unique id is generated which becomes “key” Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
  • 21. Key-value stores Two columns: a key and a value Key is mostly text Value can be anything and is simply an object Essentially, actual data becomes “value” and an unique id is generated which becomes “key” Whole database is then just one big table with these two columns Becomes schema-less Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
  • 22. Key-value stores Two columns: a key and a value Key is mostly text Value can be anything and is simply an object Essentially, actual data becomes “value” and an unique id is generated which becomes “key” Whole database is then just one big table with these two columns Becomes schema-less Can be distributed and is, thus, highly scalable So, in essence a big distributed hash table Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
  • 23. Key-value stores Two columns: a key and a value Key is mostly text Value can be anything and is simply an object Essentially, actual data becomes “value” and an unique id is generated which becomes “key” Whole database is then just one big table with these two columns Becomes schema-less Can be distributed and is, thus, highly scalable So, in essence a big distributed hash table All queries are on keys Keys are necessarily indexed Uses memcache where most queried keys are persisted in memory for faster access Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
  • 24. Key-value stores Two columns: a key and a value Key is mostly text Value can be anything and is simply an object Essentially, actual data becomes “value” and an unique id is generated which becomes “key” Whole database is then just one big table with these two columns Becomes schema-less Can be distributed and is, thus, highly scalable So, in essence a big distributed hash table All queries are on keys Keys are necessarily indexed Uses memcache where most queried keys are persisted in memory for faster access Example: Cassandra, CouchDB, Tokyo Cabinet, Redis Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 8 / 12
  • 25. Bigtable systems Started from Google’s BigTable implementation Uses a key-value store Data can be replicated for better availability Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 9 / 12
  • 26. Bigtable systems Started from Google’s BigTable implementation Uses a key-value store Data can be replicated for better availability Uses a timestamp Timestamp is used to Expire data Delete stale data Resolve read-write conflicts Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 9 / 12
  • 27. Bigtable systems Started from Google’s BigTable implementation Uses a key-value store Data can be replicated for better availability Uses a timestamp Timestamp is used to Expire data Delete stale data Resolve read-write conflicts Same value can be indexed using multiple keys Map-reduce framework to compute Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 9 / 12
  • 28. Bigtable systems Started from Google’s BigTable implementation Uses a key-value store Data can be replicated for better availability Uses a timestamp Timestamp is used to Expire data Delete stale data Resolve read-write conflicts Same value can be indexed using multiple keys Map-reduce framework to compute Example: BigTable, HBase, Cassandra, HyperTable, SimpleDB Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 9 / 12
  • 29. Document databases Uses documents as the main storage format of data Popular document formats are XML, JSON, BSON, YAML Document itself is the key while the content is the value Document can be indexed by id or simply its location (e.g., URI) Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 10 / 12
  • 30. Document databases Uses documents as the main storage format of data Popular document formats are XML, JSON, BSON, YAML Document itself is the key while the content is the value Document can be indexed by id or simply its location (e.g., URI) Content needs to be parsed to make sense Content can be organised further Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 10 / 12
  • 31. Document databases Uses documents as the main storage format of data Popular document formats are XML, JSON, BSON, YAML Document itself is the key while the content is the value Document can be indexed by id or simply its location (e.g., URI) Content needs to be parsed to make sense Content can be organised further Extremely useful for insert-once read-many scenarios Can use map-reduce framework to compute Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 10 / 12
  • 32. Document databases Uses documents as the main storage format of data Popular document formats are XML, JSON, BSON, YAML Document itself is the key while the content is the value Document can be indexed by id or simply its location (e.g., URI) Content needs to be parsed to make sense Content can be organised further Extremely useful for insert-once read-many scenarios Can use map-reduce framework to compute Example: MongoDB, CouchDB Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 10 / 12
  • 33. Graph databases Nodes represent entities Edges encode relationships between nodes Can be directed Can have hyper-edges as well Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 11 / 12
  • 34. Graph databases Nodes represent entities Edges encode relationships between nodes Can be directed Can have hyper-edges as well Easier to find distances and neighbors Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 11 / 12
  • 35. Graph databases Nodes represent entities Edges encode relationships between nodes Can be directed Can have hyper-edges as well Easier to find distances and neighbors Example: Neo4J, HyperGraph, Infinite Graph, FlockDB Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 11 / 12
  • 36. Discussion NoSQL, although started as anti-SQL, is no more so More a realisation that for some cases RDBMS does not scale or distribute, and in some other cases ACIDity is an overkill Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 12 / 12
  • 37. Discussion NoSQL, although started as anti-SQL, is no more so More a realisation that for some cases RDBMS does not scale or distribute, and in some other cases ACIDity is an overkill NoSQL is not good for every scenario Not every good feature reported has been validated Most legacy systems still use RDBMS Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 12 / 12
  • 38. Discussion NoSQL, although started as anti-SQL, is no more so More a realisation that for some cases RDBMS does not scale or distribute, and in some other cases ACIDity is an overkill NoSQL is not good for every scenario Not every good feature reported has been validated Most legacy systems still use RDBMS NoSQL horizon is shifting rapidly with almost no control or sense However, trend is for NoSQL as cloud computing and big data relies on it Arnab Bhattacharya (arnabb@cse.iitk.ac.in) CS315: NoSQL 2013-14 12 / 12