SlideShare a Scribd company logo
1 of 64
(No)SQL
Radu Vunvulea
vunvulear@gmail.com
http://vunvulearadu.blogspot.com
{
“name” : “Radu Vunvulea,
“company” : “iQuest”,
“userType” : “enthusiastic”
“technologies” : [ “.NET”, “JS”, “Azure”, “Web”,
“Mobile”, “SL” ],
“blog” : “vunvulearadu.blogspot.com”,
“email” : ”vunvulear@gmail.com”,
“socialMedia” :
{
“twitter” : “@RaduVunvulea”,
“fb” : “radu.vunvulea”
}
}
Who am I?
SQL
In the early 1980s, relational databases began to
be defined. One of the proponents of relational
database theory was Edgar F. Codd, who
published 13 rules that set out to define a
relational database. This was the beginning of
the formalized scientific groundwork done to lay
down specific rules for the existence of the
relational aspects of a database.
Sursa: http://www.ehow.com
Relevant rules
• Relational facilities
• Information is represented only in one way
• All data must be accessible
• All views that are theoretically updatable
must be updatable by the system
• Insert, Update, Delete for any retrieval sets
• Where from is this name?
NoSQL
• Where from is this name?
• Non-relational
• Web-scale database
NoSQL
• What is NoSQL
What is NoSQL
Any database that is not a Relational
Database!
What is NoSQL?
Any database that is not a Relational
Database!
Simple like this 
What is NoSQL?
• Non-Relational Database
• But is to long
• Is not so cool
• This name would not caught on
A better name would be
• Non-Relational Database
• But is to long
• Is not so cool
• This name would not caught on
…so we are back to
NoSQL
A better name would be
• More and more connections between data
• Everything is linked to something more… and
more… and so on
• Hyperlinks
• Tags
• RSS
• RDF
• Attributes
• User content
Database trends – 1 Connections
• From a flat architecture
Database trends – 2 Architecture
DB
App
• From a flat architecture to a couple one
Database trends – 2 Architecture
DB
AppApp App
• From a flat architecture to a couple one and now
we have a decoupled one based on services
Database trends – 2 Architecture
DB
App
DB
App
DB
App
• From web 2.0 the structure of data are don’t
have so fixed structure (is more flexible)
• How many phone number a person could have
in 1970?
Database trends – 3 No fix structure
• From web 2.0 the structure of data are don’t
have so fixed structure (is more flexible)
• How many phone number a person could have
in 1970? And NOW …
Database trends – 3 No fix structure
• 2006 - 160
• 2008 – 390
• 2010 – 998
• 2012 – 2000+
• First column is in years
• Second column is in … ?
Database trends – 4 Data Size
Database trends – 4 Data Size
What we need
Relational Database Performance
RDBMS
performance
So, we end up with
So, we end up with
Non-Relational Database
1. Key-Value
2. Document
3. Big Table
4. Graph DB
Categories of NoSQL Database
• Design to handle massive load
• Can scale to massive amounts of data
• Based on Key-Value collections
• Dynamic ring partition
• Dynamic replication
• Ex.: Dynoite
Key-Value
Key-Value
• Like column oriented Relational Database,
but with a twist
• Tables similar to RDBMS, but handle semi-
structured
• Based on Google’s BigTable paper
• Data mode:
• Columns – columns family -> ACL
• Dataums keyed by - row, column, time, index
• Row-range – table -> distribution
• Ex.: Cassandra
Big Table
• Similar with Key-Value pair but
• DB knows what the Value is
• Inspired by Lotus Notes
• Data model:
• Collections of Key-Value collections
• Documents are often versioned
• Ex.: MongoDB
Document Database
• Focus in modeling the structure of data
• The interconnectivity
• Scales on the complexity of data
• Inspired by mathematical Graph Theory
• Data model:
• Property Graph -> Nodes
• Relationships/Edges between Nodes
• Key-Value pair on both
• Possible Edge Labels and/or Node/Edge Types
• Ex.: Neo4j
Graph Database
• Not part of NoSQL community
• Still a good solution for a lot of problems
• Focuses on matching OOP paradigm
• Easy to use
• Simple to integrate
• Neither gain nor loosing traction
Object Database
• Easy to deploy
• No OS management
• Scaling
• Monitoring
• Publish from different source controls
• Support different technologies (PHP, node.js,
.NET)
• Low cost support – shared mode
• Reserved mode – dedicated instance
• Each site run in an isolated environment
Web Sites
Scaling
Complexity
Size
Key
Value
Big
Table
Doc.
Graph
How to query it?
• REST
• GQL (SQL Like)
• SPARQL
• Gremlin
• API’s
How to query it?
• Replication
• Write to many
• Master/Slave replication
• Master reelection
• Failover
• Either by another machine taking over
• Client knowing
Availability
• Most NoSQL sacrifice Consistency
• Some NoSQL don’t have Transactions
• Atom single operations
• Because of this some operations are
impossible to implement
Correctness
• NoSQL is the Batman
Performance
• NoSQL is the Batman
• Durability is sacrificed
• On-disk durability
• Multiple-replicas durability
Performance
One solution for all our problemes?Web Sites
One solution for all our problems?
• Why
• Dynamic query
• Content is stored as documents
• Big database that need to be very fast
• Where
• Properties are stored like query and index
• Can be used for voting system, CMS or comment
storage
MongoDB
• Why
• When you make a lot of updates and insert
• Reading data is not the main scope of the database
(writes are faster than reads)
• Content is stored as column
• High availability
• Where
• Can be used with success for logging
• Financial industry or any place where we work with a
lot of data that is needed to be written
• Basket of an e-commerce application
Cassandra
• Why
• For data that don’t change very often (insert
and read and NOT update)
• We have a lot of predefined queries and we
need versioning support
• Where
• Is a great database for CMS and CRM.
CouchDB
• Why
• When you do data analyzing
• Where
• Works great in combination with Hadoop
HBase
• Why
• When we need high concurrency
• When the latency is very low and we want
the latency to be minimal
• Where
• Backend of a game or a system that offer
data in real time
Membase
• Why
• When we need to make a lot of updates
• When the database is not too big and can be
kept in memory
• Where
• Can be used when we have a real time
communication, for example a stock market
with prices
Redis
Redis
• Facebook
• Hbase – Facebook messages
• Scribe - Real-time click logs
• Hive – SQLqueries -> MapReducejobs
• Hadoop
• Web analytics warehouse
• Distribute datastore
• MySQLbackup
Examples
• Twitter
• Hadoop – Analytics
• Hbase – People search
• Scribe – Log collection framework
• FlockDB – Social graph analysis
Examples
Question
Answers
THE END
Radu Vunvulea
vunvulear@gmail.com
http://vunvulearadu.blogspot.com

