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
NoSQL & MongoDB
Search
Shuai Liu
June 20, 2014
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
NoSQL & MongoDB
Shuai Liu
June 20, 2014
More Decks by Shuai Liu
See All by Shuai Liu
Auto-Layout.pdf
liushuaikobe
2
140
Python-intro-2
liushuaikobe
0
87
Python-intro-1
liushuaikobe
0
87
GitRadar——毕业论文答辩
liushuaikobe
0
220
Other Decks in Programming
See All in Programming
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
3.4k
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
630
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.9k
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
240
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
160
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
0
370
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
200
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
150
AIが無かった頃の素敵な出会いの話
codmoninc
1
350
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
130
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.7k
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
880
HDC tutorial
michielstock
2
760
Embracing the Ebb and Flow
colly
88
5.1k
The browser strikes back
jonoalderson
0
1.4k
Documentation Writing (for coders)
carmenintech
77
5.4k
The Limits of Empathy - UXLibs8
cassininazir
1
570
My Coaching Mixtape
mlcsv
0
190
First, design no harm
axbom
PRO
2
1.2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Facilitating Awesome Meetings
lara
57
7k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Transcript
No-SQL & mongoDB @liushuaikobe
What’s No-SQL?
Strozzi NoSQL (1998) RDBMS operator-stream paradigm(PIPE) a set of shell
routines that access normal files of the OS Carlo Strozzi
No-SQL == Not Have SQL
No-SQL == Not Have Structured Query Language SQL
…departs from the relational model altogether; it should therefore have
been called more appropriately 'NoREL'.
A meetup@San Francisco ——"open source, distributed, non relational databases” Organized
by Johan Oskarsson(Last.fm) Google's Bigtable & Amazon's Dynamo Eric Evans(then in RackSpace) reintroduced “No-SQL”
No-SQL == non-relational
Eric Evans My regret however isn't about what the name
says, it's about what it doesn't.
no:sql(east) conference@ Atlanta
> select fun, profit > from real_world > where relational=false;
No-SQL == Not Only SQL
CAP Theorem (Eric Brewer) Consistency Partition Tolerance Availability
BASE neutral A C I D PH S B E
A
asically vailable ventually Consistent oft-state S B E A
Why No-SQL? Traditional RDBMS —— CA Do We really need
Transaction? Horizontal-Scale
List Of NoSQL DBs Wide Column Store Document Store Key
Value / Tuple Store Graph Databases …
mongoDB
10gen established in 2007, @New York originally aimed to build
a Paas architecture released MongoDB, maintaining it
MongoDB Inc. (2013.08) established in 2007, @New York originally aimed
to build a Paas architecture released MongoDB, maintaining it
MongoDB document-oriented(BSON) Storage schema-free high-performance build for scale
Document
Data-Model Design References Embedded
Reference
Embedded
which way is better? No Define answer.
A Instance
{ "actor_attributes" : {
"name" : "Dan Tao", "company" : "Google", ... "email" : "
[email protected]
" }, "repository" : { "fork" : false, "watchers" : 0, "description" : "Oh, nothing, nothing", ... "id" : 13155632, "name" : "breakneck" }, "url" : "https://github.com/dtao/breakneck/compare/dccee09561...38984e5dce", "created_at" : "2013-‐09-‐28T18:00:06-‐07:00", "actor" : "dtao", "public" : true, "type" : "PushEvent", "payload" : { "shas" : [ [ ... ] ], "head" : "38984e5dce1a21b778d4c26bde493270b4625662", "ref" : "refs/heads/master", "size" : 1 } }
RDBMS——ERD Actor Repo Event 1..n 1..1 1..n 1..1
While in mongo… { "_id" : ObjectId("5287d3e947e36f2280584179") "actor_attributes"
: { "name" : "Dan Tao", "company" : "Google", ... "email" : "
[email protected]
" } } { "_id" : ObjectId("5287d3e947e36f22805844b3") "actor_attributes" : { "name" : "Dan Tao", "company" : "Google", ... "email" : "
[email protected]
" } } { "_id" : ObjectId("5287d3e947e36f22805844c9") "actor_attributes" : { "name" : "Dan Tao", "company" : "Google", ... "email" : "
[email protected]
" } } Actor
{ "_id" : ObjectId("5287d41647e36f2280586033"), “repository" : {
"fork" : false, ... "name" : "breakneck" }, "actor" : "Sam", … "payload" : { "shas" : [ [ ... ] ], "ref" : "refs/heads/master", "size" : 1 } } Event { "_id" : ObjectId("5287d41647e36f2280586035"), “repository" : { "fork" : false, ... "name" : "breakneck" }, "actor" : "Tom", … "payload" : { "shas" : [ [ ... ] ], "ref" : "refs/heads/master", "size" : 1 } } { "_id" : ObjectId("5287d41647e36f2280586537"), “repository" : { "fork" : false, ... "name" : "breakneck" }, "actor" : "Mike", … "payload" : { "shas" : [ [ ... ] ], "ref" : "refs/heads/master", "size" : 1 } }
Summary No-SQL => No? No! Why No-SQL? CAP & BASE
MongoDB (Inc.) Schema design
How to Choose? Depending on your needs…
Thanks @liushuaikobe
Q & A http:/ /www.girlsgonestrong.com/video-qa/