$30 off During Our Annual Pro Sale. View Details »
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
65
社内LT2019/11/21
MongoDBについて
Kento Matsumoto
November 21, 2019
Tweet
Share
More Decks by Kento Matsumoto
See All by Kento Matsumoto
ストーリーポイント.pdf
stepanve
0
90
社内LT2020/01/23
stepanve
0
47
社内LT2019/11/7
stepanve
0
81
社内LT2019/10/24
stepanve
0
66
Other Decks in Programming
See All in Programming
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
関数実行の裏側では何が起きているのか?
minop1205
1
680
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
120
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
380
CSC305 Lecture 17
javiergs
PRO
0
340
AIコーディングエージェント(Manus)
kondai24
0
160
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
1
220
SwiftUIで本格音ゲー実装してみた
hypebeans
0
110
WebRTC と Rust と8K 60fps
tnoho
2
1.9k
Integrating WordPress and Symfony
alexandresalome
0
150
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
5
2k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
Become a Pro
speakerdeck
PRO
31
5.7k
[SF Ruby Conf 2025] Rails X
palkan
0
500
The World Runs on Bad Software
bkeepers
PRO
72
12k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Building Adaptive Systems
keathley
44
2.9k
Site-Speed That Sticks
csswizardry
13
990
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
34
2.5k
Faster Mobile Websites
deanohume
310
31k
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.