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
Seedhack 2011 - Introducing MongoDB
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Russell Smith
April 20, 2012
Technology
150
1
Share
Seedhack 2011 - Introducing MongoDB
Russell Smith
April 20, 2012
More Decks by Russell Smith
See All by Russell Smith
Ops Skills and Tools for Beginners [MongoDB World 2014]
ukd1
0
140
3 Infrastructure + workflow lessons from an early stage startup
ukd1
0
130
Bitcoin Ops & Security Primer
ukd1
1
180
Gearman & Kohana
ukd1
2
1k
Geo & capped collections with MongoDB
ukd1
1
160
Cassandra London UG July 2011 - Riak vs Cassandra
ukd1
1
330
MongoDB - Map Reduce
ukd1
2
250
MongoDB London UG, April 2011 - MongoDB Introduction
ukd1
1
130
MongoDB London 2011 - MongoDB Command Line Tools
ukd1
1
210
Other Decks in Technology
See All in Technology
インプロセスQAのための要因から捉えるプロジェクトリスクマネジメントnano #1 開発リソース効率状態への対処 #jasstnano
barus_qa
0
180
AsyncStreamでマルチブロードキャストを実装する
1mash0
1
130
AI時代に、 データアナリストがデータエンジニアに異動して
jackojacko_
0
1k
CARTA HOLDINGS エンジニア向け 採用ピッチ資料 / CARTA-GUIDE-for-Engineers
carta_engineering
0
47k
React Compiler導入の効果と運用の工夫
kakehashi
PRO
3
270
GCASアップデート(202603-202605)
techniczna
0
220
最新技術を"今は選ばない"という技術選定
leveragestech
PRO
0
230
2026年春のAgentCoreアプデ 細かいやつ全部まとめ
minorun365
4
240
開発サイクルのボーダーレス化に伴う組織変革から学んだこと / Organizational Transformation Amid the Borderless Development Cycle
mii3king
0
220
ECSのTerraformモジュールにコントリビュートした話
harukasakihara
0
240
Cortex(Code) を ML モデルの 精度改善サイクルに組み込む.pdf
oimo23
0
200
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
250
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
240k
The Limits of Empathy - UXLibs8
cassininazir
1
330
Are puppies a ranking factor?
jonoalderson
1
3.4k
Designing Experiences People Love
moore
143
24k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
140
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
54k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
190
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
How STYLIGHT went responsive
nonsquared
100
6.1k
Claude Code のすすめ
schroneko
67
220k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
300
Transcript
An introduction to MongoDB Russell Smith Friday, 20 April 12
/usr/bin/whoami • Russell Smith • Consultant for UKD1 Limited, •
External consultant for 10gen • Help with code, architecture, infrastructure, devops, sysops, capacity planning, etc • <3 MongoDB, MySQL, Redis, Gearman, Neo4j, Kohana, Riak, PHP, Debian, AWS, etc Friday, 20 April 12
What is MongoDB • A scalable, high-performance, open source, document-oriented
database. • Stores JSON like documents • Commercially backed by 10gen Friday, 20 April 12
Why choose it? • Schema-less • Simple • Reliable •
Scalable • Drivers Friday, 20 April 12
Who uses it? • Foursquare • Disney • Craigslist •
MTV Networks • O2 • Telefonica Friday, 20 April 12
Basics • insert • find • update • remove •
ensureIndex Friday, 20 April 12
Insert • db.test.insert({hello: ‘world’}); Friday, 20 April 12
Find • db.test.find() • Equivalent of SELECT * FROM test;
> db.test.insert({hello: ‘world’}); > db.test.find(); { "_id" : ObjectId("4e7c9f464bdd7534bc498ff7"), "hello" : "world" } Friday, 20 April 12
Updating • db.test.update(<condition>, <operation>) > db.test.find(); { "_id" : ObjectId("4e7c9f464bdd7534bc498ff7"),
"hello" : "world" } > db.test.update({hello:‘world’}, {hello: ‘seedhack’}); > db.test.find(); { "_id" : ObjectId("4e7c9f464bdd7534bc498ff7"), "hello" : "seedhack" } Friday, 20 April 12
Removing • db.test.remove(<condition>) > db.test.find(); { "_id" : ObjectId("4e7c9f464bdd7534bc498ff7"), "hello"
: "seedhack" } > db.test.remove({hello: ‘seedhack’}); > db.test.count() 0 > Friday, 20 April 12
Indexes • It’s usually a good idea to index your
collections • How and which columns depends on what you are doing • explain > db.test.ensureIndex({hello:1}) Friday, 20 April 12
More advanced • sort, count, limit, special operators • Capped
collections • Geospatial indexing • MapReduce • Replica sets • Sharding Friday, 20 April 12
Getting started... • Download & install - http://www.mongodb.org/downloads • Online
shell - http://www.mongodb.org/ Friday, 20 April 12
Questions / Further • Come and ask me questions •
Updates can also push, set, increment, decrement, etc http://bit.ly/gEfKOr • Indexes can be across multiple keys, 2D (geo) and ASC / DESC http://bit.ly/hpK68Q • SQL -> Mongo chart http://bit.ly/ig1Yfj Friday, 20 April 12