SlideShare a Scribd company logo
1 of 29
To SQL or
NoSQL?
That is the
question
Krishnakumar S
D E V C O N Kochi
28th March 2015
History of Database Systems
 1960’s : Hierarchical and Network (IMS, CODASYL etc.)
 1970’s : Beginning of theory of relational model of database
 1980’s : Rise of RDBMS and SQL
 1990’s : Spreadsheets and MySQL; evolution of web
 2000’s : Large enterprise & open source; Google & Amazon
 2010’s : Emergence of NoSQL systems
 2020’s : NewSQL?
CAP
theorem
RDBMS
 Strong foundation – Relational Model
 Highly Structured – rows, columns, data types
 Structured Query Language - standardized
 ACID properties – all or nothing
 Joins – new views from relationships
RDBMS – Weakness
 Joins – Not scalable
 Transactions – Read & write operations will
be slow because of locking resources
 Fixed definitions – Difficult to work with
highly variable data
 Document integration – difficult create reports
based on structured & unstructured data
Changing scenarios...
Changing scenarios...
Changing scenarios...
Changing scenarios...
What drives to NoSQL?
Velocity Agility
Volume
Variability
Any existing solution?
• Data partitioning
• Replication
• Clustering
• Query distribution
• Load balancing
• Consistency/Syncing
• Latency/Concurrency
• Network bottle neck
• Multiple data centers
• Distributed backups
• Node failures
• Voting algorithms for failure detection
• Administration of many systems
• Monitoring
RDBMS is scalable only if designed & administered correctly (Period)
NoSQL! What is in a name?
1998 :
• Carlo Strozzi developed a open-source relational database “Strozzi NoSQL”
• Database stores tables as ASCII files; tuples as tab separated values
• It doesn’t use SQL as query language – so given the name “NoSQL”
• Instead it used UNIX shell script and pipeline to retrieve data
Irony! A relational database is named as NoSQL!
2009 :
• Johan Oskarsson organized a meetup of people developing open-source,
distributed, non relational databases on June 11, 2009
• He wanted a simple twitter hash tag for the meetup; quick, memorable, & helps
Google search
• Eric Evans come up with the name NoSQL, for the single meetup
NoSQL! What is in a name?
• The name is negative
• The name does not describe the purpose of their meet up
• The name does not define the new database system
• But; the name just satisfied the twitter tag! And caught on like wildfire
What does it stands for!
• “No to SQL”? Not exactly
• “Not Only SQL”? Then what about SQL Server, Oracle etc.?
The answer is “You don’t worry about what it stands for!
NoSQL
• The NoSQL is a movement
• The NoSQL is an ecosystem for future database technology
• NoSQL is an accidental neologism. There is no prescriptive definition
Characteristics of NoSQL
• Not using the relational model
• Running well in clusters
• Open-source
• Built for 21st century web estates
• Schemaless
The most important result of NoSQL movement is; Polyglot Persistence
Theorems Ahead!
Brewer’s CAP theorem
• In 2000, Eric Brewer presented the CAP principle as conjuncture
• In 2002, Seth Gilbert & Nancy Lynch published a formal proof and rendered
the principle as CAP theorem
There are three essential system requirements necessary for the successful
design, implementation, and deployment of applications in distributed
computing
1. Consistency
2. Availability
3. Partition Tolerance
In majority of instances, a distributed system can only guarantee any two, not
all three
Brewer’s CAP theorem
Consistency refers to whether a system operates fully or not. Do all nodes
within a cluster see all the data they are supposed to? This is the same
idea presented in ACID
Availability means just as it sounds. Is the given service or system available
when requested? Does each request get a response outside of failure or
success?
Partition Tolerance represents the fact that a given system continues to
operate even under circumstances of data loss or system failure. A single
node failure should not cause the entire system to collapse.
In large scale, distributed, non relational systems, they need availability and
partition tolerance, so consistency suffers and ACID collapses
Brewer’s CAP theorem
Pick any two
CA AP
CP
RDBMS’s
SQL Server
Oracle
MySQL etc.
Availability
Each client can always read and
write
Consistency
All clients always have he same
view
of data
Partition
Tolerance
The system works well despite
physical
Network partitions
Bigtable, MongoDB, BerkleyDB, MemcacheDB, Hbase etc
Cassandra
CouchDB
Dynamo
Voldemort
BASE
Basically Available : states that the system does guarantee the availability
of the data as regards CAP Theorem; there will be a response to any
request. But, that response could still be ‘failure’ to obtain the requested
data or the data may be in an inconsistent or changing state
Soft state : The state of the system could change over time, so even during
times without input there may be changes going on due to ‘eventual
consistency,’ thus the state of the system is always ‘soft.’
Eventual Consistency : The system will eventually become consistent once
it stops receiving input. The data will propagate to everywhere it should
sooner or later, but the system will continue to receive input and is not
checking the consistency of every transaction before it moves onto the
next one
It’s OK to use stale data; it’s OK to give approximate answers.
NoSQL Data Architecture Patterns
Key-Value
key value
key value
key value
key value
Column-Family
Graph Document
Key-Value
Key-Value
key value
key value
key value
key value
 Keys used to access opaque
