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
社内LT2019/11/21
Search
Kento Matsumoto
November 21, 2019
Programming
67
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
社内LT2019/11/21
MongoDBについて
Kento Matsumoto
November 21, 2019
More Decks by Kento Matsumoto
See All by Kento Matsumoto
ストーリーポイント.pdf
stepanve
0
98
社内LT2020/01/23
stepanve
0
53
社内LT2019/11/7
stepanve
0
86
社内LT2019/10/24
stepanve
0
73
Other Decks in Programming
See All in Programming
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
Oxlintのカスタムルールの現況
syumai
6
1.1k
Vite+ Unified Toolchain for the Web
naokihaba
0
230
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
230
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
2
390
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.4k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
190
RTSPクライアントを自作してみた話
simotin13
0
520
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
250
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
OSもどきOS
arkw
0
480
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Design in an AI World
tapps
1
230
How to train your dragon (web standard)
notwaldorf
97
6.7k
Docker and Python
trallard
47
3.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
610
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Practical Orchestrator
shlominoach
191
11k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Balancing Empowerment & Direction
lara
6
1.2k
Transcript
Mongoの簡単な説明 (AWS DocumentDB) 社内勉強会:2019/11/21
MongoはNoSQLである。 NoSQL RDB NoSQL KVS ドキュメントDB リレーショナル DB 列指向型DB グラフSQL
キーバリュー ワイドカラム 用途 セッション ログ 正規化する必要 のないデータ 販売履歴と商 品 年間のレ ポート SNSの相関 図 例 Redis, MemoChach e, DataStore DynamoDB , Couchbase MongoDB, DocumentDB MySQL, PostgreSQL BigQuery, RedShift Neo4j, Polyglot
簡単なデモ
使っているツールの紹介 • Robo 3T https://robomongo.org/ ◦ シンプル ◦ 簡単なコマンドを叩く時 •
MongoDB Compass https://www.mongodb.com/products/compass ◦ 機能豊富 ◦ データの操作をする時
これから使えそうな機能
ジョインができる - Left Outer Joinのみできる db.facilities.aggregate( [ {$lookup: { from:
'facilityIds', // 結合するコレクション localField: 'id', // 結合元コレクションのフィールド foreignField: 'id', // 結合コレクションのフィールド as: 'c2' // 別名 } } ] );
バリデーションを設定できる - レベルがstrict、moderateを設定できる // strict 今のレコードも適応される updateもできなくなる db.runCommand( { collMod:
"facilities", // コレクション指定 validator: { phone: { $exists: true } }, validationLevel: "strict" // 不要 } ) // moderate 今のレコードは無視する。updateも問題なし。 db.runCommand( { collMod: "facilities", validator: { phone: { $exists: true } }, validationLevel: "moderate" } )
その他の機能 - 地図情報に対して、インデックスが張れる -> 貼ったindexに対して、近いものを選べる。$near .limit - トランザクション機能(Mongo4.0~) -> AWS
DocumentDBでは使えなさそう。。 - GridFS(ファイル保存:用途不明?)、全文検索(日本語未対応。。) etc.