SlideShare a Scribd company logo
An Introduction
Deepak Kumar | @_deepak0
An Introduction
Deepak Kumar | @_deepak0
MongoDB
● Document oriented
  a. Objects are mapped as documents
  b. Documents can be embedded
  c. Dynamically typed
● No Schema
● High availability
  a. Replication through sharding.
  b. Automatic failover
● Easy scaling
  a. Auto shrading ( auto partitioning data across servers)
● Speed
Programming Language Support
Supported by all the popular programming
languages (C++, Java, Python, Ruby, Go, Haskel
etc...) and web frameworks ( Rails, Django etc).
Interesting Fact




There are MongoDB systems that exceed one
       million operations per second.
MongoDB document model
Key         Key                Value




                    Field




                  Document



                  Collection




                   Database
Data Types Supported
●   String
●   Number
●   Boolean
●   Date
●   Null
●   Array
●   Object ID
●   Binary data
●   Regular Expression
Why should we use Mongodb
●   Easy to scale
●   Coding velocity (agility)
●   No impedance mismatch
●   Allows dynamic schema ( No Schema, agility)
●   Easier to store and manipulate polymorphic data
●   Variety of Indexing
●   A MapReduce tool.
Impedance Mismatch
In object relational mapping an object in
programming language is mapped to a record in
database. So if the data is simple and database
support it then there is no mismatch.

But if the data is polymorphic and have unsupported
types then the mapping will be difficult which
causes a impedance mismatch.

In mongodb data is of JSON format so it can map
well to the object.
Where should we avoid MongoDB
● Problems with SQL support.
● Systems with heavy emphasis on complex
  transactions such as banking.
● Data Warehousing whose underlying database
  are schema based.
Indexing
● Indexing can be done on a field
● Indexing can be done on an embedded object.
● Sparse indexing - Indexing based existence of
  field.
● TTL index
● Geospatial Index ( Location based access)
● Geohaystack index (Bucket based small regions)
MongoDB/ Components
● Mongod => Database Process
● Mongoes => Shrading Controller
● Mongo => Database Shell ( javascript shell)
MongoDB/Utilities
● mongodump => Dump tool for backup and
  snapshot
● mongorestore => Restore a dump
● mongoexport => Export a single collection to
  JSON or CSV
● mongoimport => Import from JSON or CSV
● mongofiles => Utility for putting and getting
  files from MongoDB GridFS
● mongostat => Performance statistics tool
Single Server Configuration
● Install mongodb
● create a database directory
  eg: mkdir -p /data/db
● create a configuration file (optional)
  eg: /etc/mongodb.conf
● start the mongodb server
  sudo mongod -f /etc/mongodb.conf OR use init
  script.
● connect to the database using javascript console
  mongo
  You will get connected to test database.
MongoDB Multiserver Configuration
Third party Software Used With
                MogoDB
Boost => Portable open source C++ libraries.
V8     => Javascript runtime.
PCRE => Perl compatible regular expression.
MD5 => Message Digest Algorithm
Snappy => fast compression and decompression tool
Edda - Admin Tool

● Edda provides a graphical visualization of
  mongodb servers .

● Edda provides an easy way to check the status in
  multiserver configuration.
Companies Using MongoDB
●   Foursquare
●   MTV networks
●   Disney
●   Customlnk
●   Sourceforge
●   Wowmakers
●   and many others ....
Thanks
Questions ?

More Related Content

What's hot (20)

PDF
Performance (browser)
aquarius070287
 
PDF
Introduction to MongoDB
Mike Dirolf
 
PDF
Open source Technology
Amardeep Vishwakarma
 
PPTX
Mongo db present
scottmsims
 
PPTX
MongoDB presentation
Hyphen Call
 
PDF
Austin bdug 2011_01_27_small_and_big_data
Alex Pinkin
 
PDF
New paradigms
Borja A. Espejo García
 
PPTX
Mongo db workshop # 02
FarhatParveen10
 
PDF
SOLR Power FTW: short version
Alex Pinkin
 
PPTX
MongoDB for the SQL Server
Paulo Fagundes
 
PDF
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
Len Chang
 
PPTX
Intro To Graph Databases - Oxana Goriuc
Fraugster
 
PPTX
Building a Directed Graph with MongoDB
Tony Tam
 
PPTX
Top 10 frameworks of node js
HabileLabs
 
PDF
Mongo db onepage
Milind Zodge
 
PDF
Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...
Grand Parade Poland
 
PPTX
Comparison with storing data using NoSQL(CouchDB) and a relational database.
eross77
 
ODP
18.xml
Abhijeet Kadam
 
PDF
Starting with MongoDB
Cesar Martinez
 
Performance (browser)
aquarius070287
 
Introduction to MongoDB
Mike Dirolf
 
Open source Technology
Amardeep Vishwakarma
 
Mongo db present
scottmsims
 
MongoDB presentation
Hyphen Call
 
Austin bdug 2011_01_27_small_and_big_data
Alex Pinkin
 
Mongo db workshop # 02
FarhatParveen10
 
SOLR Power FTW: short version
Alex Pinkin
 
MongoDB for the SQL Server
Paulo Fagundes
 
Hadoop con2016 - Implement Real-time Centralized logging System by Elastic Stack
Len Chang
 
Intro To Graph Databases - Oxana Goriuc
Fraugster
 
Building a Directed Graph with MongoDB
Tony Tam
 
Top 10 frameworks of node js
HabileLabs
 
Mongo db onepage
Milind Zodge
 
Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...
Grand Parade Poland
 
Comparison with storing data using NoSQL(CouchDB) and a relational database.
eross77
 