blobs of data
 Values can contain any type of
data (images, video)
Pros: scalable, simple API (put,
get, delete)
Cons: no way to query based on
the content of the value
Column family
Column-Family
 Key includes a row, column
family and column name
 Store versioned blobs in one
large table
 Queries can be done on rows,
column families and column
names
 Pros: Good scale out
 Cons: Can not query blob
content, row and column designs
are critical
Graph Store
Graph  Data is stored in a series of nodes
and properties
 Queries are really graph traversals
 Ideal when relationships between
data is key:
 e.g. social networks
 Pros: fast network search, works
with public linked data sets
 Cons: Poor scalability when graphs
don't fit into RAM, specialized query
language
Document Store
Document  Data stored in nested hierarchies
 Logical data remains stored
together as a unit
 Any item in the document can be
queried
 Pros: No object-relational
mapping layer, ideal for search
 Cons: Complex to implement,
incompatible with SQL
NoSQL & Functional Programming
NoSQL & Functional Programming
Polyglot Persistence
Different database systems are designed to solve different problems
Using single database engine for all the requirements leads to non-
performant solutions
The solution is polyglot persistence; a hybrid approach to data
persistence
NoSQL - Evolution
© Natalino Busa
References
• Making Sense of NoSQL – Dan McCreary and Ann Kelly
• NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot
Persistence - Pramod J. Sadalage and Martin Fowler
• Data Access for Highly-Scalable Solutions: Using SQL, NoSQL, and
Polyglot Persistence - John Sharp, Douglas McMurtry, Andrew
Oakley, Mani Subramanian, Hanzhong Zhang
To SQL or NoSQL, that is the question
To SQL or NoSQL, that is the question

More Related Content

What's hot

Oracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the uglyOracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the uglyJohn Kanagaraj
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7abdulrahmanhelan
 
Comparison between rdbms and nosql
Comparison between rdbms and nosqlComparison between rdbms and nosql
Comparison between rdbms and nosqlbharati k
 
Sql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSatya Pal
 
SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.Denis Reznik
 
Nonrelational Databases
Nonrelational DatabasesNonrelational Databases
Nonrelational DatabasesUdi Bauman
 
NoSQL databases and managing big data
NoSQL databases and managing big dataNoSQL databases and managing big data
NoSQL databases and managing big dataSteven Francia
 
What is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremWhat is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremRahul Jain
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databasesJames Serra
 
Considerations for using NoSQL technology on your next IT project
Considerations for using NoSQL technology on your next IT projectConsiderations for using NoSQL technology on your next IT project
Considerations for using NoSQL technology on your next IT projectAkmal Chaudhri
 
NoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenNoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenLorenzo Alberton
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systemselliando dias
 
SQL/NoSQL How to choose ?
SQL/NoSQL How to choose ?SQL/NoSQL How to choose ?
SQL/NoSQL How to choose ?Venu Anuganti
 
SQL, NoSQL, BigData in Data Architecture
SQL, NoSQL, BigData in Data ArchitectureSQL, NoSQL, BigData in Data Architecture
SQL, NoSQL, BigData in Data ArchitectureVenu Anuganti
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQLDon Demcsak
 

What's hot (20)

Oracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the uglyOracle vs NoSQL – The good, the bad and the ugly
Oracle vs NoSQL – The good, the bad and the ugly
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
 
