SlideShare a Scribd company logo
1 of 14
© 2011 Fidelity National Information Services, Inc. and its subsidiaries.
NoSQL – An Introduction
Sandeep Kumar
Not Only SQL
Agenda
•Introduction to NoSQL
•Motivation behind NoSQL
•Where NoSQL Fits
•Theory of NoSQL – CAP (NoSQL principles)
•Types of NoSQL Databases
•Example with MongoDB
•Match with your favorite (RDBMS)
•Question & Answer
• NoSQL is a whole new way of thinking about a database.
• Sometimes it revered to as 'not only SQL'.
• Schema-Less
– It is not built on tables and does not employ SQL to manipulate
data.
• It also may not provide full ACID, but still has a distributed and fault
tolerant architecture.
• There are more than one storage mechanism that could be used
based on the needs
• Mostly open-source
• May not be the best solution for all situations
• Many of the big giants in e-Commerce, Social Networking like flipKart,
Amazon, Facebook, Linkedin etc.. have adopted this concept.
Introduction to NoSQL
Motivation behind NoSQL
• Scale out approach (Sharding)
The group of servers together forms a clustered
storage array and provides LUNs (Logical Unit Numbers)
or file shares over a network
• NoSQL (Non-Relational) database technology
• NoSQL refers to progressive data management engines that go beyond
legacy relational databases in satisfying the needs of today’s modern
business applications.
• A very flexible data model, horizontal
Scalability, distributed architectures.
• And the use of languages and interfaces that are “not only” SQL typically
characterize NoSQL technology.
How it changed the way of handling data for…
• First reason to use NoSQL is because you have big data projects to tackle. A
big data project is normally typified by:
– Data velocity – lots of data coming in very quickly, possibly from different locations
– Data variety – storage of data that is structured, semi-structured, and unstructured
– Data volume – data that involves many terabytes or petabytes in size
– Data complexity – data that is stored and managed in different locales, data centers,
or cloud geo-zones
• Scale Out approach.
• Application driven schema.
• You need a better architecture.
• You need continuous availability for an application.
• You need location independence for a system.
• You need modern transaction support.
• You need a more flexible data model.
Where NoSQL Fits
Theory of NoSQL - CAP
Consistency
• All nodes see the same data at the same time
Availability
• A guarantee that every request receives a
response about whether it succeeded/failed
Partition Tolerance
• Multiple entry points
• System continues to operate despite
arbitrary partitioning due to network
failures
A P
C
Thumb rule is to pre join the data.
CAP Theorem:
satisfying all three at the same
time is impossible
CA
AP
CP
Types of NoSQL Databases
Key – Value
Data Model:
• Global key-value mapping
• Big scalable HashMap
• Highly fault tolerant (typically)
Pros:
• Simple data model
• Scalable
Cons:
• Create your own “foreign keys”
• Poor for complex data
Key Value
“FIS”
{“C-5, Sector-126, Noida,
India – 301306″}
Types of NoSQL Databases (Cont…)
Document Oriented
Data Model:
• A collection of documents
• A document is a key value collection
• Index-centric, lots of map-reduce
Pros:
• Simple, Powerful data model
• Scalable
Cons:
• Poor for interconnected data
• Query model limited to keys and indexes
• Map reduce for larger queries
Document
{company: “FIS”,
OfficeAddress: {“B-25, Sector-58,
Noida, India – 201301″}}
Types of NoSQL Databases (Cont…)
Column Family
Data Model:
• A big table, with column families
• Map Reduce for querying/processing
Pros:
• Supports Simi-Structured Data
• Naturally Indexed (columns)
• Scalable
Cons:
• Poor for interconnected data
Column Families
{FIS: {Address: {city: Noida,pincode:
201301},details: {strength: 250,projects:
20}}
Types of NoSQL Databases (Cont…)
Graph Family
Data Model:
• Nodes and Relationships
Pros:
• Powerful data model, as general as RDBMS
• Connected data locally indexed
• Easy to query
Cons:
• Sharding (Still under optimization)
• Scales UP reasonably well
• Requires rewiring your brain
Example with MongoDB
Document Store
RDBMS MongoDB
Database Database
Table , View Collection
Row Document (JSON, BSON)
Column Field
Index Index
Join Embedded Document
Foreign Key Reference
Partition Shard
> db.user.findOne({age:39})
{
"_id" : ObjectId("5114e0bd42…"),
"first" : “Sandeep",
"last" : “Kumar",
"age" : 34,
"interests" : [
"Reading",
"Mountain Biking” ]
"favorites": {
"color": "Blue"}
}
CRUD Example
> db.user.insert({
first: "John",
last : "Doe",
age: 39
})
> db.user.find ()
{
"_id" : ObjectId("51…"),
"first" : "John",
"last" : "Doe",
"age" : 39
}
> db.user.update(
{"_id" :
ObjectId("51…")},
{
$set: {
age: 40,
salary: 7000}
}
)
> db.user.remove({
"first": /^J/
})
Match with your favorite (RDBMS)
Lets conclude…
RDBMS NoSQL
Scale up Scale out
Offers a big feature set and data
integrity
May not need all features, cost and
complexity
Data Modeling -Schema Schema less
Relational Data Model Pre-Joined Document data model
Fit with Structured data Best suits for unstructured data
Doesn’t fit with modern Agile
development
Best fit for Agile development
Required great precision Faster Data Processing
Easy Querying Overhead for complex queries
Offers the degree of reliability Doesn’t offers degree of reliability
Consistency Compromise with consistency
Customer support No customer support
References :
http://www.leavcom.com/pdf/NoSQL.pdf
http://www.couchbase.com/sites/default/files/uploads/all/whitepapers/Couchbase_W
hitepaper_Transitioning_Relational_to_NoSQL.pdf
https://en.wikipedia.org/wiki/NoSQL
Thanks for participating!

More Related Content

What's hot

Analyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The CloudAnalyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The CloudRobert Dempsey
 
Practical guide to architecting data lakes - Avinash Ramineni - Phoenix Data...
Practical guide to architecting data lakes -  Avinash Ramineni - Phoenix Data...Practical guide to architecting data lakes -  Avinash Ramineni - Phoenix Data...
Practical guide to architecting data lakes - Avinash Ramineni - Phoenix Data...Avinash Ramineni
 
Database awareness
Database awarenessDatabase awareness
Database awarenesskloia
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introductionPooyan Mehrparvar
 
Oracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data ArchitectureOracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data ArchitectureArthur Gimpel
 
Introduction to no sql database
Introduction to no sql databaseIntroduction to no sql database
Introduction to no sql databaseHeman Hosainpana
 
Strata+Hadoop World NY 2016 - Avinash Ramineni
Strata+Hadoop World NY 2016 - Avinash RamineniStrata+Hadoop World NY 2016 - Avinash Ramineni
Strata+Hadoop World NY 2016 - Avinash RamineniAvinash Ramineni
 
Data modeling trends for analytics
Data modeling trends for analyticsData modeling trends for analytics
Data modeling trends for analyticsIke Ellis
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databasesJames Serra
 
Should I move my database to the cloud?
Should I move my database to the cloud?Should I move my database to the cloud?
Should I move my database to the cloud?James Serra
 
Introduction to PolyBase
Introduction to PolyBaseIntroduction to PolyBase
Introduction to PolyBaseJames Serra
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBAhmed Farag
 
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 questionKrishnakumar S
 
The Value of Explicit Schema for Graph Use Cases
The Value of Explicit Schema for Graph Use CasesThe Value of Explicit Schema for Graph Use Cases
The Value of Explicit Schema for Graph Use CasesInfiniteGraph
 
Delivering rapid-fire Analytics with Snowflake and Tableau
Delivering rapid-fire Analytics with Snowflake and TableauDelivering rapid-fire Analytics with Snowflake and Tableau
Delivering rapid-fire Analytics with Snowflake and TableauHarald Erb
 

What's hot (20)

Analyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The CloudAnalyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The Cloud
 
Practical guide to architecting data lakes - Avinash Ramineni - Phoenix Data...
Practical guide to architecting data lakes -  Avinash Ramineni - Phoenix Data...Practical guide to architecting data lakes -  Avinash Ramineni - Phoenix Data...
Practical guide to architecting data lakes - Avinash Ramineni - Phoenix Data...
 
Database awareness
Database awarenessDatabase awareness
Database awareness
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
Oracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data ArchitectureOracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data Architecture
 
Introduction to azure document db
Introduction to azure document dbIntroduction to azure document db
Introduction to azure document db
 
NoSql
NoSqlNoSql
NoSql
 
Introduction to no sql database
Introduction to no sql databaseIntroduction to no sql database
Introduction to no sql database
 
Strata+Hadoop World NY 2016 - Avinash Ramineni
Strata+Hadoop World NY 2016 - Avinash RamineniStrata+Hadoop World NY 2016 - Avinash Ramineni
Strata+Hadoop World NY 2016 - Avinash Ramineni
 
NoSQL and Couchbase
NoSQL and CouchbaseNoSQL and Couchbase
NoSQL and Couchbase
 
Data modeling trends for analytics
Data modeling trends for analyticsData modeling trends for analytics
Data modeling trends for analytics
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
 
Should I move my database to the cloud?
Should I move my database to the cloud?Should I move my database to the cloud?
Should I move my database to the cloud?
 
Introduction to Azure Data Lake
Introduction to Azure Data LakeIntroduction to Azure Data Lake
Introduction to Azure Data Lake
 
Introduction to PolyBase
Introduction to PolyBaseIntroduction to PolyBase
Introduction to PolyBase
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDB
 
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
 
The Value of Explicit Schema for Graph Use Cases
The Value of Explicit Schema for Graph Use CasesThe Value of Explicit Schema for Graph Use Cases
The Value of Explicit Schema for Graph Use Cases
 
Architecting a datalake
Architecting a datalakeArchitecting a datalake
Architecting a datalake
 
Delivering rapid-fire Analytics with Snowflake and Tableau
Delivering rapid-fire Analytics with Snowflake and TableauDelivering rapid-fire Analytics with Snowflake and Tableau
Delivering rapid-fire Analytics with Snowflake and Tableau
 

Similar to Introduction to NoSQL Databases

NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabasesAdi Challa
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageBethmi Gunasekara
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7abdulrahmanhelan
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxRahul Borate
 
Evolution of Distributed Database Technologies in the Digital era
Evolution of Distributed Database Technologies in the Digital eraEvolution of Distributed Database Technologies in the Digital era
Evolution of Distributed Database Technologies in the Digital eraVishal Puri
 
NoSQL Architecture Overview
NoSQL Architecture OverviewNoSQL Architecture Overview
NoSQL Architecture OverviewChristopher Foot
 
NoSQL - 05March2014 Seminar
NoSQL - 05March2014 SeminarNoSQL - 05March2014 Seminar
NoSQL - 05March2014 SeminarJainul Musani
 
Introduction to NoSQL database technology
Introduction to NoSQL database technologyIntroduction to NoSQL database technology
Introduction to NoSQL database technologynicolausalex722
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxRahul Borate
 
How to Survive as a Data Architect in a Polyglot Database World
How to Survive as a Data Architect in a Polyglot Database WorldHow to Survive as a Data Architect in a Polyglot Database World
How to Survive as a Data Architect in a Polyglot Database WorldKaren Lopez
 
SQL vs NoSQL Data Modeling.pptx
SQL vs NoSQL Data Modeling.pptxSQL vs NoSQL Data Modeling.pptx
SQL vs NoSQL Data Modeling.pptxGarimaHasija1
 
Chapter1: NoSQL: It’s about making intelligent choices
Chapter1: NoSQL: It’s about making intelligent choicesChapter1: NoSQL: It’s about making intelligent choices
Chapter1: NoSQL: It’s about making intelligent choicesMaynooth University
 
Introduction to nosql | NoSQL databases
Introduction to nosql | NoSQL databasesIntroduction to nosql | NoSQL databases
Introduction to nosql | NoSQL databasesShilpaKrishna6
 
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...Qian Lin
 

Similar to Introduction to NoSQL Databases (20)

NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabases
 
NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
 
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data Storage
 
NoSQL
NoSQLNoSQL
NoSQL
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7
 
BigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearchBigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearch
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
 
Evolution of Distributed Database Technologies in the Digital era
Evolution of Distributed Database Technologies in the Digital eraEvolution of Distributed Database Technologies in the Digital era
Evolution of Distributed Database Technologies in the Digital era
 
NoSQL Architecture Overview
NoSQL Architecture OverviewNoSQL Architecture Overview
NoSQL Architecture Overview
 
NoSQL - 05March2014 Seminar
NoSQL - 05March2014 SeminarNoSQL - 05March2014 Seminar
NoSQL - 05March2014 Seminar
 
Introduction to NoSQL database technology
Introduction to NoSQL database technologyIntroduction to NoSQL database technology
Introduction to NoSQL database technology
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
 
How to Survive as a Data Architect in a Polyglot Database World
How to Survive as a Data Architect in a Polyglot Database WorldHow to Survive as a Data Architect in a Polyglot Database World
How to Survive as a Data Architect in a Polyglot Database World
 
SQL vs NoSQL Data Modeling.pptx
SQL vs NoSQL Data Modeling.pptxSQL vs NoSQL Data Modeling.pptx
SQL vs NoSQL Data Modeling.pptx
 
Database Technologies
Database TechnologiesDatabase Technologies
Database Technologies
 
Chapter1: NoSQL: It’s about making intelligent choices
Chapter1: NoSQL: It’s about making intelligent choicesChapter1: NoSQL: It’s about making intelligent choices
Chapter1: NoSQL: It’s about making intelligent choices
 
Introduction to nosql | NoSQL databases
Introduction to nosql | NoSQL databasesIntroduction to nosql | NoSQL databases
Introduction to nosql | NoSQL databases
 
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
A Survey of Advanced Non-relational Database Systems: Approaches and Applicat...
 

Introduction to NoSQL Databases

  • 1. © 2011 Fidelity National Information Services, Inc. and its subsidiaries. NoSQL – An Introduction Sandeep Kumar Not Only SQL
  • 2. Agenda •Introduction to NoSQL •Motivation behind NoSQL •Where NoSQL Fits •Theory of NoSQL – CAP (NoSQL principles) •Types of NoSQL Databases •Example with MongoDB •Match with your favorite (RDBMS) •Question & Answer
  • 3. • NoSQL is a whole new way of thinking about a database. • Sometimes it revered to as 'not only SQL'. • Schema-Less – It is not built on tables and does not employ SQL to manipulate data. • It also may not provide full ACID, but still has a distributed and fault tolerant architecture. • There are more than one storage mechanism that could be used based on the needs • Mostly open-source • May not be the best solution for all situations • Many of the big giants in e-Commerce, Social Networking like flipKart, Amazon, Facebook, Linkedin etc.. have adopted this concept. Introduction to NoSQL
  • 4. Motivation behind NoSQL • Scale out approach (Sharding) The group of servers together forms a clustered storage array and provides LUNs (Logical Unit Numbers) or file shares over a network • NoSQL (Non-Relational) database technology • NoSQL refers to progressive data management engines that go beyond legacy relational databases in satisfying the needs of today’s modern business applications. • A very flexible data model, horizontal Scalability, distributed architectures. • And the use of languages and interfaces that are “not only” SQL typically characterize NoSQL technology.
  • 5. How it changed the way of handling data for… • First reason to use NoSQL is because you have big data projects to tackle. A big data project is normally typified by: – Data velocity – lots of data coming in very quickly, possibly from different locations – Data variety – storage of data that is structured, semi-structured, and unstructured – Data volume – data that involves many terabytes or petabytes in size – Data complexity – data that is stored and managed in different locales, data centers, or cloud geo-zones • Scale Out approach. • Application driven schema. • You need a better architecture. • You need continuous availability for an application. • You need location independence for a system. • You need modern transaction support. • You need a more flexible data model. Where NoSQL Fits
  • 6. Theory of NoSQL - CAP Consistency • All nodes see the same data at the same time Availability • A guarantee that every request receives a response about whether it succeeded/failed Partition Tolerance • Multiple entry points • System continues to operate despite arbitrary partitioning due to network failures A P C Thumb rule is to pre join the data. CAP Theorem: satisfying all three at the same time is impossible CA AP CP
  • 7. Types of NoSQL Databases Key – Value Data Model: • Global key-value mapping • Big scalable HashMap • Highly fault tolerant (typically) Pros: • Simple data model • Scalable Cons: • Create your own “foreign keys” • Poor for complex data Key Value “FIS” {“C-5, Sector-126, Noida, India – 301306″}
  • 8. Types of NoSQL Databases (Cont…) Document Oriented Data Model: • A collection of documents • A document is a key value collection • Index-centric, lots of map-reduce Pros: • Simple, Powerful data model • Scalable Cons: • Poor for interconnected data • Query model limited to keys and indexes • Map reduce for larger queries Document {company: “FIS”, OfficeAddress: {“B-25, Sector-58, Noida, India – 201301″}}
  • 9. Types of NoSQL Databases (Cont…) Column Family Data Model: • A big table, with column families • Map Reduce for querying/processing Pros: • Supports Simi-Structured Data • Naturally Indexed (columns) • Scalable Cons: • Poor for interconnected data Column Families {FIS: {Address: {city: Noida,pincode: 201301},details: {strength: 250,projects: 20}}
  • 10. Types of NoSQL Databases (Cont…) Graph Family Data Model: • Nodes and Relationships Pros: • Powerful data model, as general as RDBMS • Connected data locally indexed • Easy to query Cons: • Sharding (Still under optimization) • Scales UP reasonably well • Requires rewiring your brain
  • 11. Example with MongoDB Document Store RDBMS MongoDB Database Database Table , View Collection Row Document (JSON, BSON) Column Field Index Index Join Embedded Document Foreign Key Reference Partition Shard > db.user.findOne({age:39}) { "_id" : ObjectId("5114e0bd42…"), "first" : “Sandeep", "last" : “Kumar", "age" : 34, "interests" : [ "Reading", "Mountain Biking” ] "favorites": { "color": "Blue"} }
  • 12. CRUD Example > db.user.insert({ first: "John", last : "Doe", age: 39 }) > db.user.find () { "_id" : ObjectId("51…"), "first" : "John", "last" : "Doe", "age" : 39 } > db.user.update( {"_id" : ObjectId("51…")}, { $set: { age: 40, salary: 7000} } ) > db.user.remove({ "first": /^J/ })
  • 13. Match with your favorite (RDBMS) Lets conclude… RDBMS NoSQL Scale up Scale out Offers a big feature set and data integrity May not need all features, cost and complexity Data Modeling -Schema Schema less Relational Data Model Pre-Joined Document data model Fit with Structured data Best suits for unstructured data Doesn’t fit with modern Agile development Best fit for Agile development Required great precision Faster Data Processing Easy Querying Overhead for complex queries Offers the degree of reliability Doesn’t offers degree of reliability Consistency Compromise with consistency Customer support No customer support

Editor's Notes

  1. Not only SQL
  2. Its not a replacement rather it’s a new way for managing the data. Scale Out – add servers , VM and cloud behind load balancer
  3. As whole record is in single document that means its easy to move it from one server to another Normalized – De normalize data