SlideShare a Scribd company logo
1 of 15
Introducing with MongoDB

Mahbub Tito
Sr. Software Engineer,
DataSoft Systems BD Ltd.
What is MongoDB?

It is a NoSQL database

Data is stored in documents, not tables / relations
(Schema free). It uses BSON (binary JSON) format

MongoDB is Implemented in C++ for best performance

Scalable with high-performance (scales horizontally)

Platforms 32/64 bit Windows, Linux, Mac OS-X, FreeBSD,
Solaris

Language drivers for :- PHP, Ruby/Ruby-on-Rails, Java,
C#, JavaScript, C / C++, Python, Perl and much more ! ..
Why ?

Cost - MongoDB is free

MongoDb is easily installable.

Super low latency access to your data
− Very little CPU overhead

No Additional caching layer required

Auto Sharding
− Automatic balancing for changes in load and data
distributed
− Easy addition of new machines
− Scaling out to one thousand nodes
− No single points of failure, Automatic fail-over

Built in Replication and Horizontal Scaling support
Some Users
Similarity with RDBMS
Continued...
Continued...
SQL Statement Mongo Statement
Anatomy of document
MongoDB Installation
1. Add 10gen package to source.list
sudo gedit /etc/apt/sources.list
Add : deb
http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist
10gen
2. sudo apt-get update
3. 10gen package required GPG key, import it :
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv
7F0CEB10
4. sudo apt-get install mongodb-10gen ---- Done
5. Test : tito@tito:~$ mongo
MongoDB shell version: 2.0.6
connecting to: test
PHP Driver Installation
Check that the PEAR and PECL are working with the following
commands:
$ PECL version
If not found, install it to following commands:
sudo apt-get install php-pear
Then, sudo pecl install mongo
Add the following line to your php.ini file:
sudo gedit /etc/php5/apache2/php.ini
extension=mongo.so
Then Restart Web Server
/etc/init.d/apache2 restart ---- DONE
Using from Terminal

$ mongo

> show dbs – Get list of all databases

> use microfin – creating DB

> db.users.insert( { _id : "alex", name: { first:"Alex",
last:"Benisson" }, karma : 1.0 } )

> db.users.insert( { name: { first:"Kamal", last:"Khan" }, address
: '33,Dhaka' } )

> show collections – Get collections list

> db.users.find()
Understanding MongoDB
Understanding MongoDB
Understanding MongoDB
Reference
1. http://docs.mongodb.org/manual/contents/
2. PHP and MongoDB Web Development
Beginners Guide

More Related Content

What's hot

Laka Blogging engine
Laka Blogging engineLaka Blogging engine
Laka Blogging engine
Amitoj Singh
 
Setting up mongo replica set
Setting up mongo replica setSetting up mongo replica set
Setting up mongo replica set
Sudheer Kondla
 
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Simon Boulet
 

What's hot (20)

Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Docker
DockerDocker
Docker
 
Laka Blogging engine
Laka Blogging engineLaka Blogging engine
Laka Blogging engine
 
My First XDP (eXpress Data Path)
My First XDP (eXpress Data Path)My First XDP (eXpress Data Path)
My First XDP (eXpress Data Path)
 
Readme
ReadmeReadme
Readme
 
RamDisk
RamDiskRamDisk
RamDisk
 
Install Cuckoo on Mac OS X
Install Cuckoo on Mac OS XInstall Cuckoo on Mac OS X
Install Cuckoo on Mac OS X
 
Romafs
RomafsRomafs
Romafs
 
Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day
 
Docker
DockerDocker
Docker
 
Scale13
Scale13Scale13
Scale13
 
Setting up mongo replica set
Setting up mongo replica setSetting up mongo replica set
Setting up mongo replica set
 
ClickHouse column-oriented database Install memo
ClickHouse column-oriented database Install memoClickHouse column-oriented database Install memo
ClickHouse column-oriented database Install memo
 
MariaDB ColumnStore column-oriented database Install memo
MariaDB ColumnStore column-oriented database Install memoMariaDB ColumnStore column-oriented database Install memo
MariaDB ColumnStore column-oriented database Install memo
 
How to Block Malicious Address by Using Feed Service?
How to Block Malicious Address by Using Feed Service?How to Block Malicious Address by Using Feed Service?
How to Block Malicious Address by Using Feed Service?
 
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
 
Serve like a boss (part two)
Serve like a boss (part two)Serve like a boss (part two)
Serve like a boss (part two)
 
Apache
ApacheApache
Apache
 
maXbox starter46 work with Wine
maXbox starter46 work with WinemaXbox starter46 work with Wine
maXbox starter46 work with Wine
 
NetBSDworkshop
NetBSDworkshopNetBSDworkshop
NetBSDworkshop
 

Viewers also liked

GreenProcurement Guidelines_2014
GreenProcurement Guidelines_2014GreenProcurement Guidelines_2014
GreenProcurement Guidelines_2014
Gaia Pretner
 
BULM 720- LSG Sky Chefs Final Presentation (3)
BULM 720- LSG Sky Chefs Final Presentation (3)BULM 720- LSG Sky Chefs Final Presentation (3)
BULM 720- LSG Sky Chefs Final Presentation (3)
Richard Montgomery
 

Viewers also liked (11)

Getfly crm: Giải pháp quản lý khách hàng & Phát triển phòng kinh doanh
Getfly crm: Giải pháp quản lý khách hàng & Phát triển phòng kinh doanhGetfly crm: Giải pháp quản lý khách hàng & Phát triển phòng kinh doanh
Getfly crm: Giải pháp quản lý khách hàng & Phát triển phòng kinh doanh
 
