SlideShare a Scribd company logo
{title : Starting with
MongoDB}
by César Cruz
About Me
• In search of my Zen programming language
• Computer Engineering Student
• President ACM-ECE 2012 - 2013
• Founder hackPR @ UPRM
• Opinionated
• @sezalcru
NoSQL
- Non-relational database
- Documents, Key- Value pairs, Graphs and Objects
- Dynamic Schemas
- Store object in favor of tables
- Quick setup and integration
So, MongoDB
- Document oriented, NoSQL
- Document structure is similar to JSON object
- Dynamic Schema
- Forgiving
- JavaScript query language
Documents
Image courtesy of @mongoDB
Go for MongoDB when…
- Developing a quick prototype
- Quick refactoring in development
- Non-relational data
- Log data
- Metadata
Re-think MongoDB if…
- Related data***
- Joins
- Redundancy will be an issue
- Performance can be an issue
***This is a biggie
Docs and Drivers
- Open Source Project
- Great documentation and community support
- Docs at: docs.mongodb.org
- Support for almost all major languages
Installation
OSX
Using homebrew: brew install mongodb
Or
Download package from mongoDB website
Windows
Download installation package from website
Linux
Head to mongoDB website, in downloads section,
select appropriate distribution.
Download package distribution
Or
sudo apt-get install -y mongodb-org
Configuration
MongoDB by default stores data in the /data/db
parent directory. Create this directory using
mkdir -p /data/db
MongoDB must have read and write access to this
directory
Start
Command Line Interface
MongoDB comes with a built in Command Line
Interface (CLI). To start the CLI type mongo into the
console. The CLI will be your best friend for
debugging.
Basic Commands
- Show current database: db
- Show available databases: show dbs
- Switch to database: use databaseName
- Show collections: show collections
- Basic JS Syntax
Ok, let’s assume a
Collection of Articles
To define an Article, we would need, at least:
Title
Contents
Author
Date Created
An Article document would look like this:
Create
Read
Update
Delete
Create
Read
Update
Delete
Debugging
A few useful commands when debugging in mongo
are:
db.stats()
db.serverStatus()
Questions?
Demo time

More Related Content

PDF
NoSQL
PPTX
PPTX
Part One: Building Web Apps with the MERN Stack
PPT
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
PPTX
MongoDB Introduction - Document Oriented Nosql Database
PPTX
Meetup#2: Building responsive Symbology & Suggest WebService
PDF
10 mongo db
PPTX
NoSQL
Part One: Building Web Apps with the MERN Stack
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
MongoDB Introduction - Document Oriented Nosql Database
Meetup#2: Building responsive Symbology & Suggest WebService
10 mongo db

What's hot (20)

KEY
MongoDB NYC Python
PPTX
MongoDB for the SQL Server
PPT
MongoDb - Details on the POC
PPTX
PDF
Apache big data 2016 - Speaking the language of Big Data
PPTX
GIDS 2016 Understanding and Building No SQLs
PPTX
Introduction to MongoDB and CRUD operations
PDF
PPT
MongoDB Pros and Cons
PDF
Introduction to mongo db by zain
KEY
MongoDB at CodeMash 2.0.1.0
PPTX
Webinar: When to Use MongoDB
PPTX
Part Two: Building Web Apps with the MERN Stack
PPTX
PPTX
Mongodb open data day 2014
PPTX
mongodb_Introduction
PPTX
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
KEY
MongoDB Hadoop DC
PPTX
[Mas 500] Data Basics
PPTX
Securing Your MongoDB Deployment
MongoDB NYC Python
MongoDB for the SQL Server
MongoDb - Details on the POC
Apache big data 2016 - Speaking the language of Big Data
GIDS 2016 Understanding and Building No SQLs
Introduction to MongoDB and CRUD operations
MongoDB Pros and Cons
Introduction to mongo db by zain
MongoDB at CodeMash 2.0.1.0
Webinar: When to Use MongoDB
Part Two: Building Web Apps with the MERN Stack
Mongodb open data day 2014
mongodb_Introduction
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
MongoDB Hadoop DC
[Mas 500] Data Basics
Securing Your MongoDB Deployment
Ad

Viewers also liked (16)

DOCX
Jaime erazo
PDF
Bourbaki der suendenfall der physik ocr
PPT
CAHPO 2016. Workshop 1: Early intervention team - Gareth Blissett
PDF
Softline Overview
PPTX
PPTX
Types of Communication
DOCX
4811 4815.output
PPT
Proyectos de educación y alimentación
PPTX
World Wide Web
DOCX
4741 4745.output
PDF
Sturgis 2015
DOCX
Oración simple análisis solucionario
PDF
SocialPilot
PDF
Certificate of completion, PMP training course
PPTX
Conservación de alimentos por desecación.
PPTX
Subordinación sustantiva
Jaime erazo
Bourbaki der suendenfall der physik ocr
CAHPO 2016. Workshop 1: Early intervention team - Gareth Blissett
Softline Overview
Types of Communication
4811 4815.output
Proyectos de educación y alimentación
World Wide Web
4741 4745.output
Sturgis 2015
Oración simple análisis solucionario
SocialPilot
Certificate of completion, PMP training course
Conservación de alimentos por desecación.
Subordinación sustantiva
Ad

Similar to Starting with MongoDB (20)

PDF
Mongo db first steps with csharp
PDF
MongoDB Basics
PPTX
Introduction to NoSQL and MongoDB
PPTX
Dev Jumpstart: Build Your First App with MongoDB
PPTX
Why Organizations are Looking at Alternative Database Technologies – Introduc...
PDF
Mongo db transcript
PPTX
MongoDB.pptx
PPTX
PDF
Mongo db basics
PPTX
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...
PPTX
Big Data, NoSQL with MongoDB and Cassasdra
PDF
Building your first app with MongoDB
PPTX
MongoDB 2.4 and spring data
PPTX
NoSQL and MongoDB
PPTX
Dev Jumpstart: Build Your First App with MongoDB
PDF
10gen MongoDB Video Presentation at WebGeek DevCup
PPTX
When to Use MongoDB
PPTX
Mongodb tutorial by Rajendra Arora
PDF
No sq lv1_0
Mongo db first steps with csharp
MongoDB Basics
Introduction to NoSQL and MongoDB
Dev Jumpstart: Build Your First App with MongoDB
Why Organizations are Looking at Alternative Database Technologies – Introduc...
Mongo db transcript
MongoDB.pptx
Mongo db basics
Open-Source Analytics Stack on MongoDB, with Schema, Pierre-Alain Jachiet and...
Big Data, NoSQL with MongoDB and Cassasdra
Building your first app with MongoDB
MongoDB 2.4 and spring data
NoSQL and MongoDB
Dev Jumpstart: Build Your First App with MongoDB
10gen MongoDB Video Presentation at WebGeek DevCup
When to Use MongoDB
Mongodb tutorial by Rajendra Arora
No sq lv1_0

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Cloud computing and distributed systems.
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Empathic Computing: Creating Shared Understanding
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Cloud computing and distributed systems.
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Programs and apps: productivity, graphics, security and other tools
MIND Revenue Release Quarter 2 2025 Press Release
sap open course for s4hana steps from ECC to s4
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Starting with MongoDB