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
0
59
社内LT2019/11/21
MongoDBについて
Kento Matsumoto
November 21, 2019
Tweet
Share
More Decks by Kento Matsumoto
See All by Kento Matsumoto
ストーリーポイント.pdf
stepanve
0
62
社内LT2020/01/23
stepanve
0
30
社内LT2019/11/7
stepanve
0
70
社内LT2019/10/24
stepanve
0
59
Other Decks in Programming
See All in Programming
受託開発でGitLab CI を活用していく
xiombatsg
1
270
try! Swift Tokyo 2024のLT枠に採択されたプロポーザルを出すときに考えていたこと
ski
0
340
本格ローグライク制作にEbitengineを選んでみた
nagainaganawa
0
290
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
220
SwiftUI Performance 不要なViewの再描画と更新を抑える
bigamitiongit
1
160
プールにゆこう
irof
2
120
Build with AI 2024 Seoul - 제로부터 시작하는 Flutter with Gemini 생활 - 박제창
itsmedreamwalker
0
200
Ruby製社内ツールのGo移行
bgpat
2
330
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
350
Git Lint
bkuhlmann
4
740
What We Can Learn From OSS
inouehi
0
400
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
100
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
123
8.5k
Producing Creativity
orderedlist
PRO
336
39k
Adopting Sorbet at Scale
ufuk
67
8.6k
Agile that works and the tools we love
rasmusluckow
324
20k
For a Future-Friendly Web
brad_frost
171
8.9k
Writing Fast Ruby
sferik
620
60k
Raft: Consensus for Rubyists
vanstee
132
6.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
354
18k
Music & Morning Musume
bryan
41
5.6k
Designing for humans not robots
tammielis
247
25k
What's new in Ruby 2.0
geeforr
337
31k
Web development in the modern age
philhawksworth
202
10k
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.