CVE
CVECVE
CVE
 
Die antenna help uitsaai. Artikel in Die Burger
Die antenna help uitsaai. Artikel in Die BurgerDie antenna help uitsaai. Artikel in Die Burger
Die antenna help uitsaai. Artikel in Die Burger
 
Is it-living-worksheet-1
Is it-living-worksheet-1Is it-living-worksheet-1
Is it-living-worksheet-1
 
GreenProcurement Guidelines_2014
GreenProcurement Guidelines_2014GreenProcurement Guidelines_2014
GreenProcurement Guidelines_2014
 
BULM 720- LSG Sky Chefs Final Presentation (3)
BULM 720- LSG Sky Chefs Final Presentation (3)BULM 720- LSG Sky Chefs Final Presentation (3)
BULM 720- LSG Sky Chefs Final Presentation (3)
 
CONTROL AND AUDIT
CONTROL AND AUDITCONTROL AND AUDIT
CONTROL AND AUDIT
 
Big data and hadoop
Big data and hadoopBig data and hadoop
Big data and hadoop
 
Selective Data Replication with Geographically Distributed Hadoop
Selective Data Replication with Geographically Distributed HadoopSelective Data Replication with Geographically Distributed Hadoop
Selective Data Replication with Geographically Distributed Hadoop
 
ERP Concepts for Educational Systems
ERP Concepts for Educational SystemsERP Concepts for Educational Systems
ERP Concepts for Educational Systems
 
Untitled 1
Untitled 1Untitled 1
Untitled 1
 

Similar to Introducing with MongoDB

Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_LeopardAdding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
tutorialsruby
 
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_LeopardAdding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
tutorialsruby
 
Mongo db program_installation_guide
Mongo db program_installation_guideMongo db program_installation_guide
Mongo db program_installation_guide
Philip Zhong
 

Similar to Introducing with MongoDB (20)

Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_LeopardAdding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
 
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_LeopardAdding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL Database
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
 
Introduction to MongoDB with PHP
Introduction to MongoDB with PHPIntroduction to MongoDB with PHP
Introduction to MongoDB with PHP
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
Howto Pxeboot
Howto PxebootHowto Pxeboot
Howto Pxeboot
 
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
MongoDB Developer's Notebook, March 2016 -- MongoDB Connector for Business In...
 
High Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDBHigh Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDB
 
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & Introduction
 
Connect sql-using-perl-from-linux
Connect sql-using-perl-from-linuxConnect sql-using-perl-from-linux
Connect sql-using-perl-from-linux
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Mdb dn 2016_09_34_features
Mdb dn 2016_09_34_featuresMdb dn 2016_09_34_features
Mdb dn 2016_09_34_features
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
오픈 소스 프로그래밍 - NoSQL with Python
오픈 소스 프로그래밍 - NoSQL with Python오픈 소스 프로그래밍 - NoSQL with Python
오픈 소스 프로그래밍 - NoSQL with Python
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Mongo db program_installation_guide
Mongo db program_installation_guideMongo db program_installation_guide
Mongo db program_installation_guide
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Introducing with MongoDB

  • 1. Introducing with MongoDB  Mahbub Tito Sr. Software Engineer, DataSoft Systems BD Ltd.
  • 2. What is MongoDB?  It is a NoSQL database  Data is stored in documents, not tables / relations (Schema free). It uses BSON (binary JSON) format  MongoDB is Implemented in C++ for best performance  Scalable with high-performance (scales horizontally)  Platforms 32/64 bit Windows, Linux, Mac OS-X, FreeBSD, Solaris  Language drivers for :- PHP, Ruby/Ruby-on-Rails, Java, C#, JavaScript, C / C++, Python, Perl and much more ! ..
  • 3. Why ?  Cost - MongoDB is free  MongoDb is easily installable.  Super low latency access to your data − Very little CPU overhead  No Additional caching layer required  Auto Sharding − Automatic balancing for changes in load and data distributed − Easy addition of new machines − Scaling out to one thousand nodes − No single points of failure, Automatic fail-over  Built in Replication and Horizontal Scaling support
  • 9. MongoDB Installation 1. Add 10gen package to source.list sudo gedit /etc/apt/sources.list Add : deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen 2. sudo apt-get update 3. 10gen package required GPG key, import it : sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 4. sudo apt-get install mongodb-10gen ---- Done 5. Test : tito@tito:~$ mongo MongoDB shell version: 2.0.6 connecting to: test
  • 10. PHP Driver Installation Check that the PEAR and PECL are working with the following commands: $ PECL version If not found, install it to following commands: sudo apt-get install php-pear Then, sudo pecl install mongo Add the following line to your php.ini file: sudo gedit /etc/php5/apache2/php.ini extension=mongo.so Then Restart Web Server /etc/init.d/apache2 restart ---- DONE
  • 11. Using from Terminal  $ mongo  > show dbs – Get list of all databases  > use microfin – creating DB  > db.users.insert( { _id : "alex", name: { first:"Alex", last:"Benisson" }, karma : 1.0 } )  > db.users.insert( { name: { first:"Kamal", last:"Khan" }, address : '33,Dhaka' } )  > show collections – Get collections list  > db.users.find()
  • 15. Reference 1. http://docs.mongodb.org/manual/contents/ 2. PHP and MongoDB Web Development Beginners Guide