SlideShare a Scribd company logo
1 of 29
NOSQL AND MONGO DB 
Haritha K
What is NoSQL ?
NoSQL
NoSQL
Types of NoSQL
Philosophy of NoSQL 
 “One size fits all” no longer applies 
 “Non relational” DBs are more scalable, especially horizontally 
 Focus on speed, performance, flexibility, scalability 
 Not concerned with transactional stuff and relational semantics 
 DBs should be on-demand commodity, in a cloud like fashion.
Examples of NoSQL
CAP theorem 
 Statement: One can only have two of Consistency, Availability, and 
tolerance to network Partitions at the same time. 
 Consistency (all nodes see the same data at the same time) 
 Availability (a guarantee that every request receives a response about 
whether it was successful or failed) 
 Partition tolerance (the system continues to operate despite arbitrary message 
loss or failure of part of the system)
CAP theorem
Mongo DB
How popular is MongoDB?
MONGO DB 
 Humongous ( Huge + monstrous ) 
 A document model NoSQL DB 
 Has all advantages of NoSQL 
 Data modeling matches application objects 
 Fits better with object oriented programming 
 Schema-free,fast and scalable 
 Developed and supported by 10gen.First release – Feb 2009,latest 
– Aug 2014.
How data is stored?
How data is stored?
How data is stored?
BSON – Binary JSON 
 Documents are stored in BSON format 
 BSON is a binary serialization of JSON like objects 
 This is extremely powerful as Mongo understands JSON natively 
 Any valid JSON can be easily imported and queried. 
 Schema-less and flexible.
Terminology 
SQL Terms/Concepts MongoDB Terms/Concepts 
database database 
table collection 
row document or BSON document 
column Field 
index Index 
table joins embedded documents and linking 
primary key primary key 
Specify any unique column or column combination as 
primary key. 
Holds a document’s primary key which is usually a BSON 
object
Data Modification – Insert 
 Data modifictions refers to operations that create,update or delete data 
 In MongoDB, these operations modify the data of a single collection. 
 For the update and delete operations, criteria can be specified.
Update and Save 
 The db.collection.update() method can accept query criteria to determine 
