SlideShare a Scribd company logo
1 of 17
An introduction to MongoDB
Sathish Ravikumar
SQL vs NoSQL
Introduction of MongoDB
MongoDB Features
Replication/ High Availability
Sharding/ Scaling
Agenda
SQL vs NoSQL
 NoSQL (often interpreted as Not only SQL) database
 It provides a mechanism for storage and retrieval of data that is
modeled in means other than the tabular relations used in relational
databases.
SQL NoSQL
Relational Database Management System (RDBMS) Non-relational or distributed database system.
These databases have fixed or static or predefined schema They have dynamic schema
These databases are best suited for complex queries These databases are not so good for complex queries
Vertically Scalable Horizontally scalable
Follows ACID property Follows BASE property
SQL vs NoSQL
Graph database
Document-oriented
Column family
NoSQL Types
What is MongoDB?
 MongoDB is an open source, document-oriented database designed with both
scalability and developer agility in mind.
 Instead of storing your data in tables and rows as you would with a relational database,
in MongoDB you store JSON-like documents with dynamic schemas(schema-free,
schema less).
{
"_id" : ObjectId("5114e0bd42…"),
“FirstName" : "John",
“LastName" : "Doe",
“Age" : 39,
“Interests" : [ "Reading", "Mountain Biking ]
“Favorites": {
"color": "Blue",
"sport": "Soccer“
}
}
MongoDB is Easy to Use
RDBMS MongoDB
Database Database
Table Collection
Row Document (JSON, BSON)
Column Field
Index Index
Join Embedded Document
Partition Shard
RDBMS vs MongoDB
MongoDB does not need any pre-defined data schema
Every document could have different data!
name: “jeff”,
eyes: “blue”,
loc: [40.7, 73.4],
boss: “ben”}
{name: “brendan”,
boss: “will”}
name: “ben”,
age:25}
{name: “matt”,
weight:60,
height: 72,
loc: [44.6, 71.3]}
{name: “will”,
eyes: “blue”,
birthplace: “NY”,
aliases: [“bill”, “ben”],
loc: [32.7, 63.4],
boss: ”ben”}
Scheme Free
Features Of MongoDB
• Document-Oriented storege
• Full Index Support
• Replication & High Availability
• Auto-Sharding
• Aggregation
• MongoDB Atlas
• Various APIs
• JavaScript, Python, Ruby, Perl, Java, Java, Scala, C#,
C++, Haskell, Erlang
• Community
Replication
• Replication provides redundancy and increases data
availability.
• With multiple copies of data on different database servers,
replication provides a level of fault tolerance against the loss of
a single database server.
Copy of database Copy of database
Replication
Sharding
• Sharding is a method for
distributing data across multiple
machines.
• MongoDB uses sharding to
support deployments with very
large data sets and high
throughput operations.
Sharding Architecture
• Shard is a Mongo instance to
handle a subset of original data.
• Mongos is a query router to
shards.
• Config Server is a Mongo
instance which stores metadata
information and configuration
details of cluster.
Sharding/Replication
• Replication Split data sets
across multiple data nodes for
high availability.
• Sharding scale up/down
horizontally when it is required
for high throughput
Introduction-to-MongoDB.pptx
Introduction-to-MongoDB.pptx

More Related Content

Similar to Introduction-to-MongoDB.pptx

mongodb11 (1) (1).pptx
mongodb11 (1) (1).pptxmongodb11 (1) (1).pptx
mongodb11 (1) (1).pptx
RoopaR36
 

Similar to Introduction-to-MongoDB.pptx (20)

Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
 
All About Database v1.1
All About Database  v1.1All About Database  v1.1
All About Database v1.1
 
NoSQL and MongoDB
NoSQL and MongoDBNoSQL and MongoDB
NoSQL and MongoDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
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
 
MongoDB in Simple and Easy Steps
MongoDB in Simple and Easy StepsMongoDB in Simple and Easy Steps
MongoDB in Simple and Easy Steps
 