More Related Content

What's hot

SQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBSQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBMarco Segato
 
Nosql databases for the .net developer
Nosql databases for the .net developerNosql databases for the .net developer
Nosql databases for the .net developerJesus Rodriguez
 
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
 
NoSQL Slideshare Presentation
NoSQL Slideshare Presentation NoSQL Slideshare Presentation
NoSQL Slideshare Presentation Ericsson Labs
 
Introduction to mongo db by zain
Introduction to mongo db by zainIntroduction to mongo db by zain
Introduction to mongo db by zainKenAndTea
 
Conceptos básicos. Seminario web 1: Introducción a NoSQL
Conceptos básicos. Seminario web 1: Introducción a NoSQLConceptos básicos. Seminario web 1: Introducción a NoSQL
Conceptos básicos. Seminario web 1: Introducción a NoSQLMongoDB
 
NoSQL in the context of Social Web
NoSQL in the context of Social WebNoSQL in the context of Social Web
NoSQL in the context of Social WebBogdan Gaza
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Managementsameerfaizan
 
MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0Mike Dirolf
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBLee Theobald
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011Chris Westin
 
Introduction to MongoDB and CRUD operations
Introduction to MongoDB and CRUD operationsIntroduction to MongoDB and CRUD operations
Introduction to MongoDB and CRUD operationsAnand Kumar
 

What's hot (20)

Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Mongo db
Mongo dbMongo db
Mongo db
 
SQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBSQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDB
 
Nosql databases for the .net developer
Nosql databases for the .net developerNosql databases for the .net developer
Nosql databases for the .net developer
 
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 Slideshare Presentation
NoSQL Slideshare Presentation NoSQL Slideshare Presentation
NoSQL Slideshare Presentation
 
Mongodb @ vrt
Mongodb @ vrtMongodb @ vrt
Mongodb @ vrt
 
Introduction to mongo db by zain
Introduction to mongo db by zainIntroduction to mongo db by zain
Introduction to mongo db by zain
 
Conceptos básicos. Seminario web 1: Introducción a NoSQL
Conceptos básicos. Seminario web 1: Introducción a NoSQLConceptos básicos. Seminario web 1: Introducción a NoSQL
Conceptos básicos. Seminario web 1: Introducción a NoSQL
 
NoSQL in the context of Social Web
NoSQL in the context of Social WebNoSQL in the context of Social Web
NoSQL in the context of Social Web
 
