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
64
社内LT2019/11/21
MongoDBについて
Kento Matsumoto
November 21, 2019
Tweet
Share
More Decks by Kento Matsumoto
See All by Kento Matsumoto
ストーリーポイント.pdf
stepanve
0
88
社内LT2020/01/23
stepanve
0
45
社内LT2019/11/7
stepanve
0
80
社内LT2019/10/24
stepanve
0
66
Other Decks in Programming
See All in Programming
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
130
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
AWS発のAIエディタKiroを使ってみた
iriikeita
1
190
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
楽して成果を出すためのセルフリソース管理
clipnote
0
190
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
1から理解するWeb Push
dora1998
7
1.9k
Navigating Dependency Injection with Metro
zacsweers
3
3.5k
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
複雑なフォームに立ち向かう Next.js の技術選定
macchiitaka
2
240
旅行プランAIエージェント開発の裏側
ippo012
2
930
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.9k
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Being A Developer After 40
akosma
90
590k
Facilitating Awesome Meetings
lara
55
6.5k
Rails Girls Zürich Keynote
gr2m
95
14k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
GraphQLとの向き合い方2022年版
quramy
49
14k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
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.