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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
20spokes
October 24, 2012
Technology
2
87
Intro to MongoDB (Updated)
20spokes
October 24, 2012
Tweet
Share
More Decks by 20spokes
See All by 20spokes
Start Your Startup: The Essential Steps to Launch Your Idea
ryan_fischer
1
85
Intro to MongoDB
ryan_fischer
2
250
MongoDB and Ruby on Rails
ryan_fischer
2
180
Geospatial Indexing with MongoDB
ryan_fischer
3
110
Other Decks in Technology
See All in Technology
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
150
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
2
200
[CV勉強会@関東 World Model 読み会] Orbis: Overcoming Challenges of Long-Horizon Prediction in Driving World Models (Mousakhan+, NeurIPS 2025)
abemii
0
130
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
280
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
超初心者からでも大丈夫!オープンソース半導体の楽しみ方〜今こそ!オレオレチップをつくろう〜
keropiyo
0
110
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
420
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
200
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
180
Agile Leadership Summit Keynote 2026
m_seki
1
610
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
930
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
BBQ
matthewcrist
89
10k
Thoughts on Productivity
jonyablonski
74
5k
My Coaching Mixtape
mlcsv
0
48
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
710
Mobile First: as difficult as doing things right
swwweet
225
10k
How STYLIGHT went responsive
nonsquared
100
6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
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