Mongo db
Mongo dbMongo db
Mongo db
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0MongoDB at CodeMash 2.0.1.0
MongoDB at CodeMash 2.0.1.0
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011
 
Introduction to MongoDB and CRUD operations
Introduction to MongoDB and CRUD operationsIntroduction to MongoDB and CRUD operations
Introduction to MongoDB and CRUD operations
 
Mongo db
Mongo dbMongo db
Mongo db
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
MongoDb - Details on the POC
MongoDb - Details on the POCMongoDb - Details on the POC
MongoDb - Details on the POC
 

Similar to NoSQL

Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databasesJames Serra
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDBMongoDB
 
When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...MongoDB
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDBMongoDB
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBAhmed Farag
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabasesAdi Challa
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Lucas Jellema
 
MongoDB: What, why, when
MongoDB: What, why, whenMongoDB: What, why, when
MongoDB: What, why, whenEugenio Minardi
 
Sharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data LessonsSharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data LessonsGeorge Stathis
 
How to use Big Data and Data Lake concept in business using Hadoop and Spark...
 How to use Big Data and Data Lake concept in business using Hadoop and Spark... How to use Big Data and Data Lake concept in business using Hadoop and Spark...
How to use Big Data and Data Lake concept in business using Hadoop and Spark...Institute of Contemporary Sciences
 
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
 

Similar to NoSQL (20)

NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
 
NoSql Brownbag
NoSql BrownbagNoSql Brownbag
NoSql Brownbag
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
 
Database Technologies
Database TechnologiesDatabase Technologies
Database Technologies
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDB
 
UNIT-2.pptx
UNIT-2.pptxUNIT-2.pptx
UNIT-2.pptx
 
When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...When to Use MongoDB...and When You Should Not...
When to Use MongoDB...and When You Should Not...
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDB
 
NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabases
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
 
A peek into the future
A peek into the futureA peek into the future
A peek into the future
 
MongoDB: What, why, when
MongoDB: What, why, whenMongoDB: What, why, when
MongoDB: What, why, when
 
Sharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data LessonsSharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data Lessons
 
How to use Big Data and Data Lake concept in business using Hadoop and Spark...
 How to use Big Data and Data Lake concept in business using Hadoop and Spark... How to use Big Data and Data Lake concept in business using Hadoop and Spark...
How to use Big Data and Data Lake concept in business using Hadoop and Spark...
 
Architecting Your First Big Data Implementation
Architecting Your First Big Data ImplementationArchitecting Your First Big Data Implementation
Architecting Your First Big Data Implementation
 
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
 