Comparison between rdbms and nosql
Comparison between rdbms and nosqlComparison between rdbms and nosql
Comparison between rdbms and nosql
 
Sql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explained
 
SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.
 
Nonrelational Databases
Nonrelational DatabasesNonrelational Databases
Nonrelational Databases
 
NoSQL databases and managing big data
NoSQL databases and managing big dataNoSQL databases and managing big data
NoSQL databases and managing big data
 
NoSQL Consepts
NoSQL ConseptsNoSQL Consepts
NoSQL Consepts
 
What is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremWhat is NoSQL and CAP Theorem
What is NoSQL and CAP Theorem
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
 
Considerations for using NoSQL technology on your next IT project
Considerations for using NoSQL technology on your next IT projectConsiderations for using NoSQL technology on your next IT project
Considerations for using NoSQL technology on your next IT project
 
Relational vs. Non-Relational
Relational vs. Non-RelationalRelational vs. Non-Relational
Relational vs. Non-Relational
 
NoSQL Databases: Why, what and when
NoSQL Databases: Why, what and whenNoSQL Databases: Why, what and when
NoSQL Databases: Why, what and when
 
Sql vs nosql
Sql vs nosqlSql vs nosql
Sql vs nosql
 
Nosql intro
Nosql introNosql intro
Nosql intro
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systems
 
SQL/NoSQL How to choose ?
SQL/NoSQL How to choose ?SQL/NoSQL How to choose ?
SQL/NoSQL How to choose ?
 
SQL, NoSQL, BigData in Data Architecture
SQL, NoSQL, BigData in Data ArchitectureSQL, NoSQL, BigData in Data Architecture
SQL, NoSQL, BigData in Data Architecture
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQL
 

Viewers also liked

Apache Spark - Las Vegas Big Data Meetup Dec 3rd 2014
Apache Spark - Las Vegas Big Data Meetup Dec 3rd 2014Apache Spark - Las Vegas Big Data Meetup Dec 3rd 2014
Apache Spark - Las Vegas Big Data Meetup Dec 3rd 2014cdmaxime
 
Nosql Now 2012: MongoDB Use Cases
Nosql Now 2012: MongoDB Use CasesNosql Now 2012: MongoDB Use Cases
Nosql Now 2012: MongoDB Use CasesMongoDB
 
New Trends in Data Management in the Information Industries
New Trends in Data Management in the Information Industries New Trends in Data Management in the Information Industries
New Trends in Data Management in the Information Industries Matt Turner
 
NoSQL Now! Webinar Series: Migrating Security Policies from SQL to NoSQL
NoSQL Now! Webinar Series: Migrating Security Policies from SQL to NoSQLNoSQL Now! Webinar Series: Migrating Security Policies from SQL to NoSQL
NoSQL Now! Webinar Series: Migrating Security Policies from SQL to NoSQLDATAVERSITY
 
Common Entrepreneur Mistakes
Common Entrepreneur MistakesCommon Entrepreneur Mistakes
Common Entrepreneur MistakesBart Greenberg
 
Startups: Attracting and Retaining Talent (updated 3/6/13)
Startups: Attracting and Retaining Talent (updated 3/6/13)Startups: Attracting and Retaining Talent (updated 3/6/13)
Startups: Attracting and Retaining Talent (updated 3/6/13)Patrick Seaman
 
Building A Stable, Fundable Startup
Building A Stable, Fundable StartupBuilding A Stable, Fundable Startup
Building A Stable, Fundable Startupportlandten
 
Kaplowitch equity dos and donts
Kaplowitch equity dos and dontsKaplowitch equity dos and donts
Kaplowitch equity dos and dontsBFBootcamp
 
Employee equity incentives
Employee equity incentivesEmployee equity incentives
Employee equity incentivesBart Greenberg
 
Guaranteed vs Incentive Pay - What's the Right Balance?
Guaranteed vs Incentive Pay - What's the Right Balance?Guaranteed vs Incentive Pay - What's the Right Balance?
Guaranteed vs Incentive Pay - What's the Right Balance?The VisionLink Advisory Group
 
10 Movies Every Entrepreneur Should Watch
10 Movies Every Entrepreneur Should Watch10 Movies Every Entrepreneur Should Watch
10 Movies Every Entrepreneur Should WatchLawTrades
 