Presentation On NoSQL Databases
Presentation On NoSQL DatabasesPresentation On NoSQL Databases
Presentation On NoSQL Databases
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
 
Mongodb
MongodbMongodb
Mongodb
 
Unit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxUnit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docx
 
Nosql
NosqlNosql
Nosql
 
mongodb_DS.pptx
mongodb_DS.pptxmongodb_DS.pptx
mongodb_DS.pptx
 
mongodb11 (1) (1).pptx
mongodb11 (1) (1).pptxmongodb11 (1) (1).pptx
mongodb11 (1) (1).pptx
 
MongoDB_ppt.pptx
MongoDB_ppt.pptxMongoDB_ppt.pptx
MongoDB_ppt.pptx
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.
 
unit2-ppt1.pptx
unit2-ppt1.pptxunit2-ppt1.pptx
unit2-ppt1.pptx
 
Mongo db
Mongo dbMongo db
Mongo db
 
Mongodb
MongodbMongodb
Mongodb
 
Vskills Apache Cassandra sample material
Vskills Apache Cassandra sample materialVskills Apache Cassandra sample material
Vskills Apache Cassandra sample material
 

Recently uploaded

Recently uploaded (20)

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 

Introduction-to-MongoDB.pptx

  • 1.
  • 2. An introduction to MongoDB Sathish Ravikumar
  • 3. SQL vs NoSQL Introduction of MongoDB MongoDB Features Replication/ High Availability Sharding/ Scaling Agenda
  • 4. SQL vs NoSQL  NoSQL (often interpreted as Not only SQL) database  It provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. SQL NoSQL Relational Database Management System (RDBMS) Non-relational or distributed database system. These databases have fixed or static or predefined schema They have dynamic schema These databases are best suited for complex queries These databases are not so good for complex queries Vertically Scalable Horizontally scalable Follows ACID property Follows BASE property
  • 7. What is MongoDB?  MongoDB is an open source, document-oriented database designed with both scalability and developer agility in mind.  Instead of storing your data in tables and rows as you would with a relational database, in MongoDB you store JSON-like documents with dynamic schemas(schema-free, schema less). { "_id" : ObjectId("5114e0bd42…"), “FirstName" : "John", “LastName" : "Doe", “Age" : 39, “Interests" : [ "Reading", "Mountain Biking ] “Favorites": { "color": "Blue", "sport": "Soccer“ } }
  • 9. RDBMS MongoDB Database Database Table Collection Row Document (JSON, BSON) Column Field Index Index Join Embedded Document Partition Shard RDBMS vs MongoDB MongoDB does not need any pre-defined data schema Every document could have different data! name: “jeff”, eyes: “blue”, loc: [40.7, 73.4], boss: “ben”} {name: “brendan”, boss: “will”} name: “ben”, age:25} {name: “matt”, weight:60, height: 72, loc: [44.6, 71.3]} {name: “will”, eyes: “blue”, birthplace: “NY”, aliases: [“bill”, “ben”], loc: [32.7, 63.4], boss: ”ben”} Scheme Free
  • 10. Features Of MongoDB • Document-Oriented storege • Full Index Support • Replication & High Availability • Auto-Sharding • Aggregation • MongoDB Atlas • Various APIs • JavaScript, Python, Ruby, Perl, Java, Java, Scala, C#, C++, Haskell, Erlang • Community
  • 11. Replication • Replication provides redundancy and increases data availability. • With multiple copies of data on different database servers, replication provides a level of fault tolerance against the loss of a single database server. Copy of database Copy of database
  • 13. Sharding • Sharding is a method for distributing data across multiple machines. • MongoDB uses sharding to support deployments with very large data sets and high throughput operations.
  • 14. Sharding Architecture • Shard is a Mongo instance to handle a subset of original data. • Mongos is a query router to shards. • Config Server is a Mongo instance which stores metadata information and configuration details of cluster.
  • 15. Sharding/Replication • Replication Split data sets across multiple data nodes for high availability. • Sharding scale up/down horizontally when it is required for high throughput