which documents to update as well as an option to update multiple rows. 
 Format : db.COLLECTION_NAME.update(SELECTIOIN_CRITERIA, 
UPDATED_DATA) 
db.inventory.update( { name:“jack"}, {$inc:{age:-1}}, {multi:true}) 
 The db.collection.save() method can replace an existing document. 
 Format : db.COLLECTION_NAME.save({_id:ObjectId(),NEW_DATA}) 
db.inventory.save( {_id: ObjectId("540451f745fa71ef2dd18c85"),"empId" : 3333, 
“dept" : "sales"} )
Read 
 Read operations or queries will retrieve the data stored in the database. 
 Queries selects documents from a single collection. 
 The db.collection.find() method accepts query criteria and projections and 
returns a cursor to the matching documents. 
 Format : db.collection.find(<criteria>, <projection>) 
db.inventory.find({},{KEY:1}) 
db.inventory.find({name:"a"},{age:true}) 
db.inventory.find( {tags:"machine"}) 
db.inventory.find( {tags:"machine"}).limit(1) 
db.inventory.findOne().tags
Remove 
 Remove method to remove documents from a collection. 
 Format: db.COLLECTION_NAME.remove(DELLETION_CRITTERIA) 
 Can remove all documents from a collection 
db.inventory.remove() 
 Remove all documents matching a condition. 
db.inventory.remove( {test:"ok"} ) 
 Limit the operation to remove just a single document. 
db.inventory.remove( {test:"ok"},1 )
Replication
Replication & Read Preferences
Sharding
Sharding & Distributed Queries
Write Concerns 
 Stronger settings: slower, better guarantee 
 Errors Ignored 
 Acknowledged 
 Unacknowledged 
 Journaled 
 Replica Acknowledged
Write Concerns
Disadvantages of NoSQL 
 No common standards. Each database does things differently. 
 Querying data does not involve familiar SQL model to find 
records. 
 NoSQL databases are relatively immature and constantly 
evolving. 
 Because a NoSQL database avoids ACID (Atomicity, 
Consistency, Isolation, Durability) model, there is no guarantee 
that all of the data will be success
Thank You………..

More Related Content

What's hot

introtomongodb
introtomongodbintrotomongodb
introtomongodb
saikiran
 
MidtermDemo
MidtermDemoMidtermDemo
MidtermDemo
Kai Lu
 
Silverlight week5
Silverlight week5Silverlight week5
Silverlight week5
iedotnetug
 
Data management with ado
Data management with adoData management with ado
Data management with ado
Dinesh kumar
 
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
MongoDB
 
User Data Management with MongoDB
User Data Management with MongoDB User Data Management with MongoDB
User Data Management with MongoDB
MongoDB
 

What's hot (20)

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Data Binding in Silverlight
Data Binding in SilverlightData Binding in Silverlight
Data Binding in Silverlight
 
Storage dei dati con MongoDB
Storage dei dati con MongoDBStorage dei dati con MongoDB
Storage dei dati con MongoDB
 
Data Binding and Data Grid View Classes
Data Binding and Data Grid View ClassesData Binding and Data Grid View Classes
Data Binding and Data Grid View Classes
 
Core data in Swfit
Core data in SwfitCore data in Swfit
Core data in Swfit
 
Quick overview on mongo db
Quick overview on mongo dbQuick overview on mongo db
Quick overview on mongo db
 
MongoDB
MongoDBMongoDB
MongoDB
 
No SQL - MongoDB
No SQL - MongoDBNo SQL - MongoDB
No SQL - MongoDB
 
Кирилл Латыш "ERP on Websockets"
Кирилл Латыш "ERP on Websockets"Кирилл Латыш "ERP on Websockets"
Кирилл Латыш "ERP on Websockets"
 
Json – java script object notation
Json – java script object notationJson – java script object notation
Json – java script object notation
 
Android and firebase database
Android and firebase databaseAndroid and firebase database
Android and firebase database
 
introtomongodb
introtomongodbintrotomongodb
introtomongodb
 
MongoDB Knowledge share
MongoDB Knowledge shareMongoDB Knowledge share
MongoDB Knowledge share
 
09.Local Database Files and Storage on WP
09.Local Database Files and Storage on WP09.Local Database Files and Storage on WP
09.Local Database Files and Storage on WP
 
MidtermDemo
MidtermDemoMidtermDemo
MidtermDemo
 
Silverlight week5
Silverlight week5Silverlight week5
Silverlight week5
 
Nosql
NosqlNosql
Nosql
 
Data management with ado
Data management with adoData management with ado
Data management with ado
 
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
 
User Data Management with MongoDB
User Data Management with MongoDB User Data Management with MongoDB
User Data Management with MongoDB
 

Similar to Overview on NoSQL and MongoDB

171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
sukrithlal008
 
MongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data scienceMongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data science
bitragowthamkumar1
 

Similar to Overview on NoSQL and MongoDB (20)

MongoDB - An Introduction
MongoDB - An IntroductionMongoDB - An Introduction
MongoDB - An Introduction
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
 
MongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behlMongoDB using Grails plugin by puneet behl
MongoDB using Grails plugin by puneet behl
 
MongoDB
MongoDBMongoDB
MongoDB
 
Mongo db
Mongo dbMongo db
Mongo db
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB Database
 
MongoDB_ppt.pptx
MongoDB_ppt.pptxMongoDB_ppt.pptx
MongoDB_ppt.pptx
 
Indexing and Query Optimizer
Indexing and Query OptimizerIndexing and Query Optimizer
Indexing and Query Optimizer
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practices
 
Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
 
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
 
Klevis Mino: MongoDB
Klevis Mino: MongoDBKlevis Mino: MongoDB
Klevis Mino: MongoDB
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
MongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data scienceMongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data science
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
 
MongoDB installation,CRUD operation & JavaScript shell
MongoDB installation,CRUD operation & JavaScript shellMongoDB installation,CRUD operation & JavaScript shell
MongoDB installation,CRUD operation & JavaScript shell
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

Overview on NoSQL and MongoDB

  • 1. NOSQL AND MONGO DB Haritha K
  • 6. Philosophy of NoSQL  “One size fits all” no longer applies  “Non relational” DBs are more scalable, especially horizontally  Focus on speed, performance, flexibility, scalability  Not concerned with transactional stuff and relational semantics  DBs should be on-demand commodity, in a cloud like fashion.
  • 8. CAP theorem  Statement: One can only have two of Consistency, Availability, and tolerance to network Partitions at the same time.  Consistency (all nodes see the same data at the same time)  Availability (a guarantee that every request receives a response about whether it was successful or failed)  Partition tolerance (the system continues to operate despite arbitrary message loss or failure of part of the system)
  • 11. How popular is MongoDB?
  • 12. MONGO DB  Humongous ( Huge + monstrous )  A document model NoSQL DB  Has all advantages of NoSQL  Data modeling matches application objects  Fits better with object oriented programming  Schema-free,fast and scalable  Developed and supported by 10gen.First release – Feb 2009,latest – Aug 2014.
  • 13. How data is stored?
  • 14. How data is stored?
  • 15. How data is stored?
  • 16. BSON – Binary JSON  Documents are stored in BSON format  BSON is a binary serialization of JSON like objects  This is extremely powerful as Mongo understands JSON natively  Any valid JSON can be easily imported and queried.  Schema-less and flexible.
  • 17. Terminology SQL Terms/Concepts MongoDB Terms/Concepts database database table collection row document or BSON document column Field index Index table joins embedded documents and linking primary key primary key Specify any unique column or column combination as primary key. Holds a document’s primary key which is usually a BSON object
  • 18. Data Modification – Insert  Data modifictions refers to operations that create,update or delete data  In MongoDB, these operations modify the data of a single collection.  For the update and delete operations, criteria can be specified.
  • 19. Update and Save  The db.collection.update() method can accept query criteria to determine which documents to update as well as an option to update multiple rows.  Format : db.COLLECTION_NAME.update(SELECTIOIN_CRITERIA, UPDATED_DATA) db.inventory.update( { name:“jack"}, {$inc:{age:-1}}, {multi:true})  The db.collection.save() method can replace an existing document.  Format : db.COLLECTION_NAME.save({_id:ObjectId(),NEW_DATA}) db.inventory.save( {_id: ObjectId("540451f745fa71ef2dd18c85"),"empId" : 3333, “dept" : "sales"} )
  • 20. Read  Read operations or queries will retrieve the data stored in the database.  Queries selects documents from a single collection.  The db.collection.find() method accepts query criteria and projections and returns a cursor to the matching documents.  Format : db.collection.find(<criteria>, <projection>) db.inventory.find({},{KEY:1}) db.inventory.find({name:"a"},{age:true}) db.inventory.find( {tags:"machine"}) db.inventory.find( {tags:"machine"}).limit(1) db.inventory.findOne().tags
  • 21. Remove  Remove method to remove documents from a collection.  Format: db.COLLECTION_NAME.remove(DELLETION_CRITTERIA)  Can remove all documents from a collection db.inventory.remove()  Remove all documents matching a condition. db.inventory.remove( {test:"ok"} )  Limit the operation to remove just a single document. db.inventory.remove( {test:"ok"},1 )
  • 23. Replication & Read Preferences
  • 26. Write Concerns  Stronger settings: slower, better guarantee  Errors Ignored  Acknowledged  Unacknowledged  Journaled  Replica Acknowledged
  • 28. Disadvantages of NoSQL  No common standards. Each database does things differently.  Querying data does not involve familiar SQL model to find records.  NoSQL databases are relatively immature and constantly evolving.  Because a NoSQL database avoids ACID (Atomicity, Consistency, Isolation, Durability) model, there is no guarantee that all of the data will be success