Succession Planning using Equity Incentive Plan and ESOPs
Succession Planning using Equity Incentive Plan and ESOPsSuccession Planning using Equity Incentive Plan and ESOPs
Succession Planning using Equity Incentive Plan and ESOPswifilawgroup
 
Negotiating as Consultant
Negotiating as ConsultantNegotiating as Consultant
Negotiating as ConsultantJamie Lee
 
Converting Employees to Owners: Employee Share Purchase Plans
Converting Employees to Owners: Employee Share Purchase PlansConverting Employees to Owners: Employee Share Purchase Plans
Converting Employees to Owners: Employee Share Purchase PlansNow Dentons
 
Startup Equity - Startup summer camp, 2014
Startup Equity - Startup summer camp, 2014Startup Equity - Startup summer camp, 2014
Startup Equity - Startup summer camp, 2014Pankaj Saharan
 
How to Divide the Pie? Dynamic Equity Share by Mike Moyer
How to Divide the Pie? Dynamic Equity Share by Mike Moyer How to Divide the Pie? Dynamic Equity Share by Mike Moyer
How to Divide the Pie? Dynamic Equity Share by Mike Moyer Ed Kuiters
 
Raising Your Seed Round Financing: Should You Use Convertible Notes or Prefe...
Raising Your Seed Round Financing:  Should You Use Convertible Notes or Prefe...Raising Your Seed Round Financing:  Should You Use Convertible Notes or Prefe...
Raising Your Seed Round Financing: Should You Use Convertible Notes or Prefe...Bart Greenberg
 
Startup MBA 3.1 - Funding, equity, valuations
Startup MBA 3.1 - Funding, equity, valuationsStartup MBA 3.1 - Funding, equity, valuations
Startup MBA 3.1 - Funding, equity, valuationsFounder-Centric
 

Viewers also liked (20)

Apache Spark - Las Vegas Big Data Meetup Dec 3rd 2014
Apache Spark - Las Vegas Big Data Meetup Dec 3rd 2014Apache Spark - Las Vegas Big Data Meetup Dec 3rd 2014
Apache Spark - Las Vegas Big Data Meetup Dec 3rd 2014
 
Nosql Now 2012: MongoDB Use Cases
Nosql Now 2012: MongoDB Use CasesNosql Now 2012: MongoDB Use Cases
Nosql Now 2012: MongoDB Use Cases
 
New Trends in Data Management in the Information Industries
New Trends in Data Management in the Information Industries New Trends in Data Management in the Information Industries
New Trends in Data Management in the Information Industries
 
Nosql essentials
Nosql essentialsNosql essentials
Nosql essentials
 
NoSQL Now! Webinar Series: Migrating Security Policies from SQL to NoSQL
NoSQL Now! Webinar Series: Migrating Security Policies from SQL to NoSQLNoSQL Now! Webinar Series: Migrating Security Policies from SQL to NoSQL
NoSQL Now! Webinar Series: Migrating Security Policies from SQL to NoSQL
 
Common Entrepreneur Mistakes
Common Entrepreneur MistakesCommon Entrepreneur Mistakes
Common Entrepreneur Mistakes
 
Startups: Attracting and Retaining Talent (updated 3/6/13)
Startups: Attracting and Retaining Talent (updated 3/6/13)Startups: Attracting and Retaining Talent (updated 3/6/13)
Startups: Attracting and Retaining Talent (updated 3/6/13)
 
Building A Stable, Fundable Startup
Building A Stable, Fundable StartupBuilding A Stable, Fundable Startup
Building A Stable, Fundable Startup
 
Kaplowitch equity dos and donts
Kaplowitch equity dos and dontsKaplowitch equity dos and donts
Kaplowitch equity dos and donts
 
Employee equity incentives
Employee equity incentivesEmployee equity incentives
Employee equity incentives
 
Guaranteed vs Incentive Pay - What's the Right Balance?
Guaranteed vs Incentive Pay - What's the Right Balance?Guaranteed vs Incentive Pay - What's the Right Balance?
Guaranteed vs Incentive Pay - What's the Right Balance?
 
10 Movies Every Entrepreneur Should Watch
10 Movies Every Entrepreneur Should Watch10 Movies Every Entrepreneur Should Watch
10 Movies Every Entrepreneur Should Watch
 
