Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Intro to MongoDB
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
20spokes
May 17, 2012
Programming
270
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Intro to MongoDB
Introduction to MongoDB
20spokes
May 17, 2012
More Decks by 20spokes
See All by 20spokes
Start Your Startup: The Essential Steps to Launch Your Idea
ryan_fischer
1
94
Intro to MongoDB (Updated)
ryan_fischer
2
96
MongoDB and Ruby on Rails
ryan_fischer
2
200
Geospatial Indexing with MongoDB
ryan_fischer
3
120
Other Decks in Programming
See All in Programming
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
260
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
830
Oxlintはいいぞ(続)
yug1224
1
540
新卒PdEのリアル
ryu1013
1
390
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
380
「AI時代、配布するPythonコードをどう守るか: 難読化の実験と判断軸」 #PyconJP2026
pkshadeck
PRO
2
160
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
130
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
1
470
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
440
私のClaude Code活用法 (個人開発編) - PHPerKaigi mini #4(2026/08/24)
panda_program
1
210
MIZARU@SPAJAM2026 第二回予選
1901drama
0
100
業務時間外もAIに働いてもらう話
colorful12
3
9.9k
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
660
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
4 Signs Your Business is Dying
shpigford
187
23k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.5k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
370
Transcript
MongoDB 101 Ryan Fischer @ryanfischer20 Thursday, May 17, 12
What you will hear What is NoSQL Available NoSQL Databases
Intro to MongoDB Thursday, May 17, 12
What is NoSQL Thursday, May 17, 12
Fancy Answer NoSQL is a class of database management system
identified by its non-adherence to the widely-use relational database management system Thursday, May 17, 12
My Answer It’s not SQL Thursday, May 17, 12
Does not use SQL as its query language May not
give full ACID guarantees Distributed architecture Typically optimized for reading and writing operations Thursday, May 17, 12
Advantages Thursday, May 17, 12
Traditional Scaling Bigger is better! (or so they thought) Increase
the size and power of the server Thursday, May 17, 12
Scaling with NoSql Scale horizontally! Distribute across multiple servers More
economical using lower-cost servers Thursday, May 17, 12
Goodbye Schemas Flexible data models Easy to add/change data structures
Thursday, May 17, 12
Disadvantages Thursday, May 17, 12
Goodbye Schemas Flexible data structures Application dependent on integrity Thursday,
May 17, 12
NoSQl is Still Young Does not reduce administration (at least
not yet) Lack of expertise Lack of projects expanding on NoSQL Thursday, May 17, 12
NoSQL Databases Cassandra MongoDB CouchDB Redis Riak Neo4j Thursday, May
17, 12
How is it used? Thursday, May 17, 12
NoSQL out in the Wild Analytics - takes advantage of
read/write optimizations Logging Large Scale Projects Thursday, May 17, 12
MongoDB Thursday, May 17, 12
What is MongoDB Document Oriented Storage Replication & Auto-Sharding Document-based
queries similar to SQL Atomic Updates Map/Reduce Thursday, May 17, 12
Document Oriented No schemas!! No joins for high performance and
scalability embed documents JSON-Style storage Thursday, May 17, 12
High Performance Stores a lot of data in memory Embedding
documents increase read and writes Allows indexing Thursday, May 17, 12
Availability and Scalability Replicated servers with automatic master failover Auto-sharing
across servers Consistent reads distributed over replicated servers Thursday, May 17, 12
Atomic Modifers In place updating documents Does not replace entire
document Ideally suited for write heavy applications Thursday, May 17, 12
Storing data Data is grouped by collections Collection contains documents
of key-value pairs Values can be rich including arrays and documents Stored as BSON - Binary Serialized Document Notation Thursday, May 17, 12
Querying Javascript console allows for functions Returns a cursor -
lazy load of results Queries expressed as JSON Documents auto-assigned ObjectId Thursday, May 17, 12
Examples Interactive time! Goto to https://gist.github.com/2719591 for examples Thursday, May
17, 12
Embed vs Referenced Relationships for models Object Models - Think
differently When in doubt store in different collection Thursday, May 17, 12
Geospatial Queries Thursday, May 17, 12
SQL SELECT * FROM Places WHERE acos(sin(1.3963) * sin(Lat) +
cos(1.3963) * cos(Lat) * cos(Lon - (-0.6981))) * 6371 <= 1000; Thursday, May 17, 12
Exact Queries Search by closest points Ways to search Thursday,
May 17, 12
Query within a rectangle Circle with a center point and
radius Search within a polygon ( >= 1.9 ) Bound Queries Thursday, May 17, 12
Thursday, May 17, 12
Thursday, May 17, 12
Spherical Model Use decimal degrees - 42.53 Use [longitude, latitude]
as ordering Use radians for distance $nearSphere and $centerSphere Thursday, May 17, 12
GridFS Store large files in MongoDB Stores it in chunks
Thursday, May 17, 12
What is Sharding Allows MongoDB to scale horizontally Evenly distributes
chunks of data Performed per collection Thursday, May 17, 12
Thursday, May 17, 12
Disadvantages No inherit transaction support Scaling sometimes isn’t simple Multiple
servers recommended Object modeling can be complex Thursday, May 17, 12
Advantages Active community including 10Gen Driver support for most languages
Many new features to come Thursday, May 17, 12
The big data loss debate Internet flame war history Mongo
performs one write at a time - global lock Stored in memory Replication - fail over Thursday, May 17, 12
The End Follow me - @ryanfischer20 Thursday, May 17, 12
Thursday, May 17, 12