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 (Updated)
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
20spokes
October 24, 2012
Technology
95
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Intro to MongoDB (Updated)
20spokes
October 24, 2012
More Decks by 20spokes
See All by 20spokes
Start Your Startup: The Essential Steps to Launch Your Idea
ryan_fischer
1
92
Intro to MongoDB
ryan_fischer
2
270
MongoDB and Ruby on Rails
ryan_fischer
2
190
Geospatial Indexing with MongoDB
ryan_fischer
3
120
Other Decks in Technology
See All in Technology
[チョークトーク資料]AWS DevOps Agent を使いこなす / AWS Dev Ops Agent Chalk Talk AWS Summit Japan 2026
kinunori
2
520
Kiroで書いた 設計書 が AI レビューの 採点基準 になる
ezaki
0
130
白金鉱業Meetup_Vol.24_「AIエージェントは分けるほど良い」は本当か? / Is it true that “the more you divide AI agents, the better”?
brainpadpr
1
410
2026TECHFRESH畢業分享會 - 葬送的通靈師:化系統與用戶雜訊成行動訊號
line_developers_tw
PRO
0
1.3k
ACE-Step-1.5で見る 音楽生成AIのしくみと“破綻だけ直す”Retake機能の開発【zennfes spring 2026 登壇資料】
personabb
1
530
気軽に使える"情報のハブ"としてのNotion活用 〜フロー情報の集積点 と、 Claude Code × Notion AI〜
syucream
1
150
Agile and AI Redmine Japan 2026
hiranabe
3
190
FPGAの開発コンペでZephyrを使ってみた
iotengineer22
0
120
手塩にかけりゃいいってもんじゃない
ming_ayami
0
610
【NRUG vol.18】なぜ多くのオブザーバビリティ導入は失敗するのか
nrug_member
0
190
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
12
3.6k
Android の公式 Skill / Android skills
yanzm
0
160
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
390
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
The Cult of Friendly URLs
andyhume
79
6.9k
Between Models and Reality
mayunak
4
340
We Have a Design System, Now What?
morganepeng
55
8.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
440
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Transcript
MongoDB 101 Ryan Fischer @ryanfischer20
What you will hear What is NoSQL Available NoSQL Databases
Intro to MongoDB
What is NoSQL
Fancy Answer NoSQL is a class of database management system
identified by its non-adherence to the widely-use relational database management system
My Answer It’s not SQL
Does not use SQL as its query language May not
give full ACID guarantees Distributed architecture Typically optimized for reading and writing operations
Advantages
Traditional Scaling Bigger is better! (or so they thought) Increase
the size and power of the server
Scaling with NoSql Scale horizontally! Distribute across multiple servers More
economical using lower-cost servers
What is Sharding Allows MongoDB to scale horizontally Evenly distributes
chunks of data Performed per collection
None
Goodbye Schemas Flexible data models Easy to add/change data structures
Disadvantages
Goodbye Schemas Flexible data structures Application dependent on integrity
NoSQl is Still Young Does not reduce administration (at least
not yet) Lack of expertise Lack of projects expanding on NoSQL
NoSQL Databases Cassandra MongoDB CouchDB Redis Riak Neo4j
How is it used?
NoSQL out in the Wild Analytics - takes advantage of
read/write optimizations Logging Large Scale Projects
MongoDB
What is MongoDB Document Oriented Storage Replication & Auto-Sharding Document-based
queries similar to SQL Atomic Updates Map/Reduce
Document Oriented No schemas!! No joins for high performance and
scalability embed documents JSON-Style storage
High Performance Stores a lot of data in memory Embedding
documents increase read and writes Allows indexing
Availability and Scalability Replicated servers with automatic master failover Auto-sharing
across servers Consistent reads distributed over replicated servers
Atomic Modifers In place updating documents Does not replace entire
document Ideally suited for write heavy applications
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
Querying Javascript console allows for functions Returns a cursor -
lazy load of results Queries expressed as JSON Documents auto-assigned ObjectId
Advantages Active community including 10Gen Driver support for most languages
Many new features to come
Disadvantages No inherit transaction support Scaling sometimes isn’t simple Multiple
servers recommended Object modeling can be complex
The big data loss debate Internet flame war history Mongo
performs one write at a time - global lock Stored in memory Replication - fail over
Examples Interactive time! Goto to https://gist.github.com/2719591 for examples
Embed vs Referenced Relationships for models Object Models - Think
differently When in doubt store in different collection
Mongo Object Mappers for Ruby MongoMapper Mongoid Mongo ODM MongoModel
Mongoid Advantages Excellent Documentation Active Community Compatibility with other projects
Similar API to ActiveRecord Uses ActiveValidation Version library
Compatible Gems Devise - Authentication solutions for Rails Carrierwave -
Simple and flexible way to upload files from Ruby. Supports GridFS Geocoder - Complete geocoding solution for Rails Mongoid-Rspec - RSpec matchers and macros for Mongoid
Mongoid Document class Team include Mongoid::Document include Mongoid::Timestamps field :name,
type: String field :city, type: String field :location, :type => Array validates :name, :city, :presence => true end
The End Follow me - @ryanfischer20
None