SlideShare a Scribd company logo
MongoDB for the SQL Server Pro
What is MongoDB?
• Open source NoSQL database
• Document-oriented
• Stores JSON-like documents (dynamic schemas)
• Includes a strong query language (javascript)
• Powerful, flexible indexing (including geospatial)
• Sharding and replication
• Cross-Platform (many drivers )
QUICKSTART - SETUP MONGODB
Demo
Get MongoDB and Driver(s)
• Quick download, zero install
• Also get your driver (C# for us)
Starting up MongoDB
Using the Console
Using MongoVue
Connecting with MongoVue
Using MongoVue
COMPARING DOCUMENT
DATABASES TO RDBMS SYSTEMS
Understanding more..
So which type of NoSQL? CAP…
Consistency
Availability
Partition
Tolerance
CP = noSQL/column
Hadoop
Big Table
H-base
MemCacheDB
(graph)?
CA = SQL/RDBMS
SQL Sever / SQL
Azure
Oracle
MySQL
AP = noSQL/document
or key/value
MongoDB
DynamoDB
CouchDB
Cassandra
Voldemort
DB Features for MongoDB & SQL Server
primary keys
and indexes
queries with
models for
sorting /
limiting results
a strong
typing system
aggregations
like SUM(),
COUNT(), etc…
Large object
support
DB Features unique to Document DBs
Collections, not Tables
Query language, not T-SQL
Idrefs, not Joins
No pre-defined Schema
• Aggregation Framework
• Grouping or MapReduce
Aggregations
• No multi-document transactions
No Transactions
No Full-text search
Use 10gen Quick Reference Cards
DB Features of note in MongoDB
• BSON supports more complex types (date, geo-spatial, etc…)
• Supports dynamic queries via proprietary query language
– Uses “find()” which returns a [lazy] cursor
– Multi-key indexes can be created
• Scalability via Replication and Sharding
Why use MongoDB?
• Document-like
• Semi-structured
• Few Joins
• Geospatial
Data Structure
• Large or Huge
• Distributed
• Unpredictable
Data Volume
MongoDB Scenarios
Document
Management
systems
E-commerce
(catalog portion
only)
Archiving /
event logging
Real time
analytics (based
on logging)
Gaming Geospatial
Mobile
IMPORTING DATA TO MONGODB
Demo
Adding Data
• Data must be in JSON format - converter
• “Insert” CREATES a collection if needed
Importing data…using MongoVue
Viewing Collection Data
USING VELOCITY FOR MODELING
Demo
Modeling
Use short names
• each name is saved for
each document
• can save up to 30%
storage
Keep collections
small
• Can create non-
default (narrower) key
• Document size
maximum is 4 MB
Use GridFS for
BLOBs
Comparing…
QUERY MONGODB DATA
Demo
Using Find
Find, Fields, Sort, Count, Skip, Limit, Visualize or Export
Data Visualization
Queries
Queries 2 …
Queries 3…
What is Grouping?
• Similar to T-SQL ‘Group By’
• Written in javascript
What about Joins?
No
traditional
joins in
MongoDB
Can use
Arrays
Can use
Embedded
Documents
Can use
DBRef
Can De-
normalize
schema
About the Aggregation Framework
• New in MongoDB 2.2
• Layer on top to facilitate easier query-writing
Query Tuning
• Use best indexes
– Evaluate use of _id
– Add columns to index (specificity)
– Multiple columns, most specific first
– Can use fully covered indexing (indexOnly:true)
– Test to make sure indexes are being used
• Qty scanned s/b same as QTY returned
• Use .explain
Understanding Explain
• Query execution detail plan
• Review number of scanned objects
ADD INDEXES TO MONGODB
Understanding more
Modifying Data
Update
• alone does a replace
Update w/ $set
• does an update
Update w/ $inc
• increments
Upserts
• must be enabled
• then insert if new,
update if existing
Multiple field
updates
• occur by default
Using Update
USING GRIDFS
Understanding more…
What is GridFS?
• Used to hold objects larger than 16 MB
CONNECTING TO MONGODB WITH C#
Demo
Programming against MongoDB
More Information
• MongoDB
– http://www.mongodb.org
• 10gen
– http://www.10gen.com/contact
– info@10gen.com
• YouTube videos (from Lynn Langit)
– MongoDB Playlist -
https://www.youtube.com/playlist?list=PLCE5902FB1D284880
&feature=view_all
• MongoDB LA UG - http://www.meetup.com/Los-Angeles-
MongoDB-User-Group
The Changing Data Landscape
NoSQL
RDBMS
Other
Services

More Related Content

What's hot (20)

PPTX
MongoDB Schema Design by Examples
Hadi Ariawan
 
PPTX
Mongo db
Raghu nath
 
PPTX
Klevis Mino: MongoDB
Carlo Vaccari
 
PPTX
MongoDB Introduction - Document Oriented Nosql Database
Sudhir Patil
 
PPTX
No sql - { If and Else }
Marjan Nikolovski
 
PDF
Migrating from MySQL to MongoDB
James Carr
 
PPTX
Introduction to MongoDB and CRUD operations
Anand Kumar
 
PDF
10 mongo db
Ahmed Elbassel
 
PDF
Data engineering Stl Big Data IDEA user group
Adam Doyle
 
PDF
Scaling MongoDB - Presentation at MTP
darkdata
 
PPTX
MongoDB introduction
Edward Yoon
 
PDF
NoSQL
Radu Potop
 
PPTX
mongoDB for sysadmins
Jordi Soucheiron
 
PPTX
NoSQL
Radu Vunvulea
 
PDF
MongoDB tuning on AWS
Ryuji Tamagawa
 
PPTX
Mongo DB
Er. Shiva K. Shrestha
 
PPT
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
Hansamali Gamage
 
PPTX
Mongo DB
Karan Kukreja
 
PDF
Apache big data 2016 - Speaking the language of Big Data
techmaddy
 
PDF
Introduction to mongo db
Rohit Bishnoi
 
MongoDB Schema Design by Examples
Hadi Ariawan
 
Mongo db
Raghu nath
 
Klevis Mino: MongoDB
Carlo Vaccari
 
MongoDB Introduction - Document Oriented Nosql Database
Sudhir Patil
 
No sql - { If and Else }
Marjan Nikolovski
 
Migrating from MySQL to MongoDB
James Carr
 
Introduction to MongoDB and CRUD operations
Anand Kumar
 
10 mongo db
Ahmed Elbassel
 
Data engineering Stl Big Data IDEA user group
Adam Doyle
 
Scaling MongoDB - Presentation at MTP
darkdata
 
MongoDB introduction
Edward Yoon
 
NoSQL
Radu Potop
 
mongoDB for sysadmins
Jordi Soucheiron
 
MongoDB tuning on AWS
Ryuji Tamagawa
 
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
Hansamali Gamage
 
Mongo DB
Karan Kukreja
 
Apache big data 2016 - Speaking the language of Big Data
techmaddy
 
Introduction to mongo db
Rohit Bishnoi
 

Similar to MongoDB for the SQL Server (20)

PPTX
Introduction to MongoDB.pptx
Surya937648
 
PPTX
Mongodb
ASEEMSRIVASTAVA22
 
PPTX
MongoDB presentation
Hyphen Call
 
PPTX
MongoDB
Rony Gregory
 
PDF
Mongodb
Apurva Vyas
 
PPTX
05201349_Unit_7_FSWD_ advanced learning.pptx
ozakamal8
 
PPTX
05201349_Unit_7_FSWD_II(1) with advance.pptx
ozakamal8
 
PPTX
Mongo db
AbhiKhurana8
 
PPTX
MongoDB NoSQL - Developer Guide
Shiv K Sah
 
PPTX
Kalp Corporate MongoDB Tutorials
Kalp Corporate
 
PDF
MongoDB
wiTTyMinds1
 
PPTX
MongoDbPpt based on python installation.
jnvcomputerlab2024
 
PDF
A Study on Mongodb Database.pdf
Jessica Navarro
 
PDF
A Study on Mongodb Database
IJSRD
 
PDF
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
PPT
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
PPTX
Mongodb Introduction
Nabeel Naqeebi
 
DOCX
MongoDB DOC v1.5
Tharun Srinivasa
 
PPTX
Basics of MongoDB
HabileLabs
 
PDF
MongoDB - An Introduction
sethfloydjr
 
Introduction to MongoDB.pptx
Surya937648
 
MongoDB presentation
Hyphen Call
 
MongoDB
Rony Gregory
 
Mongodb
Apurva Vyas
 
05201349_Unit_7_FSWD_ advanced learning.pptx
ozakamal8
 
05201349_Unit_7_FSWD_II(1) with advance.pptx
ozakamal8
 
Mongo db
AbhiKhurana8
 
MongoDB NoSQL - Developer Guide
Shiv K Sah
 
Kalp Corporate MongoDB Tutorials
Kalp Corporate
 
MongoDB
wiTTyMinds1
 
MongoDbPpt based on python installation.
jnvcomputerlab2024
 
A Study on Mongodb Database.pdf
Jessica Navarro
 
A Study on Mongodb Database
IJSRD
 
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
Mongodb Introduction
Nabeel Naqeebi
 
MongoDB DOC v1.5
Tharun Srinivasa
 
Basics of MongoDB
HabileLabs
 
MongoDB - An Introduction
sethfloydjr
 
Ad

More from Paulo Fagundes (11)

PDF
Oracle exalytics deployment for high availability
Paulo Fagundes
 
DOCX
Backup and Restore of database on 2-Node RAC
Paulo Fagundes
 
PDF
Zero Downtime for Oracle E-Business Suite on Oracle Exalogic
Paulo Fagundes
 
PDF
Mongodb
Paulo Fagundes
 
ODP
MongoDB - Javascript for your Data
Paulo Fagundes
 
PPTX
Capacityplanning
Paulo Fagundes
 
PDF
The Little MongoDB Book - Karl Seguin
Paulo Fagundes
 
PPTX
Mondodb
Paulo Fagundes
 
PDF
Oracle NoSQL Database Compared to Cassandra and HBase
Paulo Fagundes
 
PDF
The Power of Relationships in Your Big Data
Paulo Fagundes
 
PDF
Oracle NoSQL Database release 3.0 overview
Paulo Fagundes
 
Oracle exalytics deployment for high availability
Paulo Fagundes
 
Backup and Restore of database on 2-Node RAC
Paulo Fagundes
 
Zero Downtime for Oracle E-Business Suite on Oracle Exalogic
Paulo Fagundes
 
MongoDB - Javascript for your Data
Paulo Fagundes
 
Capacityplanning
Paulo Fagundes
 
The Little MongoDB Book - Karl Seguin
Paulo Fagundes
 
Oracle NoSQL Database Compared to Cassandra and HBase
Paulo Fagundes
 
The Power of Relationships in Your Big Data
Paulo Fagundes
 
Oracle NoSQL Database release 3.0 overview
Paulo Fagundes
 
Ad

Recently uploaded (20)

PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 

MongoDB for the SQL Server

Editor's Notes

  • #3: Source - http://www.10gen.com/what-is-mongodb
  • #4: https://www.youtube.com/watch?v=k2YFy5IQu1M
  • #5: http://www.mongodb.org/downloads https://github.com/mongodb/mongo-csharp-driver/downloads
  • #8: http://www.mongovue.com/
  • #12: http://amitpiplani.blogspot.com/2010/05/u-pick-2-selection-for-nosql-providers.html
  • #14: http://docs.mongodb.org/manual/faq/developers/#how-do-i-do-transactions-and-locking-in-mongodb
  • #15: http://www.10gen.com/reference
  • #17: http://www.mongodb.org/display/DOCS/Use+Cases
  • #18: http://www.mongodb.org/display/DOCS/Use+Cases
  • #20: Free conversion (CSV to JSON) - http://www.cparker15.com/code/utilities/csv-to-json/
  • #25: http://rickosborne.org/download/SQL-to-MongoDB.pdf
  • #27: http://www.mongovue.com/2010/06/29/find/
  • #32: http://api.mongodb.org/wiki/current/Aggregation.html
  • #34: http://docs.mongodb.org/manual/aggregation/ And http://docs.mongodb.org/manual/reference/sql-aggregation-comparison/
  • #39: http://www.mongovue.com/2010/09/14/updating-collections/
  • #41: http://learnmongo.com/posts/getting-started-with-mongodb-gridfs/ Example: http://stackoverflow.com/questions/4988436/mongodb-gridfs-with-c-how-to-store-files-such-as-images/10645816#10645816 Default chunk size is 256kb Db.fs.files Fs.chunk Upload.date.date()
  • #42: https://www.youtube.com/watch?v=NCp4n6xWw68
  • #43: http://www.youtube.com/watch?v=NCp4n6xWw68