Succession Planning using Equity Incentive Plan and ESOPs
Succession Planning using Equity Incentive Plan and ESOPsSuccession Planning using Equity Incentive Plan and ESOPs
Succession Planning using Equity Incentive Plan and ESOPs
 
Negotiating as Consultant
Negotiating as ConsultantNegotiating as Consultant
Negotiating as Consultant
 
Converting Employees to Owners: Employee Share Purchase Plans
Converting Employees to Owners: Employee Share Purchase PlansConverting Employees to Owners: Employee Share Purchase Plans
Converting Employees to Owners: Employee Share Purchase Plans
 
Startup Equity - Startup summer camp, 2014
Startup Equity - Startup summer camp, 2014Startup Equity - Startup summer camp, 2014
Startup Equity - Startup summer camp, 2014
 
How to Divide the Pie? Dynamic Equity Share by Mike Moyer
How to Divide the Pie? Dynamic Equity Share by Mike Moyer How to Divide the Pie? Dynamic Equity Share by Mike Moyer
How to Divide the Pie? Dynamic Equity Share by Mike Moyer
 
ESOPs LEGAL & PROCEDURAL ASPECTS
ESOPs LEGAL & PROCEDURAL ASPECTSESOPs LEGAL & PROCEDURAL ASPECTS
ESOPs LEGAL & PROCEDURAL ASPECTS
 
Raising Your Seed Round Financing: Should You Use Convertible Notes or Prefe...
Raising Your Seed Round Financing:  Should You Use Convertible Notes or Prefe...Raising Your Seed Round Financing:  Should You Use Convertible Notes or Prefe...
Raising Your Seed Round Financing: Should You Use Convertible Notes or Prefe...
 
Startup MBA 3.1 - Funding, equity, valuations
Startup MBA 3.1 - Funding, equity, valuationsStartup MBA 3.1 - Funding, equity, valuations
Startup MBA 3.1 - Funding, equity, valuations
 

Similar to To SQL or NoSQL, that is the question

Enterprise NoSQL: Silver Bullet or Poison Pill
Enterprise NoSQL: Silver Bullet or Poison PillEnterprise NoSQL: Silver Bullet or Poison Pill
Enterprise NoSQL: Silver Bullet or Poison PillBilly Newport
 
Unit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxUnit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxvvpadhu
 
مقدمة عن NoSQL بالعربي
مقدمة عن NoSQL بالعربيمقدمة عن NoSQL بالعربي
مقدمة عن NoSQL بالعربيMohamed Galal
 
NO SQL Databases, Big Data and the cloud
NO SQL Databases, Big Data and the cloudNO SQL Databases, Big Data and the cloud
NO SQL Databases, Big Data and the cloudManu Cohen-Yashar
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introductionPooyan Mehrparvar
 
Modern databases and its challenges (SQL ,NoSQL, NewSQL)
Modern databases and its challenges (SQL ,NoSQL, NewSQL)Modern databases and its challenges (SQL ,NoSQL, NewSQL)
Modern databases and its challenges (SQL ,NoSQL, NewSQL)Mohamed Galal
 
NO SQL: What, Why, How
NO SQL: What, Why, HowNO SQL: What, Why, How
NO SQL: What, Why, HowIgor Moochnick
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabasesAdi Challa
 
no sql presentation
no sql presentationno sql presentation
no sql presentationchandanm2
 

Similar to To SQL or NoSQL, that is the question (20)

NoSQL Basics - A Quick Tour
NoSQL Basics - A Quick TourNoSQL Basics - A Quick Tour
NoSQL Basics - A Quick Tour
 
Enterprise NoSQL: Silver Bullet or Poison Pill
Enterprise NoSQL: Silver Bullet or Poison PillEnterprise NoSQL: Silver Bullet or Poison Pill
Enterprise NoSQL: Silver Bullet or Poison Pill
 
Unit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxUnit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docx
 
مقدمة عن NoSQL بالعربي
مقدمة عن NoSQL بالعربيمقدمة عن NoSQL بالعربي
مقدمة عن NoSQL بالعربي
 
NO SQL Databases, Big Data and the cloud
NO SQL Databases, Big Data and the cloudNO SQL Databases, Big Data and the cloud
NO SQL Databases, Big Data and the cloud
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
NoSql Brownbag
NoSql BrownbagNoSql Brownbag
NoSql Brownbag
 