NoSQL

  • 2. { “name” : “Radu Vunvulea, “company” : “iQuest”, “userType” : “enthusiastic” “technologies” : [ “.NET”, “JS”, “Azure”, “Web”, “Mobile”, “SL” ], “blog” : “vunvulearadu.blogspot.com”, “email” : ”vunvulear@gmail.com”, “socialMedia” : { “twitter” : “@RaduVunvulea”, “fb” : “radu.vunvulea” } } Who am I?
  • 3. SQL
  • 4. In the early 1980s, relational databases began to be defined. One of the proponents of relational database theory was Edgar F. Codd, who published 13 rules that set out to define a relational database. This was the beginning of the formalized scientific groundwork done to lay down specific rules for the existence of the relational aspects of a database. Sursa: http://www.ehow.com
  • 5. Relevant rules • Relational facilities • Information is represented only in one way • All data must be accessible • All views that are theoretically updatable must be updatable by the system • Insert, Update, Delete for any retrieval sets
  • 6.
  • 7.
  • 8. • Where from is this name? NoSQL
  • 9. • Where from is this name? • Non-relational • Web-scale database NoSQL
  • 10.
  • 11. • What is NoSQL What is NoSQL
  • 12. Any database that is not a Relational Database! What is NoSQL?
  • 13. Any database that is not a Relational Database! Simple like this  What is NoSQL?
  • 14. • Non-Relational Database • But is to long • Is not so cool • This name would not caught on A better name would be
  • 15. • Non-Relational Database • But is to long • Is not so cool • This name would not caught on …so we are back to NoSQL A better name would be
  • 16.
  • 17.
  • 18. • More and more connections between data • Everything is linked to something more… and more… and so on • Hyperlinks • Tags • RSS • RDF • Attributes • User content Database trends – 1 Connections
  • 19. • From a flat architecture Database trends – 2 Architecture DB App
  • 20. • From a flat architecture to a couple one Database trends – 2 Architecture DB AppApp App
  • 21. • From a flat architecture to a couple one and now we have a decoupled one based on services Database trends – 2 Architecture DB App DB App DB App
  • 22. • From web 2.0 the structure of data are don’t have so fixed structure (is more flexible) • How many phone number a person could have in 1970? Database trends – 3 No fix structure
  • 23. • From web 2.0 the structure of data are don’t have so fixed structure (is more flexible) • How many phone number a person could have in 1970? And NOW … Database trends – 3 No fix structure
  • 24. • 2006 - 160 • 2008 – 390 • 2010 – 998 • 2012 – 2000+ • First column is in years • Second column is in … ? Database trends – 4 Data Size
  • 25. Database trends – 4 Data Size
  • 26. What we need Relational Database Performance RDBMS performance
  • 27. So, we end up with
  • 28. So, we end up with Non-Relational Database
  • 29. 1. Key-Value 2. Document 3. Big Table 4. Graph DB Categories of NoSQL Database
  • 30. • Design to handle massive load • Can scale to massive amounts of data • Based on Key-Value collections • Dynamic ring partition • Dynamic replication • Ex.: Dynoite Key-Value
  • 32. • Like column oriented Relational Database, but with a twist • Tables similar to RDBMS, but handle semi- structured • Based on Google’s BigTable paper • Data mode: • Columns – columns family -> ACL • Dataums keyed by - row, column, time, index • Row-range – table -> distribution • Ex.: Cassandra Big Table
  • 33.
  • 34. • Similar with Key-Value pair but • DB knows what the Value is • Inspired by Lotus Notes • Data model: • Collections of Key-Value collections • Documents are often versioned • Ex.: MongoDB Document Database
  • 35.
  • 36. • Focus in modeling the structure of data • The interconnectivity • Scales on the complexity of data • Inspired by mathematical Graph Theory • Data model: • Property Graph -> Nodes • Relationships/Edges between Nodes • Key-Value pair on both • Possible Edge Labels and/or Node/Edge Types • Ex.: Neo4j Graph Database
  • 37.
  • 38.
  • 39. • Not part of NoSQL community • Still a good solution for a lot of problems • Focuses on matching OOP paradigm • Easy to use • Simple to integrate • Neither gain nor loosing traction Object Database
  • 40.
  • 41. • Easy to deploy • No OS management • Scaling • Monitoring • Publish from different source controls • Support different technologies (PHP, node.js, .NET) • Low cost support – shared mode • Reserved mode – dedicated instance • Each site run in an isolated environment Web Sites
  • 44. • REST • GQL (SQL Like) • SPARQL • Gremlin • API’s How to query it?
  • 45. • Replication • Write to many • Master/Slave replication • Master reelection • Failover • Either by another machine taking over • Client knowing Availability
  • 46. • Most NoSQL sacrifice Consistency • Some NoSQL don’t have Transactions • Atom single operations • Because of this some operations are impossible to implement Correctness
  • 47. • NoSQL is the Batman Performance
  • 48. • NoSQL is the Batman • Durability is sacrificed • On-disk durability • Multiple-replicas durability Performance
  • 49. One solution for all our problemes?Web Sites
  • 50. One solution for all our problems?
  • 51. • Why • Dynamic query • Content is stored as documents • Big database that need to be very fast • Where • Properties are stored like query and index • Can be used for voting system, CMS or comment storage MongoDB
  • 52. • Why • When you make a lot of updates and insert • Reading data is not the main scope of the database (writes are faster than reads) • Content is stored as column • High availability • Where • Can be used with success for logging • Financial industry or any place where we work with a lot of data that is needed to be written • Basket of an e-commerce application Cassandra
  • 53. • Why • For data that don’t change very often (insert and read and NOT update) • We have a lot of predefined queries and we need versioning support • Where • Is a great database for CMS and CRM. CouchDB
  • 54. • Why • When you do data analyzing • Where • Works great in combination with Hadoop HBase
  • 55. • Why • When we need high concurrency • When the latency is very low and we want the latency to be minimal • Where • Backend of a game or a system that offer data in real time Membase
  • 56. • Why • When we need to make a lot of updates • When the database is not too big and can be kept in memory • Where • Can be used when we have a real time communication, for example a stock market with prices Redis
  • 57. Redis
  • 58. • Facebook • Hbase – Facebook messages • Scribe - Real-time click logs • Hive – SQLqueries -> MapReducejobs • Hadoop • Web analytics warehouse • Distribute datastore • MySQLbackup Examples
  • 59. • Twitter • Hadoop – Analytics • Hbase – People search • Scribe – Log collection framework • FlockDB – Social graph analysis Examples
  • 60.
  • 61.
  • 62.