Starting with MongoDB
Cesar Martinez
 

Similar to Mongodb (1) (20)

PPTX
Mongo db
Gyanendra Yadav
 
PDF
Mongo db transcript
foliba
 
KEY
MongoDB
Steven Francia
 
PPTX
Mongodb
ASEEMSRIVASTAVA22
 
PPTX
MongoDB 3.0
Victoria Malaya
 
PPTX
Drop acid
Mike Feltman
 
PDF
MongoDB: a gentle, friendly overview
Antonio Pintus
 
KEY
MongoDB London PHP
Mike Dirolf
 
PPT
9. Document Oriented Databases
Fabio Fumarola
 
PPTX
MongoDB
Rony Gregory
 
PDF
MongoDB Interview Questions PDF By ScholarHat
Scholarhat
 
PPT
Introduction to MongoDB
Ravi Teja
 
PDF
Mongo db dhruba
Dhrubaji Mandal ♛
 
PDF
Mongodb Introduction
Raghvendra Parashar
 
PPT
MongoDB Pros and Cons
johnrjenson
 
PPSX
Mongodb
foliba
 
PDF
MongoDB Interview Questions PDF By ScholarHat
Scholarhat
 
PDF
Introduction to MongoDB
Justin Smestad
 
PPTX
Everything You Need to Know About MongoDB Development.pptx
75waytechnologies
 
PPTX
MongoDB is a document database. It stores data in a type of JSON format calle...
amintafernandos
 
Mongo db
Gyanendra Yadav
 
Mongo db transcript
foliba
 
MongoDB 3.0
Victoria Malaya
 
Drop acid
Mike Feltman
 
MongoDB: a gentle, friendly overview
Antonio Pintus
 
MongoDB London PHP
Mike Dirolf
 
9. Document Oriented Databases
Fabio Fumarola
 
MongoDB
Rony Gregory
 
MongoDB Interview Questions PDF By ScholarHat
Scholarhat
 
Introduction to MongoDB
Ravi Teja
 
Mongo db dhruba
Dhrubaji Mandal ♛
 
Mongodb Introduction
Raghvendra Parashar
 
MongoDB Pros and Cons
johnrjenson
 
Mongodb
foliba
 
MongoDB Interview Questions PDF By ScholarHat
Scholarhat
 
Introduction to MongoDB
Justin Smestad
 
Everything You Need to Know About MongoDB Development.pptx
75waytechnologies
 
MongoDB is a document database. It stores data in a type of JSON format calle...
amintafernandos
 
Ad

Mongodb (1)

  • 3. MongoDB ● Document oriented a. Objects are mapped as documents b. Documents can be embedded c. Dynamically typed ● No Schema ● High availability a. Replication through sharding. b. Automatic failover ● Easy scaling a. Auto shrading ( auto partitioning data across servers) ● Speed
  • 4. Programming Language Support Supported by all the popular programming languages (C++, Java, Python, Ruby, Go, Haskel etc...) and web frameworks ( Rails, Django etc).
  • 5. Interesting Fact There are MongoDB systems that exceed one million operations per second.
  • 6. MongoDB document model Key Key Value Field Document Collection Database
  • 7. Data Types Supported ● String ● Number ● Boolean ● Date ● Null ● Array ● Object ID ● Binary data ● Regular Expression
  • 8. Why should we use Mongodb ● Easy to scale ● Coding velocity (agility) ● No impedance mismatch ● Allows dynamic schema ( No Schema, agility) ● Easier to store and manipulate polymorphic data ● Variety of Indexing ● A MapReduce tool.
  • 9. Impedance Mismatch In object relational mapping an object in programming language is mapped to a record in database. So if the data is simple and database support it then there is no mismatch. But if the data is polymorphic and have unsupported types then the mapping will be difficult which causes a impedance mismatch. In mongodb data is of JSON format so it can map well to the object.
  • 10. Where should we avoid MongoDB ● Problems with SQL support. ● Systems with heavy emphasis on complex transactions such as banking. ● Data Warehousing whose underlying database are schema based.
  • 11. Indexing ● Indexing can be done on a field ● Indexing can be done on an embedded object. ● Sparse indexing - Indexing based existence of field. ● TTL index ● Geospatial Index ( Location based access) ● Geohaystack index (Bucket based small regions)
  • 12. MongoDB/ Components ● Mongod => Database Process ● Mongoes => Shrading Controller ● Mongo => Database Shell ( javascript shell)
  • 13. MongoDB/Utilities ● mongodump => Dump tool for backup and snapshot ● mongorestore => Restore a dump ● mongoexport => Export a single collection to JSON or CSV ● mongoimport => Import from JSON or CSV ● mongofiles => Utility for putting and getting files from MongoDB GridFS ● mongostat => Performance statistics tool
  • 14. Single Server Configuration ● Install mongodb ● create a database directory eg: mkdir -p /data/db ● create a configuration file (optional) eg: /etc/mongodb.conf ● start the mongodb server sudo mongod -f /etc/mongodb.conf OR use init script. ● connect to the database using javascript console mongo You will get connected to test database.
  • 16. Third party Software Used With MogoDB Boost => Portable open source C++ libraries. V8 => Javascript runtime. PCRE => Perl compatible regular expression. MD5 => Message Digest Algorithm Snappy => fast compression and decompression tool
  • 17. Edda - Admin Tool ● Edda provides a graphical visualization of mongodb servers . ● Edda provides an easy way to check the status in multiserver configuration.
  • 18. Companies Using MongoDB ● Foursquare ● MTV networks ● Disney ● Customlnk ● Sourceforge ● Wowmakers ● and many others ....