Modern databases and its challenges (SQL ,NoSQL, NewSQL)
Modern databases and its challenges (SQL ,NoSQL, NewSQL)Modern databases and its challenges (SQL ,NoSQL, NewSQL)
Modern databases and its challenges (SQL ,NoSQL, NewSQL)
 
nosql.pptx
nosql.pptxnosql.pptx
nosql.pptx
 
No SQL
No SQLNo SQL
No SQL
 
NO SQL: What, Why, How
NO SQL: What, Why, HowNO SQL: What, Why, How
NO SQL: What, Why, How
 
No sql databases
No sql databasesNo sql databases
No sql databases
 
NoSQL
NoSQLNoSQL
NoSQL
 
ch02models.pptx
ch02models.pptxch02models.pptx
ch02models.pptx
 
ch02models.pptx
ch02models.pptxch02models.pptx
ch02models.pptx
 
NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabases
 
no sql presentation
no sql presentationno sql presentation
no sql presentation
 
No sq lv2
No sq lv2No sq lv2
No sq lv2
 
unit2-ppt1.pptx
unit2-ppt1.pptxunit2-ppt1.pptx
unit2-ppt1.pptx
 

Recently uploaded

Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
MK KOMUNIKASI DATA (TI)komdat komdat.docx
MK KOMUNIKASI DATA (TI)komdat komdat.docxMK KOMUNIKASI DATA (TI)komdat komdat.docx
MK KOMUNIKASI DATA (TI)komdat komdat.docxUnduhUnggah1
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxdolaknnilon
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfchwongval
 

Recently uploaded (20)

Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
MK KOMUNIKASI DATA (TI)komdat komdat.docx
MK KOMUNIKASI DATA (TI)komdat komdat.docxMK KOMUNIKASI DATA (TI)komdat komdat.docx
MK KOMUNIKASI DATA (TI)komdat komdat.docx
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
IMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptxIMA MSN - Medical Students Network (2).pptx
IMA MSN - Medical Students Network (2).pptx
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdf
 

To SQL or NoSQL, that is the question

  • 1. To SQL or NoSQL? That is the question Krishnakumar S D E V C O N Kochi 28th March 2015
  • 2. History of Database Systems  1960’s : Hierarchical and Network (IMS, CODASYL etc.)  1970’s : Beginning of theory of relational model of database  1980’s : Rise of RDBMS and SQL  1990’s : Spreadsheets and MySQL; evolution of web  2000’s : Large enterprise & open source; Google & Amazon  2010’s : Emergence of NoSQL systems  2020’s : NewSQL? CAP theorem
  • 3. RDBMS  Strong foundation – Relational Model  Highly Structured – rows, columns, data types  Structured Query Language - standardized  ACID properties – all or nothing  Joins – new views from relationships
  • 4. RDBMS – Weakness  Joins – Not scalable  Transactions – Read & write operations will be slow because of locking resources  Fixed definitions – Difficult to work with highly variable data  Document integration – difficult create reports based on structured & unstructured data
  • 9. What drives to NoSQL? Velocity Agility Volume Variability
  • 10. Any existing solution? • Data partitioning • Replication • Clustering • Query distribution • Load balancing • Consistency/Syncing • Latency/Concurrency • Network bottle neck • Multiple data centers • Distributed backups • Node failures • Voting algorithms for failure detection • Administration of many systems • Monitoring RDBMS is scalable only if designed & administered correctly (Period)
  • 11. NoSQL! What is in a name? 1998 : • Carlo Strozzi developed a open-source relational database “Strozzi NoSQL” • Database stores tables as ASCII files; tuples as tab separated values • It doesn’t use SQL as query language – so given the name “NoSQL” • Instead it used UNIX shell script and pipeline to retrieve data Irony! A relational database is named as NoSQL! 2009 : • Johan Oskarsson organized a meetup of people developing open-source, distributed, non relational databases on June 11, 2009 • He wanted a simple twitter hash tag for the meetup; quick, memorable, & helps Google search • Eric Evans come up with the name NoSQL, for the single meetup
  • 12. NoSQL! What is in a name? • The name is negative • The name does not describe the purpose of their meet up • The name does not define the new database system • But; the name just satisfied the twitter tag! And caught on like wildfire What does it stands for! • “No to SQL”? Not exactly • “Not Only SQL”? Then what about SQL Server, Oracle etc.? The answer is “You don’t worry about what it stands for!
  • 13. NoSQL • The NoSQL is a movement • The NoSQL is an ecosystem for future database technology • NoSQL is an accidental neologism. There is no prescriptive definition Characteristics of NoSQL • Not using the relational model • Running well in clusters • Open-source • Built for 21st century web estates • Schemaless The most important result of NoSQL movement is; Polyglot Persistence Theorems Ahead!
  • 14. Brewer’s CAP theorem • In 2000, Eric Brewer presented the CAP principle as conjuncture • In 2002, Seth Gilbert & Nancy Lynch published a formal proof and rendered the principle as CAP theorem There are three essential system requirements necessary for the successful design, implementation, and deployment of applications in distributed computing 1. Consistency 2. Availability 3. Partition Tolerance In majority of instances, a distributed system can only guarantee any two, not all three
  • 15. Brewer’s CAP theorem Consistency refers to whether a system operates fully or not. Do all nodes within a cluster see all the data they are supposed to? This is the same idea presented in ACID Availability means just as it sounds. Is the given service or system available when requested? Does each request get a response outside of failure or success? Partition Tolerance represents the fact that a given system continues to operate even under circumstances of data loss or system failure. A single node failure should not cause the entire system to collapse. In large scale, distributed, non relational systems, they need availability and partition tolerance, so consistency suffers and ACID collapses
  • 16. Brewer’s CAP theorem Pick any two CA AP CP RDBMS’s SQL Server Oracle MySQL etc. Availability Each client can always read and write Consistency All clients always have he same view of data Partition Tolerance The system works well despite physical Network partitions Bigtable, MongoDB, BerkleyDB, MemcacheDB, Hbase etc Cassandra CouchDB Dynamo Voldemort
  • 17. BASE Basically Available : states that the system does guarantee the availability of the data as regards CAP Theorem; there will be a response to any request. But, that response could still be ‘failure’ to obtain the requested data or the data may be in an inconsistent or changing state Soft state : The state of the system could change over time, so even during times without input there may be changes going on due to ‘eventual consistency,’ thus the state of the system is always ‘soft.’ Eventual Consistency : The system will eventually become consistent once it stops receiving input. The data will propagate to everywhere it should sooner or later, but the system will continue to receive input and is not checking the consistency of every transaction before it moves onto the next one It’s OK to use stale data; it’s OK to give approximate answers.
  • 18. NoSQL Data Architecture Patterns Key-Value key value key value key value key value Column-Family Graph Document
  • 19. Key-Value Key-Value key value key value key value key value  Keys used to access opaque blobs of data  Values can contain any type of data (images, video) Pros: scalable, simple API (put, get, delete) Cons: no way to query based on the content of the value
  • 20. Column family Column-Family  Key includes a row, column family and column name  Store versioned blobs in one large table  Queries can be done on rows, column families and column names  Pros: Good scale out  Cons: Can not query blob content, row and column designs are critical
  • 21. Graph Store Graph  Data is stored in a series of nodes and properties  Queries are really graph traversals  Ideal when relationships between data is key:  e.g. social networks  Pros: fast network search, works with public linked data sets  Cons: Poor scalability when graphs don't fit into RAM, specialized query language
  • 22. Document Store Document  Data stored in nested hierarchies  Logical data remains stored together as a unit  Any item in the document can be queried  Pros: No object-relational mapping layer, ideal for search  Cons: Complex to implement, incompatible with SQL
  • 23. NoSQL & Functional Programming
  • 24. NoSQL & Functional Programming
  • 25. Polyglot Persistence Different database systems are designed to solve different problems Using single database engine for all the requirements leads to non- performant solutions The solution is polyglot persistence; a hybrid approach to data persistence
  • 26. NoSQL - Evolution © Natalino Busa
  • 27. References • Making Sense of NoSQL – Dan McCreary and Ann Kelly • NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence - Pramod J. Sadalage and Martin Fowler • Data Access for Highly-Scalable Solutions: Using SQL, NoSQL, and Polyglot Persistence - John Sharp, Douglas McMurtry, Andrew Oakley, Mani Subramanian, Hanzhong Zhang